Skip to content
OneKitly

Cost of Goods Sold Is What Left the Shelf, Not What You Bought

Published 9/22/2026 · 3 min read · Business tools

Camille Laurent

Camille Laurent — Finance writer at OneKitly

Tax · Personal finance

Checked against 2 sources

View profile →
In short

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.

Three inputs, one figure
LineAmount
Opening stock40,000
Purchases+ 120,000
Closing stock− 35,000
Cost of goods sold125,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 →
ExplainerThe Count Says 48,200 and the Books Say 50,000A gap of 1,800 is a shrinkage rate of 3.6 %. The percentage is the number that travels; the absolute figure is the one that pays for the fix.ComparisonFIFO vs LIFO: What Actually Changes, and What Does NotFIFO and LIFO are assumptions about which cost you attach to a sale, not about which box leaves the warehouse. Worked through identical purchases and sales, they move cost of sales, inventory, profit and tax — but operating cash before tax is identical to the cent.ExplainerFour Points of Service Level Cost 41 % More StockGoing from a 95 % service level to 99 % raises the z-score from 1.645 to 2.326 and the safety stock from 346 units to 488. The last few points of availability are the expensive ones.ExplainerA 30 % Sell-Through Is Excellent or Alarming, and the Missing Word Is "When"120 units sold out of 400 received is 30 %. Whether that is a success depends entirely on how long it took, and the rate on its own does not carry the answer.ExplainerContribution Margin, and the Break-Even That Actually MattersGross margin nets off cost of goods sold; contribution margin nets off only the costs that vary with the unit. The gap decides your break-even, your operating leverage, and how much extra volume a price cut really needs.ExplainerThe Reorder Point Is a Quantity That Answers a Question About TimeSelling 100 a day with a ten-day lead time and 300 units of safety stock, you reorder at 1,300 — not because 1,300 is a comfortable level, but because that is what ten days of selling costs.

Related tools

Sources

Spotted a mistake in this article?