Cost of Goods Sold Is What Left the Shelf, Not What You Bought
Published 9/22/2026 · 3 min read · Business tools
Opening stock plus purchases minus closing stock. Forty thousand at the start, a hundred and twenty thousand bought, thirty-five thousand left at the end: 125,000 went out of the door. Notice that it exceeds the purchases. Five thousand of what was sold had been sitting in the warehouse since before the period began, so the cost of selling it belongs to this period even though the money left in a previous one. That is the entire point of the formula and the reason it cannot be replaced by the purchase ledger: buying is a cash event and selling is an accounting one, and they land in different months. A business that reads its purchases as its cost of sales reports a profit that swings with the timing of deliveries rather than with trade.
Opening stock 40,000, purchases 120,000, closing stock 35,000 — the cost of goods sold is 125,000, and it is larger than the purchases because the shelf gave up 5,000 of what was already there.
The formula counts everything that left, including what was never sold
It is a subtraction between two counts, so anything that disappeared without being sold is silently inside the answer: breakage, theft, samples, goods written off, units mis-scanned at the till. That is convenient for the accounts and misleading for management, because the same 125,000 could be a healthy trading period or a period with a thousand euros of loss buried in it. Reading the cost of sales next to a shrinkage figure is what separates the two — one number cannot do both jobs.
What counts as a purchase decides the answer
Freight in, import duty and the cost of getting goods to a saleable state belong in purchases; the cost of getting them to a customer does not. Put delivery to the customer in here and the gross margin falls while the operating costs look artificially lean — the total profit is unchanged and every ratio built on gross margin is wrong. Fix the boundary once, write it down, and apply it in every period, because the comparison between periods is worth more than the absolute figure in any one of them.
| Line | Amount |
|---|---|
| Opening stock | 40,000 |
| Purchases | + 120,000 |
| Closing stock | − 35,000 |
| Cost of goods sold | 125,000 |
Worked with our own calculator
Cost of goods sold (COGS) calculator
Given
- Beginning inventory
- $20,000.00
- Purchases
- $50,000.00
- Ending inventory
- $15,000.00
Result
- Cost of goods sold
- $55,000.00
These figures are produced by the calculator below, not typed in by hand — they are recomputed whenever the tool changes.
Run it on your own figures →Frequently asked questions
- Does a service business have a cost of goods sold?
- It has the equivalent, usually called cost of services or direct costs: the labour and materials consumed in delivering the work, as opposed to the overheads that would exist anyway. There is no stock, so the opening-and-closing arithmetic collapses and the figure is simply the direct costs of the period. The discipline that matters is the same one — what is direct and what is overhead has to be decided once and kept.
- Why is my closing stock also my next opening stock?
- Because nothing happens between the two moments — the shelf at midnight on the last day of a period is the same shelf a second later. That continuity is why an error in one count is an error in two periods with opposite signs: overstating the closing stock understates this period's cost of sales and overstates the next one's. A count that was wrong once is visible as a swing between two consecutive gross margins, which is often how it gets found.
Articles you may find interesting
All guides →Related tools
Sources
Spotted a mistake in this article?