How it is calculated
Cost of goods sold (COGS, also called cost of sales) is the cost of the goods a business sold in a period. It is not the cost of everything it bought.
- Net purchases = purchases − purchase returns, allowances and discounts
- Goods available for sale = opening stock + net purchases + freight-in, duty and handling
- Cost of goods sold = goods available for sale − closing stock
- Gross profit = net sales − cost of goods sold
- Gross margin = gross profit ÷ net sales
- Markup on cost = gross profit ÷ cost of goods sold
The idea is simple. What was there at the start, plus what came in, is everything that could have been sold. Whatever is not on the shelf at the end was sold, or lost.
Worked example
Alder Foods (a made-up company) has these figures for a year, in EUR.
| Line | Figure |
|---|---|
| Net purchases: 420,000 − 12,000 | €408,000.00 |
| Goods available for sale: 85,000 + 408,000 + 18,000 | €511,000.00 |
| Cost of goods sold: 511,000 − 96,000 | €415,000.00 |
| Gross profit: 640,000 − 415,000 | €225,000.00 |
| Gross margin: 225,000 ÷ 640,000 | 35.16% |
| Markup on cost: 225,000 ÷ 415,000 | 54.22% |
| Cost of goods sold as a share of sales: 415,000 ÷ 640,000 | 64.84% |
Opening stock is 85,000, purchases are 420,000 with 12,000 of returns and discounts, freight-in is 18,000, closing stock is 96,000 and net sales are 640,000.
Notes
- Tax you can claim back (VAT or GST paid on purchases) is not a cost. Leave it out of purchases and out of sales.
- Loss and damage. Goods stolen, spoiled or written down are no longer in closing stock, so this formula counts them inside cost of goods sold. To see them apart, compare the result with the cost recorded sale by sale.
- Stock that has lost value. Under IAS 2, stock is carried at the lower of cost and net realisable value. A write-down lowers closing stock and raises the cost of the period.
- Service businesses have no stock. Their direct cost is often called cost of services or cost of revenue.
- This page gives general information to help you plan. It is not accounting or tax advice.
In MyRecords
With perpetual inventory on, MyRecords records the cost of each sale as it happens. The stock ledger in Inventory shows the running quantity and value of every item, with the reason for each valuation rate. A landed cost voucher in Purchasing adds freight or duty to the cost of the items received. Accounting shows profit and loss by month, quarter, half-year or year with gross profit by item, and each amount opens the entries behind it.















