Three weeks without its best seller costs a drink-mix company roughly $89,000 to $125,000 under these assumptions, about $112,000 in the central case, while borrowing to pay for the order on time would have cost about $3,000. The company and its figures are a constructed case: it does $12 million a year and its best seller is lemon; priced at full revenue, the lost sales come to $188,460, a number that overstates the loss in one way and misses part of it in another.
A stockout is a stretch when customers want a product and a channel has none to sell. Stockout cost is what that gap takes out of the business. On a best seller, a stockout is often a cash problem, and the cash to prevent it costs a small fraction of the stockout. Here the order went out five weeks late because the deposit was waiting on a wholesale chain's payment.
What is a stockout?
The listing shows "sold out" on the store, goes unavailable on Amazon, or a wholesale purchase order ships short. A product can be out on one channel and in stock on another, so count stockouts by product and by channel. Some start in the records, when the system shows units that are not on the shelf, which is what inventory accuracy measures.
Unlike a backorder, where the customer orders and waits, a stockout sends customers in three directions: some come back when the product returns, some buy another of your products, and the rest buy elsewhere. Stockout rate and fill rate, covered in the guide to inventory KPIs, say how often this happens. Stockout cost says what each one was worth.
Why a lost sale never appears in the accounts
A lost sale is not in the accounting records at all. No order was placed, so there is no revenue, no cost of goods and no fee to record. The income statement shows a month with lower sales than the plan, and nothing that says why.
The costs that follow a stockout are recorded, but under other names. The ads that kept running sit in marketing expense. Air freight is usually added to the landed cost of those units, though a CPA may expense an unusual rush premium in the month it is paid. A subscriber who cancelled simply stops showing up in next quarter's revenue. Nothing is tagged "stockout".
The stockout cost formula
The honest formula for a consumer brand has two parts: the margin on the sales that were lost, and the costs the stockout added.
Stockout cost = (lost units × contribution margin per unit) + ad spend that ran without sales + recovery costs + margin lost on customers who left for good
Lost units
Start with demand during the gap: what the product would have sold per week in that channel, times the weeks it was out. Use the weeks just before the stockout, with promotions and one-off spikes taken out. The guide to ecommerce demand forecasting shows how to clean a run rate the same way.
Then subtract the sales that were not lost: customers who bought when the product returned, often measurable from back-in-stock signups, and customers who bought another of your products instead, visible as a lift in those products during the gap. What is left are the lost units.
Contribution margin per unit, not revenue
Price each lost unit at what it would have put in your pocket after the costs of selling it. Contribution margin per unit is the price after discounts and before sales tax, less landed cost, payment or marketplace fees, pick-and-pack and shipping, expected returns and buyer deductions, and the ad spend tied to the sale. The comparison of contribution margin and gross margin explains why gross margin is the wrong measure here. In many brands' books gross margin is price less landed cost; some put fees and shipping in cost of sales, so check which yours does. Either way it leaves out the ads, one of a consumer brand's largest costs per order.
Ad spend that ran without sales
Contribution margin already subtracts the ads a sale would have needed. Ads that kept running during the stockout bought no sale, so that spend is added on top. That is not double counting: with stock, the sale would have earned its margin after the ads; without it, nothing was earned and the ads were still paid for.
The knock-on costs of a stockout by channel
Shopify and your own store
On your own store, the visible cost is paid traffic landing on a sold-out page. Ad campaigns often keep running after a product sells out, and a few days of spend on a best seller adds up fast.
Amazon
On Amazon, the shopper does not wait. Another listing is one click away, so a larger share of Amazon demand is lost outright than on your own store. The gap on Amazon usually starts earlier and ends later too, because stock that lands at your warehouse still has to be shipped in and checked in before it sells. Sellers also commonly see a listing that went out of stock come back lower in search than before, with sales slower to return than the stock. Many brands spend extra on ads for several weeks after a restock to climb back, and that spend above the normal budget is part of the stockout's cost.
Wholesale
A wholesale purchase order that ships short loses the margin on the missing units, and many buyers cancel the remainder rather than wait. Some large buyers' vendor agreements include fines for short or late shipments, so read the agreement before assuming a short shipment costs only the margin.
The larger wholesale cost is the hardest to price: the buyer's confidence. A chain or store that was shorted may order less next time, cut the shelf space, or bring in a second brand. That cost is a judgment, so list it next to the total rather than inside it.
Subscribers and repeat customers
A subscription box that cannot ship is a skipped month at best. Some subscribers swap, some skip, and some cancel, taking every future box with them. Repeat customers who find a substitute they like may not come back either. Customer lifetime value, measured in margin rather than revenue, is the starting point for pricing that loss. Count only cancellations above the normal rate, because some of those subscribers would have left anyway.
Expedited freight
To shorten the gap, many brands air-freight part of the next order. The premium over ocean freight is a cost of the stockout, wherever it is recorded.
A worked example: three weeks out of the best seller
The company in this example is made up, and every figure is illustrative. It sells electrolyte drink mix, $36 for a box of 30 sticks on its Shopify store and on Amazon, about $12 million a year in sales. Its best seller, lemon, is about a third of that. Shopify customers can subscribe for a box a month at 15 percent off, and a regional grocery chain of 140 stores buys lemon at the $18 wholesale price, about 3,600 units every six weeks. Each box lands at the brand's warehouse at $7.50.
The figures are built so each sum can be checked. Amazon's fees in particular are a placeholder; your own settlement reports give your real figure.
Step 1: contribution margin per unit by channel
| Per box of lemon | Shopify, one-time | Shopify, subscription | Amazon | Wholesale |
|---|---|---|---|---|
| Price | $36.00 | $30.60 | $36.00 | $18.00 |
| Landed cost | $7.50 | $7.50 | $7.50 | $7.50 |
| Payment or marketplace fees | $1.10 | $0.95 | $11.20 | $0.00 |
| Shipping (to customer, to Amazon, or to the chain's warehouse) | $6.40 | $6.40 | $0.60 | $0.70 |
| Ad spend per unit | $8.00 | $0.00 | $5.30 | $0.00 |
| Contribution margin | $13.00 | $15.75 | $11.40 | $9.80 |
Returns and the chain's deductions are left at zero here to keep the sums simple; many chains take promotional and damage deductions off their payments, and those come off this margin too.
Step 2: lost units and lost margin
In the six normal weeks before the stockout, lemon sold 900 one-time boxes a week on Shopify, 800 a week on Amazon, and about 300 subscription boxes fell due each week. The chain's purchase order for 3,600 units arrived the week lemon ran out, and the company shipped the 1,200 it had left; the chain cancelled the other 2,400 rather than wait.
On Shopify, 30 percent of the would-be lemon buyers bought another flavor and 10 percent bought lemon after the back-in-stock email, so 40 percent of the demand was not lost. On Amazon, only 10 percent bought another of the brand's flavors. Of the 900 subscription boxes due, 600 subscribers swapped to another flavor and 300 skipped.
| Channel | Demand in the three weeks | Sold anyway | Lost units | Margin per unit | Lost margin |
|---|---|---|---|---|---|
| Shopify, one-time | 2,700 | 1,080 | 1,620 | $13.00 | $21,060 |
| Shopify, subscription | 900 | 600 | 300 | $15.75 | $4,725 |
| Amazon | 2,400 | 240 | 2,160 | $11.40 | $24,624 |
| Wholesale | 3,600 | 1,200 | 2,400 | $9.80 | $23,520 |
| Total | 9,600 | 3,120 | 6,480 | $73,929 |
Those 6,480 lost units would have brought in $188,460 of revenue, the number most teams would quote. Priced at gross margin, taken here as price less landed cost, they come to $139,860. Priced at contribution margin, the lost sales cost $73,929, less than 40 percent of the revenue figure.
Step 3: add the knock-on costs
The brand's Meta campaigns for lemon ran for eight days before anyone paused them, and $7,800 of spend sent shoppers to a sold-out page. Some of this traffic bought another flavor, so not every dollar was wasted. Of the 300 subscribers who skipped, 90 cancelled in the month after. Lemon subscribers normally cancel at about 12 percent a month, so about 36 of those 300 would have left that month anyway; only the 54 above that are counted. At that normal rate a subscriber stays about eight more months, so each extra cancellation cost about eight boxes at $15.75.
On Amazon, the listing came back lower in search than before the stockout, and the company spent $3,500 a week above its normal budget for four weeks to win back its position. The purchase order went out five weeks late, so by ocean lemon would have been out for about five weeks; the company air-freighted 5,000 units of the order at $1.90 a box more than ocean to cut the gap to three.
| Stockout cost, line by line | Hard cost or estimate | Amount |
|---|---|---|
| Lost margin on sales, four channels (Step 2) | Estimate | $73,929 |
| Extra subscriber cancellations: 54 × 8 boxes × $15.75 | Estimate | $6,804 |
| Meta ads that ran to a sold-out page | Cash paid; how much was wasted is an estimate | $7,800 |
| Extra Amazon ads to recover search position: 4 weeks × $3,500 | Spent; how much the stockout caused is a judgment | $14,000 |
| Air-freight premium: 5,000 boxes × $1.90 | Hard cost | $9,500 |
| Total stockout cost | $112,033 |
Three lines are cash that left the bank, $31,300 between them: the Meta ads, the Amazon recovery ads and the air-freight premium. Only the freight premium is wholly a cost of the stockout; how much of the Meta spend was wasted and how much of the Amazon spend the stockout caused are judgments. The lost margin and the cancellations are estimates built on switch rates and a churn baseline, so replace them with your own numbers first. None of the lines is labelled as a stockout anywhere in the accounts.
Because most of the total is estimated, the honest answer is a range. The low case assumes more shoppers bought anyway (55 percent on Shopify one-time orders, 25 percent on Amazon), half the extra cancellations had other causes, 40 percent of the Meta traffic bought another flavor, and the stockout caused half the Amazon recovery spend. The high case assumes fewer bought anyway (25 percent on Shopify one-time orders, none on Amazon), all 90 cancellations were caused by the stockout, and all of both ad lines was wasted. The central case, like the high case, counts both ad lines in full; only the low case trims them.
| Estimated line | Low | Central | High |
|---|---|---|---|
| Lost margin on sales | $64,560 | $73,929 | $81,930 |
| Extra subscriber cancellations | $3,402 | $6,804 | $11,340 |
| Meta ads wasted | $4,680 | $7,800 | $7,800 |
| Amazon recovery ads caused by the stockout | $7,000 | $14,000 | $14,000 |
| Air-freight premium | $9,500 | $9,500 | $9,500 |
| Total | $89,142 | $112,033 | $124,570 |
One cost is left out of the total on purpose, and it may turn out to be the largest. The chain's agreement carried no fine for short shipments, but its buyer cut the next order from 3,600 units to 3,000 and asked about a second supplier. That is $5,880 less margin on one order (600 units × $9.80). If the smaller order becomes the new normal, it is about $51,000 over a year of orders. Whether it does is not yet known, so it sits beside the total.
Why a stockout is often a cash problem
Stockouts tend to get filed under planning. Here, the planning was fine. The company knew in February that lemon needed a 20,000-unit order, $150,000 at landed cost, and it knew when.
What it did not have was the cash at the right moment. The chain was on 60-day terms and owed $64,800 for its last order, the bank balance was close to the floor the CEO had set, and the order waited for the chain to pay. That wait became the stockout.
Growing brands can hit this repeatedly: cash sits in slow stock, unpaid wholesale invoices and the last order's deposit, and the best seller's next order waits behind it. A 13-week cash flow forecast shows these collisions weeks ahead, and tracing how orders turn into cash shows which payments can move. The question for the CEO or COO is what it is worth paying to get that order out on time.
What the cash to avoid it would have cost
The other side of the comparison is the cost of the cash it would have taken to get the order out on time. Moving the order five weeks earlier moves every payment on it five weeks earlier, the deposit, the balance, freight and duty, so the company needed about $150,000 five weeks sooner. On a line of credit at 12 percent interest with a 1 percent draw fee, the terms used in the guide to the cost of capital for ecommerce, five weeks of interest is about $1,726 and the fee is $1,500, about $3,226 in all. An advance costs more, because its fee is fixed when it is drawn. At the 1.10 factor in that guide, $150,000 carries a $15,000 fee whether the money is needed for five weeks or five months, and it is repaid out of every day's sales.
| Ways to fund the lemon order five weeks sooner | Cost |
|---|---|
| Line of credit, 12% interest plus 1% draw fee, 35 days | about $3,226 |
| Advance at the 1.10 factor in that guide (the fee does not shrink if repaid early) | about $15,000 |
| Stockout the company paid instead | $89,142 to $124,570 ($112,033 central) |
Both cost a fraction of the stockout, even at the low end of its range. The catch is timing: a line of credit has to be in place before the deposit is due, so arrange it while the need is still a line in the cash forecast. Any cash that sits in stock instead has its own price, which the guide to inventory carrying cost breaks down.
Which products get the cash first
Every company has a fixed amount of working capital, and when it runs short, the question is which purchase order gets paid first. One way to rank them: for each product, set the margin lost in a week without it against the cash that a week of its stock ties up. The drink-mix company ran the comparison on three products.
| Product | Units a week, all channels | Share of demand that still sells (later, or as another of its products) | Margin lost per week out | Cash tied up in a week of its stock, at landed cost | Margin at risk per $1,000 of cash |
|---|---|---|---|---|---|
| Lemon | 2,600 | about a third | $24,643 | $19,500 | $1,264 |
| Watermelon (summer flavor) | 200 | 60% | $960 | $1,500 | $640 |
| Gift sampler box | 50 | 70% | $300 | $1,200 | $250 |
Lemon's weekly figure is the $73,929 of lost margin from Step 2 divided by three, before any knock-on cost, and it runs above 2,600 units because the chain's whole order fell inside the three weeks. Watermelon earns about $12 a box across its channels and the sampler about $20, at a landed cost of $24.
A dollar spent on lemon's purchase order protects five times the margin of a dollar spent on the sampler's. Most sampler buyers would buy a single flavor if it were gone. Watermelon sits between them, with a cash risk of its own: stock left over in September sells slowly for months, and some may end up as dead stock that has to be written down or written off.
Three things move a product up this list:
- A low switch rate. Buyers who leave rather than switch make every week out lost margin.
- Channels with long memories. Amazon, subscribers and wholesale buyers cost more than the week's sales.
- Cash that comes back fast. A weekly seller's stock sells through quickly and its cash returns on each channel's payout dates, as factory deposit to payout traces; a seasonal one can leave the cash on the shelf until next year.
When a wholesale payment runs late or the bank balance nears its floor, the products at the top of the list get their purchase orders paid first and their financing arranged ahead of time. The products at the bottom wait, and the company accepts they may sell out for a stretch. The 13-week cash flow forecast shows when each of those payments falls due. For lemon, the stockout cost roughly $89,000 to $125,000 against about $3,000 of borrowing, and the fix was arranging the money before the deposit was due.
FAQ
What is a stockout in ecommerce?
A stockout is a stretch when a product has no sellable units in a channel while customers still want to buy it. The product page shows sold out, the marketplace listing goes unavailable, or a wholesale order ships short. Unlike a backorder, where the customer orders and waits, much of the demand during a stockout goes to substitutes or competitors.
How do you calculate stockout cost?
Multiply the lost units by contribution margin per unit, then add the ad spend that ran without sales, recovery costs such as extra ads and expedited freight, and the margin lost on customers who left above the normal rate. Lost units are demand during the gap, less customers who bought later or switched to another of your products.
Is it cheaper to fund the order on time or risk a stockout?
For a best seller, funding it on time is usually far cheaper. In the illustrative example above, borrowing to pay for the order five weeks sooner would have cost about $3,226 on a line of credit, against a stockout of roughly $89,000 to $125,000. A factor-rate advance costs more, because its fee is fixed, but still a fraction of the stockout.



