- Accounting: inventory and cost of goods sold
How do you calculate cost of goods sold?
Cost of goods sold is calculated as opening stock plus purchases minus closing stock. A shop that started the year with ₪40,000 of goods, bought ₪260,000 more and counted ₪50,000 left at the end sold goods that cost ₪250,000. Subtracting that from sales gives the gross profit.
The topic explained
What was available, and where it went
A trading business buys goods and sells them at a higher price. Its gross profit is sales minus what the goods it sold had cost, the cost of goods sold, also called the cost of sales. That cost cannot be read straight from the books, because the purchases of the year include goods that are still on the shelf, and the goods sold include some bought last year. So it is worked out from three figures:
Take a made-up shoe shop. It began the year with stock that cost ₪40,000 and bought ₪260,000 more, so it had ₪300,000 of goods available for sale. At the year end it counted the shoes still on the shelves: ₪50,000 at cost. Everything else, ₪250,000, was sold, or at least left the shop.
The gross profit section, line by line
The calculation sits at the top of the income statement. With sales of ₪400,000 and cost of goods sold of ₪250,000, the gross profit is ₪150,000, a gross margin of 37.5%. The order of the lines matters: opening stock, add purchases, give goods available, subtract closing stock, give cost of goods sold.
The purchases figure is itself built from several lines. Transport on purchases, the cost of bringing the goods to the shop, is added, because it is part of what the goods cost. Purchase returns, goods sent back to a supplier, are subtracted. If the shop paid ₪3,000 to transport its stock and returned ₪8,000 of faulty goods, net purchases are the purchases plus ₪3,000 minus ₪8,000.
Purchases are not cost of goods sold
The most common mistake is to treat the year's purchases as its cost of goods sold. The shoe shop bought ₪260,000 of goods but sold goods costing ₪250,000: the ₪10,000 difference is exactly the rise in its stock, from ₪40,000 to ₪50,000. In a year when a shop builds up stock, purchases are larger than cost of goods sold; in a year when it runs stock down, they are smaller. The goods still on the shelf are not an expense yet: they are an asset, shown as inventory in the balance sheet.
Counting what is left and working out what was sold is the periodic method. Many shops also keep a running record of every item sold, through the scanner at the till. Even they count the shelves at least once a year, because goods break, go missing or are put in the wrong place, and the records slowly drift away from what is really there.
Why the stock count matters for two years
Because closing stock is subtracted, an error in counting it changes the profit. If the shop had counted ₪60,000 instead of ₪50,000, cost of goods sold would fall to ₪240,000 and gross profit would rise to ₪160,000. The error does not stay in one year: this year's closing stock is next year's opening stock. Next year, opening stock would be ₪10,000 too high, cost of goods sold ₪10,000 too high and gross profit ₪10,000 too low, ₪125,000 instead of ₪135,000.
Over the two years together the profit is the same, ₪285,000, but it is reported in the wrong years. That is why the year-end stock count is done carefully, often by two people, and why auditors attend it.
Practice: cost of goods sold
For 11th grade accounting students. Show each step of the calculation; all figures are on the sheet. Check the answers at the end.
Free, no sign-up. The answer key prints on the second page. Regenerating a new worksheet on the same topic needs a free account.
Write the formula for cost of goods sold and the formula for gross profit.
A kitchenware shop had opening stock of ₪25,000, purchases of ₪175,000 and closing stock of ₪30,000. Find its cost of goods sold.
The same shop also paid ₪3,000 to transport its purchases and returned goods worth ₪8,000 to a supplier. Find net purchases and the new cost of goods sold.
Using the original figures and sales of ₪260,000, complete the kitchenware shop's gross profit section.
The shoe shop bought ₪260,000 of goods but its cost of goods sold was ₪250,000. Explain the difference.
Instead, the shoe shop's closing stock was undercounted by ₪6,000 in year 1. Find the gross profit it would report in each year and in both together.
A business's cost of goods sold was ₪300,000, its opening stock ₪35,000 and its closing stock ₪45,000. How much did it purchase during the year?
Common questions
Is cost of goods sold an expense?
Yes. It is the expense of the goods that were sold in the period, and it is matched with the sales they produced. Goods bought but not yet sold are not an expense yet: they are inventory, an asset in the balance sheet.
Why is transport on purchases added to the cost of goods?
Because it is part of what it cost to get the goods into the shop, ready to sell. Transport to customers on sales is different: it is a selling expense, shown below the gross profit.
What if there is no closing stock count?
Then the closing stock has to be estimated, for example with the gross profit method, which works back from the usual gross margin. An estimate is a second best: a business is expected to count its stock at least once a year.
Does a manufacturer calculate cost of goods sold the same way?
In the same spirit, but its purchases are replaced by the cost of production: materials, labor and factory costs of the goods it made. The idea of opening stock plus additions minus closing stock stays the same.
How does closing stock affect the balance sheet?
Closing stock appears in the balance sheet as a current asset, inventory, at cost or at what it can be sold for, whichever is lower. The same figure that reduces cost of goods sold becomes an asset.

Still have a question? Ask Lessi
Any question about this subject. Lessi answers right here, step by step.
Try asking
Asking needs a free account; your question is kept while you sign up. Answers are written by AI and can contain mistakes. Lessi doesn’t give medical or legal advice.
Learn it with a teacher
Learn this topic live with Lessi
Lessi, the AI teacher, explains it out loud on a board, with short quizzes, at your pace. The first 60 minutes are free.