What COGS actually measures
COGS isolates the cost of making or buying the specific thing you sold — nothing more, nothing less. If you sell handmade candles, COGS is wax, wicks, fragrance oil, and the packaging that ships with the product. It is not your rent, your bookkeeping software, or the ad spend that got the customer to your store.
This distinction matters because it's how you calculate gross profit — revenue minus COGS — which tells you how much money is left to cover everything else (overhead, salaries, marketing) before you know if the business itself is profitable. A business with healthy revenue but thin gross margin is often in real trouble, even if the top line looks good.
“Revenue tells you if people want what you sell. Gross margin tells you if you can afford to sell it to them.”
The formula
COGS is calculated over a period (usually a month, quarter, or year) using your beginning and ending inventory:
A worked example
Say you run a small skincare brand. Here's how COGS plays out for March:
If that business made $31,000 in revenue during March, gross profit is $31,000 − $11,500 = $19,500, a gross margin of roughly 63%. That 63% is the number that actually tells you whether the business model works.
Why this matters beyond bookkeeping
COGS shows up in three places people genuinely care about. Pricing decisions — you can't price a product sustainably without knowing what it actually costs to deliver. Investor and lender diligence — gross margin is one of the first ratios anyone checks, because it reveals whether unit economics work before scale. Tax filings — COGS is deductible against revenue, so getting it right (and substantiated with real inventory records) directly affects what you owe.
COGS posts to the ledger automatically
When Inventory and Accounting run together, every sale decrements stock and posts the matching COGS entry — no spreadsheet, no month-end estimate.
Common mistakes
Including costs that aren't direct
Rent, admin salaries, and marketing spend don't belong in COGS. Mixing them in inflates COGS and understates gross margin, which misleads pricing decisions.
Using Shopify's “cost” field as COGS
Shopify's cost field often excludes freight-in, customs duties, or packaging — all of which belong in true COGS. It's a starting point, not the final number.
Forgetting to count ending inventory accurately
If you don't do a real stock count, you're estimating COGS, not calculating it. Estimates compound into meaningfully wrong gross margins by year-end.
Treating COGS as static across the year
Material costs and shipping rates change. Recalculating COGS only at year-end hides margin erosion that's been happening for months.