Skip to content

How to Track Inventory in Ecommerce Bookkeeping: 8 Steps to Keep COGS and Profit Accurate

Table of Contents

Some links on The Justifiable are affiliate links, meaning we may earn a small commission at no extra cost to you. Read full disclaimer.

Learning how to track inventory in ecommerce bookkeeping is essential once you sell physical products, because a sale does not make the full purchase cost an immediate expense.

Inventory sits on the balance sheet until products are sold, and timing errors can make both cost of goods sold (COGS) and profit look wrong. The challenge grows when you add marketplaces, payment fees, returns, bundles, freight, and multiple warehouses.

This guide shows you a practical eight-step system for recording inventory, calculating COGS, reconciling quantities and values, closing each month accurately, and scaling the process without losing control.

Step 1: Define What Counts as Inventory and COGS

Accurate inventory bookkeeping starts with classification. Before choosing software or automating entries, decide which costs belong in inventory, which belong in COGS when items sell, and which should remain ordinary operating expenses.

Separate Inventory Assets From Operating Expenses

When you buy products for resale, the purchase usually creates an inventory asset rather than an immediate expense. That distinction is the foundation of accurate ecommerce profit reporting. If you spend $10,000 on sellable stock and expense all $10,000 when it arrives, a slow sales month can look unprofitable even though much of that value is still sitting on your shelves.

Think in terms of economic use. Product cost remains in inventory while you control unsold units. When a unit sells, its assigned cost moves from inventory to COGS. Costs that support the business but do not become part of the sellable product—such as advertising, office software, most payment-processing fees, and many outbound fulfillment costs—are normally recorded separately.

Create a simple chart-of-accounts policy that your bookkeeper can follow consistently. At minimum, distinguish inventory assets, COGS, sales revenue, returns and discounts, marketplace or payment fees, and fulfillment or shipping expenses. The exact account names matter less than consistent treatment.

Build a Consistent Landed Cost Policy

The supplier invoice is often only part of what inventory truly costs. Landed cost is the total cost required to bring inventory to the location and condition where it can be sold. Depending on your accounting framework and circumstances, that can include product purchase price, inbound freight, customs duties, brokerage charges, and other directly attributable acquisition costs.

Suppose you import 1,000 units at $8 each, then pay $1,200 in inbound freight and $300 in duties. Treating each unit as an $8 item may understate inventory and COGS if those additional costs should be capitalized. Allocating the extra $1,500 across the shipment would add $1.50 per unit before any other adjustments.

Choose an allocation method that reflects the economics of the shipment. Equal per-unit allocation is simple when products are similar. Weight, volume, purchase value, or another driver may be more sensible when products differ dramatically. Document the method and use it consistently.

Create Clean SKU and Unit-of-Measure Rules

Bookkeeping becomes unreliable when the accounting records and inventory system do not agree on what one unit actually is. Every sellable item should have a stable stock-keeping unit, or SKU, and the same SKU should represent the same product across purchasing, storage, sales, and bookkeeping.

Avoid reusing an old SKU for a new product simply because the previous item was discontinued. Also decide how you will handle cases, packs, and individual pieces. If you buy a case of 24 but sell single units, one received case must increase inventory by 24 sellable units.

Variants deserve the same discipline. A black medium shirt and a black large shirt are separate inventory items if customers can buy them separately. Bundles may require parent and component SKUs, which becomes important when COGS is calculated later.

Before moving to the next step, export your current product list and check for duplicate SKUs, missing costs, inconsistent naming, and inactive items that still show quantity. Cleaning these records early prevents reconciliation problems from multiplying. Good inventory bookkeeping is easier when every transaction can be tied to an identifiable product, quantity, and cost.

Step 2: Choose Your Inventory Accounting Method and Source of Truth

Once the categories are clear, decide how inventory value will move through your books. The right approach should match your transaction volume, operational complexity, and ability to keep quantities and costs synchronized.

Decide Between Periodic and Perpetual Inventory Tracking

A periodic inventory system determines COGS at set intervals, often monthly or at year-end. You start with beginning inventory, add inventory purchases and applicable acquisition costs, then subtract ending inventory based on your records and counts. The core relationship is:

COGS = Beginning Inventory + Net Inventory Purchases − Ending Inventory

This method can work for a smaller catalog with manageable transaction volume, but it provides less visibility between closing dates. If stock records are inaccurate, you may not discover the problem until the period is reconciled.

A perpetual system updates inventory quantity and cost as purchases, sales, returns, and adjustments occur. In theory, the inventory asset and COGS remain current throughout the month. In practice, ecommerce data still needs reconciliation because timing differences, marketplace reports, damaged goods, and integration errors can create gaps.

I recommend thinking of “perpetual” as continuous recordkeeping, not as permission to skip month-end controls. Even a well-integrated system needs physical or cycle counts and a general-ledger reconciliation.

Choose a Costing Method You Can Apply Consistently

Inventory quantity answers how many units you own; the costing method determines which cost is assigned when units sell. Common approaches include first-in, first-out (FIFO), weighted average, and specific identification. The rules you may use for financial reporting and tax purposes depend on your jurisdiction and accounting framework, so the method should be confirmed with an accounting professional.

FIFO assumes earlier costs flow to COGS before later costs. It can be intuitive for products that physically rotate in roughly the same order. Weighted average blends available costs into an average unit cost, which can smooth price fluctuations. Specific identification tracks the actual cost of a particular unit and is more practical for unique, high-value products than for thousands of interchangeable items.

ALSO READ:  Ecommerce Developer Mistakes to Avoid If You Want Faster Growth

The biggest operational mistake is switching methods casually. If one report uses weighted average while another inventory app uses FIFO, COGS can differ even when quantities match perfectly.

Choose the method during setup, document it, and make sure your inventory platform and accounting workflow support it. Treat any later change as an accounting decision rather than a software preference.

Establish One Inventory Source of Truth

Most ecommerce businesses have several systems that can display inventory: the storefront, a marketplace, a warehouse portal, an inventory application, and the accounting ledger. They should reconcile, but they should not all be treated as equal sources of truth.

Choose one operational system to own SKU-level quantities and cost layers. A simple store might rely on Shopify or WooCommerce for unit movements, while a multi-warehouse operation may need dedicated software such as Cin7 or Zoho Inventory. The accounting system should then receive the summarized or detailed financial impact required for your books.

Document which platform controls SKU, quantity, cost, receipts, transfers, and adjustments, and specify who can make manual changes.

The general ledger remains the financial source of truth for reported inventory value, but it should reconcile to the operational inventory system. If the warehouse shows $180,000 of inventory while the balance sheet shows $215,000, neither figure should be trusted until the difference is explained.

Step 3: Record Purchases and Landed Costs at the Right Time

With the method and source of truth established, the next task is recording inventory coming into the business. Accurate purchase and receiving records determine the cost pool from which future COGS will be calculated.

Record Purchases to Inventory Before They Become COGS

When merchandise is purchased for resale, record the cost to the appropriate inventory asset account instead of posting the full supplier bill directly to COGS. The cost should remain on the balance sheet until the related units are sold, subject to the accounting rules that apply to your business.

Timing matters because ordering, ownership, receipt, invoicing, and payment can happen on different dates. A purchase order is not automatically inventory, and a supplier invoice may arrive before or after the goods.

For example, imagine you pay a supplier deposit in May, the supplier ships in June, and the warehouse receives the goods in July. The correct accounting treatment depends on when ownership transfers and the terms of the transaction, not simply when cash left your bank account.

Build a receiving workflow that connects purchase orders, supplier bills, and warehouse receipts. Record shortages, overages, and substitutions instead of forcing the invoice quantity to equal the received quantity. If you use accounting software such as Xero, configure inventory and purchase accounts deliberately rather than relying on whatever default account a new product happens to use.

Allocate Freight, Duties, Discounts, and Other Cost Adjustments

Once the base purchase is recorded, capture the adjustments that affect true inventory cost. Import freight may arrive on a logistics invoice weeks after the supplier bill. Customs charges can be billed separately. Suppliers may issue rebates, credits, or volume discounts after the original purchase.

If these items affect the cost of inventory under your accounting policy, allocate them systematically. Do not leave freight in a generic expense account one month and capitalize it the next simply because someone notices the margin changed.

A practical process is to assign each inbound shipment a reference number. Attach supplier invoices, freight documents, customs or brokerage costs, and credit notes to that shipment. When all material costs are known, calculate the landed cost and update the unit cost or post an appropriate inventory adjustment.

If final costs arrive after some units have already sold, your system may need a cost correction that affects both remaining inventory and COGS. That is another reason to close inventory monthly instead of waiting until year-end.

Record Damage, Shrinkage, and Receiving Differences Immediately

Inventory discrepancies are easier to fix when they are recorded at the moment they happen. If a warehouse receives 98 units against a supplier invoice for 100, do not enter 100 into stock and plan to investigate later. The extra two units can remain in the system for months and distort both availability and inventory value.

Create adjustment reason codes such as damaged on arrival, supplier shortage, warehouse breakage, expired, lost, promotional sample, and count correction. A reason code does not replace documentation, but it makes recurring problems measurable.

The financial treatment depends on the situation. A supplier shortage may create a receivable or credit from the supplier. Damaged stock might lead to a write-off, claim, or return. Internal shrinkage may become an inventory adjustment with an expense or COGS impact according to your accounting policy.

Require approval for material manual adjustments. For example, a warehouse employee can propose a quantity change, but a finance or operations manager approves adjustments above a defined value threshold.

Step 4: Reconcile Sales Channels Without Treating Payouts as Revenue

Ecommerce deposits are usually net settlements, not clean sales totals. Accurate bookkeeping requires separating gross sales, discounts, returns, taxes, fees, and other settlement activity before you calculate profit.

Reconstruct Gross Sales From Marketplace and Processor Data

A $12,000 bank deposit does not necessarily mean you earned $12,000 of revenue. A platform may have collected $14,500 in customer payments, refunded $700, withheld $900 in marketplace and payment fees, and deducted $900 for other charges before sending the net amount.

If you record only the deposit as revenue, sales are understated and fees disappear from the profit and loss statement. Your gross margin can then look better or worse for the wrong reasons because revenue, COGS, and selling costs are not aligned.

For each settlement period, reconstruct the payout into gross product sales, discounts, refunds, taxes collected where applicable, platform and payment fees, shipping income, gift-card activity, and other adjustments. Then reconcile the net amount to the bank deposit.

This principle applies whether you sell through your own store or marketplaces such as Amazon and Etsy. Each channel may present reports differently, but the bookkeeping objective stays the same: record the economic components, then use the payout only as the reconciliation endpoint.

Map Every Sales Event to the Correct Accounting Treatment

Build a transaction map before automating sales-channel entries. The map should tell your bookkeeping system what to do with each event type rather than treating every positive amount as revenue and every negative amount as an expense.

A normal product sale increases revenue and triggers COGS for the units sold. A customer refund reduces revenue; if a usable product returns to stock, the related inventory and COGS may also need to be reversed. A marketplace fee is generally separate from inventory cost. Sales tax collected for a tax authority is typically a liability rather than revenue. Gift cards and store credits can create their own timing differences.

Keep the map maintainable, but test it with real settlements containing refunds, fees, promotions, and adjustments rather than only a clean sales day.

Automated connectors can help summarize high-volume channel activity. Tools such as A2X or Link My Books may be relevant when a business needs settlement-level bookkeeping between ecommerce channels and accounting software. They do not remove the need for correct account mapping or month-end review.

ALSO READ:  Ecommerce Accounting for Fast Growing Stores That Need Better Control Fast

Control Cutoff Timing Across Channels, Warehouses, and Banks

Month-end inventory can be wrong even when every transaction eventually arrives. The problem is cutoff: sales, shipments, returns, purchase receipts, and settlements can land in different systems on different dates.

For example, an order may be placed on March 31, shipped on April 1, included in a marketplace settlement on April 3, and deposited on April 5. Decide which event determines revenue recognition and the associated COGS under your accounting policy. Then make sure both sides are recorded in the same reporting period when appropriate.

Create a cutoff checklist for the final days of each month. Review unshipped orders, shipments not yet posted to accounting, returns received but not processed, goods in transit, warehouse receipts awaiting supplier bills, and channel settlements spanning month-end.

The more fulfillment partners you use, the more important this becomes. A 3PL may operate on one timestamp while your storefront and accounting software use another. Time zones can also matter around midnight.

Step 5: Calculate COGS From the Units Actually Sold

This is where inventory bookkeeping reaches the income statement. COGS should reflect the cost assigned to products that actually left inventory through sales, adjusted appropriately for returns and other inventory movements.

Match Unit Costs to Sales Instead of Using a Percentage Estimate

A common shortcut is to estimate COGS as a fixed percentage of revenue. That may be useful for a quick forecast, but it is weak bookkeeping when actual inventory records are available. Product mix changes, supplier prices move, promotions alter revenue, and returns can make the percentage misleading.

Under a perpetual system, each sale should relieve inventory based on the unit cost generated by your chosen costing method. Under a periodic system, you can derive total COGS from beginning inventory, purchases, and ending inventory. Either approach should ultimately connect to actual inventory movement.

Suppose one month you sell 400 low-margin units and 200 high-margin units. The next month you sell the same revenue amount but the mix reverses. A flat 45% COGS estimate can show nearly identical gross profit even though the economics changed materially.

Track gross margin by product family or channel when that level of detail improves decisions. Do not confuse this management analysis with the general-ledger control total; the detailed reports should reconcile back to the booked inventory and COGS balances.

Handle Bundles, Kits, and Multipacks at Component Cost

Bundles create one of the most common gaps between ecommerce order data and inventory accounting. The customer sees one product, but the warehouse may consume two, three, or ten underlying SKUs. COGS must reflect the components actually removed from stock.

Imagine a “starter kit” sells for $80 and contains one bottle costing $12, two refills costing $6 each, and one accessory costing $5. The kit’s component COGS is $29 before any other applicable inventory costs. If the storefront only passes a parent SKU with a zero or stale cost, gross profit will be overstated.

Decide whether a bundle is stocked as its own assembled item or created virtually at the time of sale. If it is assembled in advance, your inventory system may need an assembly transaction that removes components and creates finished-goods inventory. If it is virtual, the sale should decrement each component according to the bill of materials.

Multipacks need similar logic. A six-pack should remove six base units unless it is separately purchased and stored as a distinct item.

Process Returns, Exchanges, and Replacements Based on Product Condition

Returns affect more than revenue. If a customer sends back an item that can be resold, the business may need to restore that unit to inventory and reverse the related COGS. If the item is damaged, missing, or unsellable, simply increasing inventory would overstate assets.

Create a return workflow with condition statuses. “Received—resellable,” “received—damaged,” “awaiting inspection,” and “not returned” are more useful than one generic returned status. Finance does not need warehouse-level detail for every cosmetic issue, but it does need to know whether economic inventory came back.

Exchanges can be particularly confusing because they combine a return with a new fulfillment. Record both legs. The returned item may restore inventory, while the replacement item creates a new inventory reduction and cost. A no-return replacement should not bring the original unit back into stock.

Also separate customer-facing refunds from inventory outcomes. A business may issue a full refund without receiving the product, or receive a product without refunding its full original amount.

Step 6: Reconcile Inventory Records to Physical Stock

Software records are only claims about what you own. Regular counts and reconciliations prove whether the quantities and values in those systems match inventory that actually exists and is under your control.

Use Cycle Counts Instead of Waiting for One Annual Surprise

A full physical count may still be required for financial or operational reasons, but cycle counting gives you earlier warning when inventory records are drifting. Rather than count every SKU at once, count selected items on a rotating schedule.

Prioritize high-value, fast-moving, theft-prone, and historically inaccurate SKUs. An ABC approach can help: count “A” items more frequently because they represent the greatest value or operational risk, while lower-risk items can be checked less often.

For each count, freeze or carefully control movements in the counted location so that receipts and shipments do not create false variances. Compare physical quantity to system quantity, investigate the difference, approve any adjustment, and record a reason code.

Do not judge the process only by whether the final adjustment is small. Repeated offsetting errors can hide weak controls—for example, one warehouse is consistently short while another is consistently over because transfers are not recorded properly.

Track count accuracy by SKU and location. If the same products fail repeatedly, inspect barcodes, picking units, bundle components, receiving practices, and transfer procedures.

Reconcile the Inventory Subledger to the General Ledger

At month-end, compare the total inventory value in your detailed inventory report with the inventory asset balance in the accounting general ledger. These totals should agree after legitimate timing items are identified.

If they do not, avoid posting a plug entry immediately. First determine the source of the difference. Common causes include purchases posted directly to an expense account, manual journal entries to inventory, sales that reduced quantities but did not post COGS, landed-cost adjustments recorded in only one system, duplicate integrations, and backdated transactions.

Use a reconciliation schedule with three columns: general-ledger balance, inventory-system balance, and reconciling items. Each reconciling item should have an owner, explanation, supporting document, and expected clearing date.

For example, if the ledger includes $18,000 of goods legally owned but still in transit while the warehouse report contains only physically received stock, that may be a legitimate difference depending on your reporting setup. It should still be documented rather than ignored.

The reconciliation is complete only when the difference is zero or fully explained by valid timing and scope differences.

Investigate Variances by Cause, Not Just Dollar Amount

A $2,000 inventory variance can come from several problems with very different consequences. Shrinkage suggests physical loss. A unit-of-measure error can multiply quantities. An integration failure can affect an entire sales channel. A late receipt may be a cutoff issue rather than a true loss.

Start with the largest value discrepancies, but also look for patterns. Ten small variances caused by the same SKU mapping can become a large recurring error. Compare expected quantity movement with receipts, sales, returns, transfers, assemblies, and adjustments.

ALSO READ:  Ecommerce Fulfillment Optimization Tips: 10 Fast Wins To Cut Costs

Use a simple root-cause framework: Was the product never received, received incorrectly, moved without documentation, sold without a matching decrement, returned without inspection, or adjusted manually? Then fix both the accounting entry and the process that created it.

When third-party warehouses are involved, reconcile their reports to your system by location. Inventory can be “missing” because it was transferred to a 3PL under a different location code, held in quarantine, or marked unavailable rather than lost.

Step 7: Close Inventory and COGS Every Month

Monthly close turns individual inventory transactions into reliable financial statements. A disciplined close prevents old differences from accumulating and gives you gross-margin numbers you can actually use to run the business.

Follow the Same Inventory Close Sequence Each Month

Create a repeatable close checklist and perform the steps in the same order. Start by confirming that sales-channel data, purchase receipts, supplier bills, returns, inventory transfers, and significant adjustments have been posted through the reporting cutoff.

Next, reconcile marketplace settlements and bank deposits, then review inventory quantities for negative stock or unusual balances. Complete planned cycle counts, record approved adjustments, and update material landed costs that arrived after the original receipt.

After operational records are stable, run the inventory valuation report and reconcile it to the general ledger. Review COGS against sales and historical gross margin. The purpose is not to force margin back to an expected percentage; it is to use unusual movement as a prompt to investigate.

Finally, lock or restrict the closed period if your system supports that control. Backdated inventory transactions can silently change prior COGS after management has already reviewed the month.

Assign ownership and a due date to every close task. A small business may have one person perform most steps, but review should still be separated where practical for material adjustments.

Review Cutoff, In-Transit Stock, and Unbilled Receipts

The last few days of the month often create more accounting risk than the first three weeks combined. Inventory can be physically moving while invoices, shipping confirmations, and marketplace data are still catching up.

Review goods received but not yet billed, supplier invoices for goods not yet received, and inventory in transit. Determine when ownership transfers based on the actual transaction terms and your accounting policy. Do not assume warehouse receipt date or supplier invoice date is always the correct accounting date.

Also review customer orders around month-end. Products may be allocated but not shipped, shipped but not marked complete, or handed to a carrier while the storefront still shows an earlier status. Revenue and COGS need consistent cutoff logic.

Maintain a cutoff schedule for unusual shipments, large purchase receipts, and significant returns that could materially change inventory value.

Avoid permanent manual entries for temporary timing differences. If an accrual or reclassification is needed, document why it exists and whether it should reverse automatically in the next period.

Identify Obsolete, Damaged, and Slow-Moving Inventory

Inventory can be physically present and still be worth less than its recorded cost. Products may expire, become obsolete, lose market demand, suffer damage, or require deep discounts to sell. Ignoring that decline can overstate both assets and profit.

At each close—or at least on a regular schedule—review inventory aging. Group units by how long they have been held and compare aging with normal sell-through cycles. A 120-day-old product may be healthy in furniture and alarming in a fast-changing seasonal category, so thresholds should match your business.

Create a watchlist for SKUs with no recent sales, unusually high days on hand, repeated markdowns, quality issues, or discontinued status. Operations can decide whether to bundle, discount, return, liquidate, or stop replenishing them. Finance should separately assess whether the recorded value remains supportable under the accounting rules that apply.

Do not create arbitrary write-downs simply to smooth profit. Use a documented policy and retain evidence for material adjustments. If financial reporting or tax treatment is uncertain, involve your accountant.

Step 8: Measure Accuracy, Automate Controls, and Scale the System

Once the monthly process is reliable, use the data to improve decisions and reduce manual work. Scaling should make controls stronger, not simply move more transactions through an integration.

Track Metrics That Reveal Inventory and COGS Problems

Start with metrics that connect accounting accuracy to operational reality. Gross margin is important, but it is an outcome metric. You also need measures that show why the margin changed.

Inventory turnover compares COGS with average inventory and indicates how efficiently stock is moving. Days inventory on hand converts that relationship into an approximate number of days. Track stock-adjustment value as a percentage of inventory, count accuracy by location, aged inventory, negative inventory occurrences, and the value of unexplained reconciliation differences.

Review gross margin by product category and channel where reliable cost data exists. A sudden drop may reflect supplier cost increases, discounting, channel mix, missing landed costs, or duplicate COGS—not necessarily worse product economics.

Set thresholds that trigger investigation rather than chasing every small fluctuation, such as material SKU cost changes, repeated location count errors, or reconciliation items that survive more than one close.

Measure close quality too. Track how many inventory adjustments are posted after the books were considered complete. A declining number indicates the process is becoming more stable.

Automate Repetitive Entries but Keep Reconciliation Controls

Automation works best after the manual logic is proven. If your SKU mapping, settlement categories, or inventory accounts are wrong, automation simply posts wrong entries faster.

Start with repetitive, rules-based tasks: importing settlement summaries, matching known fee categories, syncing approved purchase data, or pushing inventory valuation entries into accounting. Keep exception handling visible. A failed SKU map or unknown marketplace adjustment should land in a review queue instead of being forced into a generic account.

As transaction volume grows, platforms such as NetSuite may become relevant when broader ERP controls across purchasing, inventory, fulfillment, and finance are justified. Upgrade only when operational complexity warrants the implementation burden.

Preserve independent checks after automation. Continue reconciling inventory subledgers to the general ledger, settlement totals to deposits, and selected SKUs to physical counts. Restrict who can edit mappings and inventory adjustments, and review changes.

I recommend automating data movement before automating judgment. Let software handle repeatable posting, but keep a human review around exceptions, valuation changes, and unexplained inventory differences.

Know When Your Inventory Bookkeeping Process Has Outgrown You

A growing ecommerce business often outgrows its bookkeeping process gradually. The warning signs appear before a dramatic failure: month-end close takes longer, staff maintain shadow spreadsheets, inventory values differ across systems, landed costs are skipped because allocation is too hard, and management stops trusting gross margin by product.

Use those signals as upgrade criteria. You may need a stronger inventory platform, a better ecommerce-to-accounting integration, a dedicated inventory accountant, or redesigned warehouse procedures. The answer is not always more software.

Before changing systems, map the current workflow from purchase order to receiving, sale, return, COGS, and month-end reconciliation. Identify where data is rekeyed, where one SKU has multiple names, and where manual journal entries compensate for missing operational data. Fixing those process gaps makes any future migration cleaner.

Plan migrations around opening inventory carefully. Quantity, unit cost, total valuation, open purchase orders, in-transit goods, and historical cutoff all need a controlled conversion date. Run old and new reports in parallel long enough to explain differences before relying on the new system.

Keep COGS Accurate Before You Scale Further

Learning how to track inventory in ecommerce bookkeeping comes down to maintaining a clean chain from physical units to financial value. Define what belongs in inventory, choose a consistent costing method, record purchases and landed costs correctly, separate gross sales from net payouts, match COGS to actual units sold, reconcile physical stock, and close inventory every month.

Once those controls work, automation becomes far more valuable because you are accelerating a process you already understand. Your next step should be to reconcile one recent month from beginning inventory through ending inventory and COGS. Document every unexplained difference rather than plugging it.

That exercise will show whether your biggest weakness is purchasing, sales-channel mapping, returns, warehouse accuracy, or accounting integration—and it gives you a practical priority for improving the system before order volume makes the gap more expensive.

Share This:

Leave a Reply

Your email address will not be published. Required fields are marked *