Skip to content
IGCSE·Tuition
Accounting · Lessons

Calculate cost of sales from a stock movement

You know the formula from class, yet one extra line in the question makes you unsure which figure to add and which to take away.

On this page
  1. What does each line mean?
  2. How to build it, step by step
  3. Worked example
  4. The mistake to watch for
  5. Check yourself
  6. Where this leads next

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

  1. Start with opening inventory.
  2. Add purchases.
  3. Add carriage inwards and subtract returns outwards to reach net purchases.
  4. Add the opening inventory and net purchases to find the cost of goods available for sale.
  5. Subtract closing inventory. The result is cost of sales.
  6. 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.

ItemRM
Sales48,000
Opening inventory4,200
Purchases31,800
Returns outwards1,100
Carriage inwards600
Closing inventory5,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.

Questions people ask

What is the formula for cost of sales?

Cost of sales = opening inventory + net purchases − closing inventory. Net purchases means purchases, plus carriage inwards, less returns outwards. The result is the cost of the goods that were actually sold in the period, not the goods that were bought.

Is carriage outwards part of cost of sales?

No. Carriage outwards is the cost of delivering goods to customers, so it is a selling expense and belongs further down the income statement. Carriage inwards is the cost of getting goods to the business, so it is added to purchases.

How do I find closing inventory if only the cost of sales is given?

Rearrange the layout. Add opening inventory and net purchases to find the goods available for sale, then subtract the cost of sales. What is left is closing inventory. Check by putting it back into the layout.

Updated:

Your next step

If the cost of sales layout feels fine until a question adds returns, carriage or a missing figure, a one-to-one teacher can watch your working and show you which line is pulling the answer off course.

Paid one-hour trial at your assigned teacher’s confirmed rate, starting from RM80. You agree the teacher’s hourly rate before the trial, and ongoing lessons continue at that same rate. The schedule is arranged with your teacher after the trial.

Tuition is arranged with a parent or guardian. Send them this page on WhatsApp and they can enquire for you.

Parent or guardian? Enquire here

9,000+ students helped through our service