COGS
Also known as: Cost of goods sold
COGS (cost of goods sold) is the direct cost of the products you actually sold in a period, including purchase price, inbound freight and duties, but not marketing or overheads.
Formula
Per period: COGS = opening inventory + purchases − closing inventory
Per order: COGS = Σ (units sold × landed unit cost)Worked example
A store starts the quarter with $20,000 of inventory, buys $35,000 more and ends with $18,000. Separately, one order contains 2 units with a landed cost of $12 each, plus $1.50 of packaging.
- Quarterly COGS = $20,000 + $35,000 − $18,000 = $37,000.
- Order COGS = 2 × $12 + $1.50 = $25.50.
Period COGS is for your accounts; per-order COGS is what you need for ROAS, CPA and product profitability.
Why it matters for a Shopify store running ads
COGS is usually the largest cost in a product business, so small errors in it distort every profit metric downstream. If COGS is understated, break-even ROAS looks lower than it is and you scale campaigns that lose money.
Shopify lets you store a "cost per item" for each variant, but it is often missing, outdated or set without freight and duties. For dropshipping, COGS also changes with the supplier's price and currency, so it needs updating whenever those move.
Common mistakes
- Using the supplier's ex-works price and leaving out freight, duties and packaging.
- Leaving Shopify's cost-per-item field empty for some variants, which makes those sales look 100% margin.
- Never updating COGS after supplier price changes or currency swings.
- Including shipping to the customer in COGS in one report and as a separate cost in another.
FAQ
Is shipping part of COGS?
Inbound shipping to get stock to your warehouse is normally part of COGS (as part of landed cost). Shipping to the customer is usually tracked as a separate fulfilment cost, though some stores include it. Pick one approach and use it everywhere.
Are ad costs part of COGS?
No. Advertising is an operating or marketing expense. COGS only covers the direct cost of the goods you sold.
Related terms
- Landed costLanded cost is the total cost of getting a product into your warehouse and ready to sell, including the purchase price, freight, insurance, import duties and customs or broker fees.
- Gross marginGross margin is the share of revenue left after subtracting the cost of goods sold, expressed as a percentage: (revenue − COGS) ÷ revenue.
- Contribution marginContribution margin is the revenue left after subtracting all variable costs, the money that contributes to fixed costs and profit; ecommerce teams often split it into CM1, CM2 and CM3.
- Inventory turnoverInventory turnover is the number of times a store sells through its average inventory in a period, calculated as COGS divided by the average value of inventory held.
- Net profitNet profit is the money a business keeps after subtracting every cost from revenue, including product costs, shipping, fees, refunds, advertising and fixed overheads.
Want this number for your own store without a spreadsheet? ProfitFly connects Shopify, Meta and TikTok and shows your real profit every day, free up to 50 orders a month.
Start free