What is cost of goods sold?
Published
Cost of goods sold is the direct cost of the goods actually sold during a period. Not what you bought - what left inventory against recorded sales.
The formula
COGS = Opening inventory + Purchases − Closing inventoryFor Al-Waha, Q2:
Opening inventory 118,400+ Purchases 290,800= Goods available 409,200− Closing inventory (141,200)= COGS 268,000
Another way to read it: the gap between purchases (290,800) and COGS (268,000) is SAR 22,800 - exactly the increase in inventory. You bought more than you sold, and the difference is cash locked in the warehouse.
What belongs in it, and what doesn't
| In COGS | Not in COGS |
|---|---|
| Purchase price of goods | Management and accounting salaries |
| Inbound freight (until goods arrive) | Marketing and advertising |
| Customs duty | Head office rent |
| Insurance on the shipment | Outbound delivery to the customer |
| Packaging required for sale | Finance costs |
Customs duty and inbound freight should be capitalised into the item's cost, not expensed separately. Expensing them shows a higher gross margin than reality and prices the product off an understated cost.
Valuation methods compared - a single-SKU illustration
| Movement | Units | Unit cost | Total |
|---|---|---|---|
| Opening inventory | 100 | 40 | 4,000 |
| Purchase 1 | 200 | 45 | 9,000 |
| Purchase 2 | 150 | 50 | 7,500 |
| Available | 450 | 20,500 |
300 units sold, 150 remaining.
COGS = (100 × 40) + (200 × 45) = 4,000 + 9,000 = SAR 13,000Closing inventory = 150 × 50 = SAR 7,500
Average unit cost = 20,500 ÷ 450 = SAR 45.56COGS = 300 × 45.56 = SAR 13,667Closing inventory = 150 × 45.56 = SAR 6,833
Effect on profit, assuming a selling price of SAR 70 per unit (revenue 21,000):
| FIFO | Weighted average | |
|---|---|---|
| Revenue | 21,000 | 21,000 |
| COGS | (13,000) | (13,667) |
| Gross profit | 8,000 | 7,333 |
| Margin | 38.1% | 34.9% |
SAR 667 of difference on identical goods and identical sales - because prices were rising. In a rising-cost market FIFO reports higher profit and higher closing inventory. Pick one method and stay with it; switching between periods makes comparison meaningless and breaches the consistency principle.
Common mistakes
| Mistake | Effect |
|---|---|
| Posting all purchases straight to COGS | For Al-Waha: cost of 290,800 instead of 268,000, and gross profit of 169,200 instead of 192,000 - understated by 22,800 |
| Omitting the cost entry at the point of sale | Gross profit overstated all year, with a large variance at stocktake |
| Expensing customs and inbound freight as operating costs | A fictitious gross margin, and pricing built on an understated cost |
| Including outbound freight in COGS | Mixes product cost with delivery cost and distorts per-item profitability |
Frequently asked questions
Is COGS the same as purchases?
No, except in the rare case where opening and closing inventory are equal. The difference between them is the movement in inventory.
How does this work for a service business?
There is no inventory, but there is an equivalent: the cost of delivering the service - direct staff time, project-specific licences, subcontractors. It is presented as "cost of revenue."
When is it recorded?
When the sale is recognised, on the same date as the sales invoice. The two entries are inseparable: one for revenue, one for cost.
How does it relate to the physical stocktake?
The count establishes closing inventory, and that figure closes the formula. Any variance between the physical count and the book balance flows straight into COGS.