Costs · P&L line 17
COGS
Cost of goods sold: what the products themselves cost you.
Formula
Σ unit cost × units sold − refund credits
COGS, cost of goods sold, is the unit cost of everything you sold in a period, minus the cost credited back for anything refunded. It excludes shipping, packaging and payment fees, which are fulfilment costs, and it is the first cost a P&L subtracts from net revenue.
The detail that decides whether it is trustworthy is dating. A supplier price that changed in April should apply from April forward and leave March priced at what March actually cost. A single cost field that holds one value per product cannot do that, which is the heart of what Shopify's COGS report leaves out.
A missing unit cost is worse than a wrong one, because it silently inflates margin: a product with no cost reads as pure profit. It should always be flagged rather than treated as zero.
The refund side has its own rule: when units come back, the cost credit is valued at the cost that was effective on the original order's date, so the credit exactly reverses the debit and a price change in between cannot create phantom gain or loss.
Related terms