COGS, cost of goods sold, is the unit cost of everything you sold in a period, minus the cost of units that came back to stock or never shipped. 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. What the field keeps, and what it cannot, is set out in historical COGS on Shopify.
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 a refunded unit comes back to stock, or never shipped, its 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. A shipped unit refunded without coming back, like a goodwill refund or a lost parcel, keeps its cost. A chargeback is not a return: it takes the money back, but no item comes back, so its goods keep their cost in COGS.
