Cost of sales is the cost of the goods the business actually sold: opening inventory plus net purchases, less closing inventory. It is the figure that sits between sales and gross profit in the income statement.
This skill is the centre of inventory and cost of sales, and it appears in every set of final accounts you will be asked to prepare.
What does each line mean?
Opening inventory is what was on the shelves at the start of the period. Purchases are goods bought for resale during the period. Closing inventory is what is left unsold at the end, counted and valued.
Two adjustments change purchases. Carriage inwards (delivery of goods to the business) increases the cost of the goods, so it is added. Returns outwards (goods sent back to suppliers) reduce what was bought, so they are subtracted.
How to build it, step by step
- Start with opening inventory.
- Add purchases.
- Add carriage inwards and subtract returns outwards to reach net purchases.
- Add the opening inventory and net purchases to find the cost of goods available for sale.
- Subtract closing inventory. The result is cost of sales.
- Subtract cost of sales from sales to reach gross profit.
Worked example
Kedai Pelangi has these figures for the year ended 31 December 2025, all in RM.
| Item | RM |
|---|---|
| Sales | 48,000 |
| Opening inventory | 4,200 |
| Purchases | 31,800 |
| Returns outwards | 1,100 |
| Carriage inwards | 600 |
| Closing inventory | 5,300 |
Step 1 to 3, net purchases: 31,800 + 600 − 1,100 = RM 31,300.
Step 4, goods available for sale: 4,200 + 31,300 = RM 35,500.
Step 5, cost of sales: 35,500 − 5,300 = RM 30,200.
Step 6, gross profit: 48,000 − 30,200 = RM 17,800.
Check the other way: 30,200 + 17,800 = 48,000, which equals sales. The shop bought RM 31,300 of goods but sold only RM 30,200 at cost, because stock rose by RM 1,100 (5,300 − 4,200). The difference between 31,300 and 30,200 is also RM 1,100.
The mistake to watch for
A common slip is to treat returns outwards like purchases and add them.
Mistaken working: 4,200 + 31,800 + 1,100 + 600 − 5,300 = 32,400
The student saw a purchases-related figure and added it, so cost of sales is too high.
The error is RM 2,200, which is twice the return of RM 1,100: once for not subtracting it and once for adding it.
Ask a simple question for each item: does it make the goods cost more, or does it take goods away from what was bought? Carriage inwards costs more. Returns take away.
Check yourself
Work these on paper, then open each answer.
1. Opening inventory RM 2,000, purchases RM 9,500, closing inventory RM 2,500. Find cost of sales.
Show answer
2,000 + 9,500 = 11,500. 11,500 − 2,500 = RM 9,000.
2. Cost of sales is RM 18,600 and sales are RM 27,000. Find gross profit.
Show answer
27,000 − 18,600 = RM 8,400.
3. Opening inventory RM 3,500, purchases RM 22,000, carriage inwards RM 400, returns outwards RM 600 and cost of sales RM 21,700. Find closing inventory.
Show answer
Net purchases: 22,000 + 400 − 600 = 21,800. Goods available: 3,500 + 21,800 = 25,300. Closing inventory: 25,300 − 21,700 = RM 3,600.
Where this leads next
Next, find out why the whole purchases figure is not the expense in distinguishing purchases from expense recognition. The double-entry and ledger trainer is useful for seeing where each of these items is recorded.
If you can follow the layout but lose marks when a question gives it in a different order, online one-to-one Accounting tuition lets a teacher work through your own attempts with you.