Most ecommerce business owners have hit that moment where the numbers on the spreadsheet stop telling the real story about their profits, sales, or tax liability. Accountants wear a lot of hats, and tracking down exactly where the numbers went wrong is one of them.
One area we want to highlight is Inventory and Cost of Goods Sold (COGS). Getting this right matters because you need to know both what's in your inventory (your goods) and the true cost of those goods to you (your COGS). Miscalculations, especially around COGS, can seriously damage your profit margins and leave you making important decisions, like whether you can afford more inventory, without accurate information. One of the biggest mistakes ecommerce sellers make is recording COGS at the time they purchase goods instead of waiting until they sell them. It's a well-intentioned but costly habit. Calculating COGS at the wrong time is a small-seeming detail that has a real impact on your profit margins.
Cost vs. count: The two numbers you need to get right
So how does a small business owner carry out accurate accounting for inventory and COGS? Start with the basics: understanding what "cost" (to you) and "count" of your inventory actually mean. It's not just simple math, the right approach depends on the complexity of your business. You can also watch our accompanying video explaining these concepts.
Cost isn't just what you spend when you purchase goods to sell. True cost includes everything it takes to get your goods from your supplier (or produced in-house, if that's your business) to your customer. That typically includes purchase costs, freight, tariffs, inbound shipping, and packaging and labels.
Count is simply the number of units of a given product (or SKU) you have on hand. Your count is always a quantity.
With those terms defined, let's look at actually calculating inventory and COGS.
How to calculate your actual inventory
An accurate inventory calculation requires knowing four things:
- Your last inventory number (beginning inventory)
- The inventory you've received (tracked via warehouse staff or invoices)
- The inventory you've sold (from sales records)
- Any inventory fluctuations not tied to sales, like gifts or discarding bad product (known inventory happenings)
Here's the basic formula, which you can build out through a Quantity Reconciliation Sheet: Beginning Inventory + Received Inventory − Sold Inventory − Known Inventory Happenings = Calculated Inventory
As a best practice, periodically perform self-audits comparing your Calculated Inventory to your Actual Inventory (a physical count). This surfaces any discrepancies. If those discrepancies are significant, it's worth bringing in someone to dig into your records and figure out what's going on. This groundwork also sets you up to optimize your inventory turnover, which is key to managing your biggest business asset.
How to calculate COGS (and why it beats tracking cash spent)
Once you've calculated your inventory and the cost per unit of what's in it, you're ready to calculate COGS. The formula is straightforward: Quantity Sold × Cost per Unit = COGS
COGS is the number that tells the real story of your business, it's far more useful than just knowing how much cash you spent purchasing goods. Another helpful figure: your Physical Inventory Valuation, which shows the value of the goods you have on hand: Cost per Unit × Total # of Units on Hand = Total Value on Hand
There are different ways to arrive at cost per unit. Choose one and stick with it. As a best practice, calculate this figure at least annually, quarterly or monthly is even better, since it's another data point for making business decisions. But at minimum, put it on the calendar as a regular annual task.
If you've followed along, you may be ready to see where your ecommerce business actually stands with inventory and COGS. We put together a free COGS & Inventory Template to help you get started.
When it's time to bring in an expert
Sometimes calculating inventory and COGS surfaces a discrepancy that takes real digging to resolve, especially once it climbs into the tens of thousands of dollars (or more). Here are common reasons ecommerce sellers bring in a consulting expert:
- You're involved in manufacturing your own goods, calculating count gets complex fast when the manufacturing process has a lot of moving pieces.
- You have fluctuating costs.
- There's a significant time delay between purchase and receipt.
- You're running into other discrepancies you can't otherwise explain.
Frequently asked questions
What's the difference between "cost" and "count" in inventory accounting?
Cost is the true cost of getting a product to your customer, purchase price plus freight, tariffs, inbound shipping, and packaging, not just what you paid your supplier. Count is simply the quantity of a given SKU you have on hand.
What's the formula for calculating inventory?
Beginning Inventory + Received Inventory − Sold Inventory − Known Inventory Happenings (gifts, discarded product, etc.) = Calculated Inventory. Compare this to a physical count regularly to catch discrepancies.
What's the formula for calculating COGS?
Quantity Sold × Cost per Unit = COGS. This is a very different, and far more useful, number than simply tracking the cash you spent purchasing goods.
Why does it matter when I record COGS?
Recording COGS at the time of purchase instead of the time of sale is one of the most common mistakes ecommerce sellers make. It distorts your margins and can leave you making decisions, like whether you can afford more inventory, based on inaccurate numbers.
When should I bring in an expert for inventory and COGS accounting?
Consider it if you manufacture your own goods (which adds real complexity to counting), have fluctuating costs, experience a significant time delay between purchase and receipt, or run into discrepancies you can't explain on your own.
Ready to get your inventory and COGS numbers right?
Whether your numbers have a small inconsistency or a discrepancy in the tens of thousands, LedgerGurus can help you track down exactly what's going on with your inventory and COGS. It's what we do best, and we'll leave the cryptic riddles at 221B Baker Street.

