Stockout cost calculator — what a shortage really costs
Work out what a stockout really costs: lost contribution margin, expedite freight and goodwill per event, annualised against your fill rate.
Free · no signup · runs in your browser·Updated
Short answer
Stockout cost per event is lost contribution margin plus expedite cost plus goodwill cost: multiply the units you could not supply by the share of demand lost outright and by margin per unit, then add expedite and service-recovery costs. At 720 units short, 45% lost and $14.50 margin, one event costs $6,548.
A stockout has no invoice, so it rarely shows up in a variance report. That is why buffers get cut first: the carrying cost of inventory is visible on a spreadsheet and the cost of not having it is not. This calculator puts a number on the invisible side.
Enter how much demand you miss during a typical shortage, how much of it walks, and what the recovery costs. You get stockout cost per event, annual cost, the fill rate those shortages imply, and what one point of fill rate is worth.
That last figure is the one worth writing down. It converts a service-level argument into a cash number, which is the only form in which a buffer increase gets approved.
Your numbers
Result
Annual cost of stockouts
$58,932
$6,548 per event × 9 events a year
Cost per stockout event$6,548
Units short per year6,480
Unit fill rate implied85.6%
Cost per unit short$9.09
Value of one fill-rate point$4,093
Share of annual contribution lost9.0%
Lost margin$4,698
Expedite$1,250
Goodwill and admin$600
Units short/event = 180 units/day × 4 days = 720
Lost outright = 720 × 45% = 324 units (396 backordered)
Lost margin = 324 × $14.50 = $4,698
Cost/event = $4,698 + $1,250 + $600 = $6,548
Annual = $6,548 × 9 events = $58,932
85.6% unit fill means you are out of stock on 14.4% of selling days and losing $58,932 a year. At this level the cause is rarely the buffer size — check lead-time accuracy, forecast bias and whether the reorder point is being honoured at all.
Everything is computed in your browser. Nothing you type is sent anywhere or stored.
The formula
Cost per stockout = (Units short × Lost-sale share × Contribution margin) + Expedite cost + Goodwill cost; Annual cost = Cost per stockout × Stockout events per year
Units short
Average daily demand × days out of stock. The demand you could not supply from stock.
Lost-sale share
Percentage of that demand the customer buys elsewhere. The remainder is backordered and still ships.
Contribution margin
Selling price minus variable cost per unit. Not gross revenue, and not full-absorption margin.
Expedite cost
Air freight premium, partial-truck penalty, overtime on a rush build — charged once per event.
Goodwill cost
Credits issued, extra order handling, the apology call. Once per event, not per unit.
Backordered units keep their margin but still generate expedite and goodwill cost, which is why those two sit per event rather than per unit. Only the units lost outright forfeit margin.
Worked example
Average daily demand
180 units
Days out of stock per event
4
Contribution margin per unit
$14.50
Demand lost outright
45%
Expedite cost per event
$1,250
Goodwill and admin per event
$600
Stockout events per year
9
Result
$6,548 per event · $58,932 a year · 85.6% unit fill rate
180 units × 4 days = 720 units short per event. 45% of those are lost outright, so 324 units × $14.50 = $4,698 of forfeited margin. Add $1,250 expedite and $600 goodwill and one event costs $6,548. Nine events a year is $58,932, against 45,000 units of annual demand — a unit fill rate of 85.6%. Each point of fill rate recovered is worth about $4,092.
What belongs in a stockout cost
Four components, in descending order of how confidently you can measure them. Include the ones you can defend and leave the rest at zero — an understated number that survives scrutiny beats a large one that gets argued away.
Cost component
How to size it
Common mistake
Lost margin
Units not supplied × share lost outright × contribution margin per unit
Using revenue rather than contribution margin, which triples the answer
Expedite
Air freight premium over normal mode, partial-truck penalty, overtime on a rush build
Booking it to freight expense and never linking it back to the shortage that caused it
Goodwill and admin
Credits issued, extra order handling, the call the account manager has to make
Leaving it at zero because it is hard to measure, which is not the same as being zero
Churn
Only where a customer demonstrably left, priced at their annual contribution
Applying a churn charge to every event, which inflates the total past believability
Build the cost from components you can evidence. Churn belongs in a footnote, not in the headline.
Not every unit short is a lost sale
The lost-sale share is the input that moves the answer most, and it is the one people guess hardest. For a consumable with three substitutes on the same shelf it is close to 100%. For a specified spare part with a six-week alternative it is closer to 5% — the customer waits, and you pay the expedite instead.
Look at backorder history. The share of stockout lines that later shipped versus the share cancelled is the number, already in your ERP.
Split by customer type. Contract customers wait. Spot and web customers do not.
Watch the substitution effect. If the sale moves to another of your own items at a similar margin, the loss is the margin difference, not the whole margin.
Be honest about repeat demand. A missed monthly reorder from a regular account is usually deferred, not destroyed.
Using the result to size a buffer
Stockout cost is one half of the safety-stock trade-off; carrying cost is the other. Once you know a fill-rate point is worth $4,092 and your carrying rate is 22%, you can work out the service level where the two curves cross rather than picking 95% because it sounds respectable. Run the buffer through the safety stock calculator and price the holding side with the inventory carrying cost calculator.
The inputs are the hard part. Days out of stock per item, backorder-to-cancellation ratios and margin by item live in three different places in most ERPs. With ERPray you ask for them — "items with a zero on-hand day in the last quarter, with backordered and cancelled units for each" — and the query is shown underneath so you can check the definition before you build a business case on it.
Frequently asked questions
How do you calculate the cost of a stockout?
Multiply the units of demand you could not supply by the share lost outright and by contribution margin per unit, then add expedite and goodwill costs for the event. Multiply by the number of stockout events per year for an annual figure. Contribution margin, not revenue, is the correct rate — the units were never made or bought.
What is a reasonable cost of a lost sale?
The contribution margin on that unit, plus any recovery cost you actually spend. Some teams add a multiplier for future business lost, which is defensible only where you can show customers leaving. A multiplier applied to every event makes the total easy to dismiss, which defeats the purpose of calculating it.
Should stockout cost include lost customer lifetime value?
Only for customers who actually left, priced at their annual contribution and named in the calculation. Blanket lifetime-value charges are the fastest way to lose a finance audience. Keep churn as a separate, evidenced line beneath the headline number rather than folding it into the per-event cost.
How is stockout cost different from carrying cost?
Carrying cost is what you pay to hold inventory: capital, storage, insurance, obsolescence, usually 18–28% of inventory value a year. Stockout cost is what you pay for not holding it. Optimal safety stock sits where one more unit of buffer costs more to carry than the shortage risk it removes.
How do I estimate days out of stock per event?
Count days where on-hand hit zero while demand existed, then divide by the number of distinct stockout events. If your ERP does not keep daily on-hand history, use the replenishment lead time as a ceiling — a shortage rarely lasts longer than one expedited resupply cycle.
Does a backorder count as a stockout?
Yes, for service measurement. The line failed to ship from stock, so it counts against line and unit fill rate. Financially it is cheaper than a cancellation: you keep the margin and pay the expedite. That is why the lost-sale share and the per-event recovery costs are entered separately here.
This calculator needs you to find the inputs first. ERPray pulls them from your own ERP account and computes the answer live — with the exact query shown so you can check it.