Ask most ecommerce founders for their gross margin and they will give you a number. Ask how it is calculated and you often find the number is guesswork, because the books treat inventory the way a checking account treats spending: money out when you pay the supplier, nothing tracked after that. That approach makes your margin swing wildly month to month and hides whether you are actually making money on what you sell.
Inventory accounting exists to fix that. Done right, it tells you the true cost of every sale and a gross margin you can trust. Here is how it works and where ecommerce businesses get it wrong.
The core idea: cost follows the sale
When you buy inventory, you have not incurred an expense yet. You have swapped cash for an asset of equal value: product sitting in a warehouse. The expense happens later, when you sell that product. At that moment the cost moves off the balance sheet (inventory) and onto the income statement as cost of goods sold, matched against the revenue from the same sale.
This matching is the whole point. Revenue for a sale and the cost of that sale land in the same period, so gross margin reflects reality. If you instead expense inventory when you pay for it, a big purchase tanks your margin one month and inflates it the next, and neither number means anything.
Get landed cost right, not just the invoice
The cost of a product is not just what the supplier charged. It includes freight, duties, tariffs, and inbound handling to get the goods to you. This is called landed cost, and leaving it out is one of the most common ecommerce mistakes. A product that costs 8 dollars from the supplier might have a true landed cost of 11 dollars once you add ocean freight and duty. If your COGS only captures the 8 dollars, your margin looks great and your bank balance quietly disagrees.
Choose a costing method and stick to it
When you buy the same product at different prices over time, you need a rule for which cost applies to a sale. The common methods are FIFO (first in, first out), which assumes the oldest inventory sells first, and weighted average, which blends the cost of all units on hand. For most ecommerce businesses, weighted average is simpler to run and perfectly acceptable. What matters is that you pick one and apply it consistently, so your margins are comparable across periods.
Account for shrinkage and damage
Not all inventory becomes a sale. Some is lost, damaged, stolen, or returned in unsellable condition. If your books assume every unit purchased eventually sells at full cost, your inventory asset drifts higher than what actually sits on the shelf. Periodic counts and write-offs keep the balance sheet honest and stop you from over-ordering based on phantom stock.
Reconcile the platforms, not just the bank
Ecommerce revenue rarely hits your bank as clean, per-order deposits. Shopify Payments, Amazon, and marketplaces net out fees, refunds, chargebacks, and reserves before paying you. If you book the deposit as revenue, you understate both sales and fees and your margin is wrong again. The fix is to reconcile from the platform settlement report: gross sales, minus fees, minus refunds, equals the deposit. That is more work, and it is the difference between real numbers and a guess.
Why this is worth the effort
Every important ecommerce decision runs on accurate COGS. Pricing, which products to promote, which SKUs to kill, how much to reorder, whether a discount still leaves you profitable: all of it depends on knowing your true cost per sale. Cash-basis books that expense inventory on purchase cannot answer any of those questions. Proper inventory accounting can.
- Track inventory as an asset, and move cost to COGS only when the item sells.
- Use landed cost, including freight and duty, not just the supplier invoice.
- Pick a costing method (weighted average is fine) and apply it consistently.
- Write off shrinkage and damage so the balance sheet reflects real stock.
- Reconcile revenue from platform settlement reports, not bank deposits.
This is exactly the kind of accrual accounting that makes an ecommerce P&L trustworthy, and it is core to how our accounting team runs the books for product businesses.