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.

  1. Quarterly COGS = $20,000 + $35,000 − $18,000 = $37,000.
  2. 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.
Work it out with your own numbers: Profit margin calculator

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

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