Cost of goods sold (COGS)

Cost of goods sold is the direct cost of the products you sold in a period. It is what you subtract from revenue to get gross profit, and it is the number most often wrong in businesses that track stock outside their accounts.

Also searched as: COGS, cost of sales

Updated July 2026

The calculation is simple in principle: opening stock plus purchases minus closing stock. The trouble is that it depends entirely on the closing stock figure being right, and in a business counting stock once a year, that figure is an estimate for eleven months out of twelve.

That means gross margin is also an estimate for eleven months. Companies frequently discover at year end that the profit they had been reporting monthly was materially wrong, in either direction.

In a system where each sale posts its own cost at the moment it happens, COGS is continuous rather than derived, and gross margin is available on any day you want it.