What is cost of goods sold?

Published

Definition

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 inventory

For 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 COGSNot in COGS
Purchase price of goodsManagement and accounting salaries
Inbound freight (until goods arrive)Marketing and advertising
Customs dutyHead office rent
Insurance on the shipmentOutbound delivery to the customer
Packaging required for saleFinance 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

MovementUnitsUnit costTotal
Opening inventory100404,000
Purchase 1200459,000
Purchase 2150507,500
Available45020,500

300 units sold, 150 remaining.

FIFO:
COGS = (100 × 40) + (200 × 45) = 4,000 + 9,000 = SAR 13,000Closing inventory = 150 × 50 = SAR 7,500
Weighted average:
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):

FIFOWeighted average
Revenue21,00021,000
COGS(13,000)(13,667)
Gross profit8,0007,333
Margin38.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

MistakeEffect
Posting all purchases straight to COGSFor 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 saleGross profit overstated all year, with a large variance at stocktake
Expensing customs and inbound freight as operating costsA fictitious gross margin, and pricing built on an understated cost
Including outbound freight in COGSMixes 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.

Ready to sort it out?

Keep your accounting, invoices, and reports in one clear place with Haseem.