How to calculate stockout cost and revenue at risk
How to calculate stockout cost and revenue at risk per product: forecast demand until the restock, minus sellable stock, times the price excl. VAT.
Revenue at risk is the value of forecast demand that sellable stock cannot meet before the next restock lands, at today’s price. It is the measurable core of stockout cost: an estimate of exposure, not a loss you have already booked.
I worked it through for six example products, with every formula shown, then rolled the result up by category, brand and price band.
What is stockout cost?
Stockout cost is what a business gives up while a product is out of stock, measured in four ways that answer different questions. The four are not additive, and the first two you can calculate today for every product.
| Measure of stockout impact | What it measures | How you get it |
|---|---|---|
| Revenue at risk | Forecast sales exposed until the restock | Units at risk × price |
| Gross profit at risk | Profit on those same exposed units | Units at risk × gross profit per unit |
| Ad spend on empty products | Clicks that cannot become orders | Ad spend while stock is zero |
| Customer effects | Shoppers who switch shop for good | Repeat purchase data, where tracked |
Don’t add revenue at risk and gross profit at risk together. Gross profit at risk values the same units, so it is an alternative view, and the sum counts each sale twice.
Past lost sales look backwards instead: estimated unmet demand during past stockouts, against an in-stock baseline adjusted for season and promotions. The section on demand during a stockout shows how to build that baseline.
A stockout doesn’t lose every exposed sale. Some shoppers wait, some buy a substitute from you, and some leave.
How do you calculate revenue at risk?
Revenue at risk = units at risk × current selling price excl. VAT, where units at risk = max(0, forecast demand until the restock − sellable stock available before it lands). Each input has one precise meaning:
- Forecast demand is unconstrained demand in units from today until the restock lands.
- Sellable stock is units you can ship, not reserved, damaged or quarantined. Count a purchase order only when its date and quantity are firm.
- Price is the current selling price after any discount, excluding VAT.
With one restock and steady demand, the same result is forecast weekly demand × the uncovered weeks, from the projected stockout date to the restock. Cover is sellable units ÷ weekly demand.
Counting from the stockout date matters: a product with three weeks of stock and a restock in six weeks is exposed for three weeks, not six.
For 40 a week, 6 weeks and 120 sellable units, max(0, 40 × 6 − 120) and 40 × 3 uncovered weeks both give 120 units. When deliveries arrive in stages, project stock week by week instead.

Show the dataHide the data
| End of week | Projected stock | Cumulative demand with no stock |
|---|---|---|
| Week 0 | 120 | 0 |
| Week 1 | 80 | 0 |
| Week 2 | 40 | 0 |
| Week 3 | 0 | 0 |
| Week 4 | 0 | 40 |
| Week 5 | 0 | 80 |
| Week 6 | 0 | 120 |
Worked example: six products
The road shoe sells 40 pairs a week, has 120 on hand and a restock in 6 weeks, so 120 pairs × €139.99 = €16,798.80 is at risk. The other five products follow the same rule.
| Product | Sellable stock | Demand a week | Weeks to restock | Cover (weeks) | Units at risk | Price excl. VAT |
|---|---|---|---|---|---|---|
| Road shoe | 120 | 40 | 6 | 3 | 120 | €139.99 |
| Trail shoe | 30 | 15 | 4 | 2 | 30 | €159.99 |
| Running socks 3-pack | 200 | 50 | 8 | 4 | 200 | €24.99 |
| Rain jacket | 0 | 10 | 3 | 0 | 30 | €89.99 |
| Race cap | 300 | 20 | 5 | 15 | 0 | €34.99 |
| Recovery shoe | 400 | 25 | 6 | 16 | 0 | €99.99 |
Illustrative data.
Four of the six are scarce. The rain jacket is already out, so its full three weeks to the restock count; weeks it was out before today are past sales, not exposure.

Show the dataHide the data
| Product | Revenue at risk |
|---|---|
| Road shoe | €16,798.80 |
| Running socks 3-pack | €4,998.00 |
| Trail shoe | €4,799.70 |
| Rain jacket | €2,699.70 |
| Race cap | €0.00 |
| Recovery shoe | €0.00 |
The total is €29,296.20 over the next eight weeks; a faster restock or a substitute sale lowers it.
Roll it up by category, brand and price band
Sum the product totals within each group. By category, running shoes hold €21,598.50 and apparel and accessories €7,697.70.

Show the dataHide the data
| Brand | Revenue at risk |
|---|---|
| Northpeak | €21,796.80 |
| Riverline | €7,499.40 |
By price band, the order depends on units as much as on price. The cheapest product, the socks, puts the under-€50 band ahead of the band with the rain jacket.

Show the dataHide the data
| Price band | Revenue at risk |
|---|---|
| €100 and over | €21,598.50 |
| Under €50 | €4,998.00 |
| €50 to €99.99 | €2,699.70 |
Why you never multiply total units by an average price
Multiplying aggregate units by an average price overstates revenue at risk whenever cheap products make up most of the units.
The four scarce products put 380 units at risk, 200 of them socks at €24.99.

Show the dataHide the data
| Method | Revenue at risk |
|---|---|
| Sum per product | €29,296.20 |
| Total units × average price | €39,421.20 |
Their unweighted average price is €103.74, so the shortcut prices every sock like a shoe. Summing per product is the only total that matches the roll-ups.
- Forecast weekly demandPer product, in units, from the weeks it had stock on hand.
- Find the scarce productsCover is sellable units ÷ weekly demand. A product is scarce when its cover is shorter than the weeks until its restock lands.
- Count the uncovered weeksWeeks until restock − weeks of cover. That is the gap between running out and the restock.
- Price the exposed unitsForecast weekly demand × uncovered weeks × current selling price excl. VAT, after any discount.
- Roll up by summingAdd the product totals within each category, brand and price band.
How is revenue at risk different from profit at risk and lost sales?
Revenue at risk measures sales exposed before a restock; gross profit at risk, lost sales, stockout rate and carrying cost each answer a different question.
| Metric | Formula | What it answers |
|---|---|---|
| Revenue at risk | Units at risk × price | How much in sales is exposed, not yet lost, before the restock? |
| Gross profit at risk | Units at risk × gross profit per unit | How much profit is exposed? |
| Lost sales | Estimated unmet demand during past stockouts, against an in-stock baseline | What did past stockouts cost? |
| Stockout rate | Orders not filled ÷ all orders | How often were products unavailable? |
| Carrying cost | Stock value at cost × yearly holding rate | What does keeping the buffer cost? |
Gross profit per unit is price excl. VAT − unit cost, on the same discount and returns basis as the price, with ad spend left out. As a share of price, it is the gross margin. Profit at risk can rank products differently from revenue at risk.

Show the dataHide the data
| Product | Revenue at risk | Gross profit at risk |
|---|---|---|
| Road shoe | €16,798.80 | €8,398.80 |
| Running socks 3-pack | €4,998.00 | €2,598.00 |
| Trail shoe | €4,799.70 | €2,999.70 |
| Rain jacket | €2,699.70 | €1,499.70 |
Across the four products, gross profit at risk is €15,496.20, against €29,296.20 of revenue. A trail shoe with a €99.99 margin per pair matters more than its revenue suggests.
Carrying cost pulls the other way.
More safety stock shrinks revenue at risk but ties up capital, which is why excess inventory and GMROI, gross profit relative to stock at cost, belong in the same review.
Doing this by hand means a forecast, a cover figure and a restock date for every product, refreshed each week.
For a shop with hundreds of products, a spreadsheet goes stale before it is finished.
How do you estimate demand during a stockout?
Estimate demand during a stockout from the weeks the product was in stock, not from its sales while it was out.
Sales during a stockout are censored: they show what you could ship, not what shoppers wanted.

Show the dataHide the data
| Week | Units sold |
|---|---|
| Week 1 | 9 |
| Week 2 | 11 |
| Week 3 | 10 |
| Week 4 | 12 |
| Week 5 | 8 |
| Week 6 | 10 |
| Week 7 | 0 |
| Week 8 | 0 |
The rain jacket sold 60 units in its six in-stock weeks: 10 a week. Averaging all eight weeks gives 7.5, which would put 22.5 units at risk instead of 30.
My method has three parts. Take the average weekly sales over recent weeks with stock on hand.
Then adjust it for the season the gap falls in, and leave out weeks with a promotion you won’t repeat.
Give the estimate a range
Report revenue at risk as a low, central and high case, because the forecast is the least certain input. Vary forecast weekly demand only, and hold sellable stock and the restock date fixed.

Show the dataHide the data
| Forecast demand | Units at risk |
|---|---|
| Low, 32 a week | 72 |
| Central, 40 a week | 120 |
| High, 48 a week | 168 |
The range widens for a reason: stock on hand covers the first weeks whatever demand does, so all the forecast error lands on the uncovered weeks.
For the road shoe, revenue at risk runs from €10,079.28 to €23,518.32 around €16,798.80.
What should you do about products at risk?
Products at risk need replenishment first and lower ad priority second; products already out of stock need their ads paused until the restock lands.
| Product | Status | Action | Ad priority |
|---|---|---|---|
| Road shoe | 3 weeks of cover, restock in 6 | Bring the restock forward if the supplier can | Lower |
| Trail shoe | 2 weeks of cover, restock in 4 | Bring the restock forward if the supplier can | Lower |
| Running socks 3-pack | 4 weeks of cover, restock in 8 | Order earlier next time | Lower |
| Rain jacket | Out of stock, restock in 3 | Wait for the restock | Paused |
| Race cap, recovery shoe | More cover than wait | Reorder on the usual date | Keep |
Illustrative data.
Lower the priority of a scarce product so paid clicks don’t bring the stockout forward.
When demand already exceeds the stock that arrives before the restock, extra clicks sell no extra units; they only empty the shelf sooner.
Prevention starts at the reorder point: demand during the lead time plus safety stock. Products with high inventory turnover reach it fastest, so check them first.
Inventory Insights in Product Metrics works out a reorder date per product from lead time, safety buffer and projected demand.
It shows stock cover and flags stock risk, with revenue at risk reported per product and rolled up by category, brand and price range.
When a product runs out, its stock label in Google Merchant Center, which you approve, drops to paused. It returns when the restock lands, and your campaign settings stay yours.
Final thoughts
Revenue at risk only counts the weeks the shelf is empty, so the restock date matters as much as the forecast.
Start with your ten best sellers. For each, divide stock by weekly demand and compare it with the weeks until the next delivery.
Any product with less cover than wait goes on the list, priced at its demand × the gap × its price.
For the products that sit rather than run out, see dead stock inventory. To weigh both risks against profit for every product, see ecommerce inventory planning.
Keep reading.
Ecommerce inventory planning: replenish, hold or promote
Ecommerce inventory planning per product: read GMROI, excess capital and revenue at risk together to decide what to replenish, hold, promote or deprioritise.
Dead stock inventory: what it is and how to get rid of it
Dead stock inventory is stock with no sale for months. How to find it, what it costs on the shelf and in Shopping ads, and how to clear it.
Dropshipping profit margin after ads, refunds and returns
Dropshipping profit margin after ads, refunds and returns: vendor margin claims, a 100-order example, EU return rules and break-even ROAS.
Frequently asked questions.
How does lead time affect revenue at risk?
What does a stockout rate tell you?
How often should you recalculate revenue at risk?
See which of your products to push, fix or pause. Start with your own products, or a 30-second estimate.
See stock cover, slow movers and revenue at risk per product in Inventory Insights. Then see where all your products stand.
Questions, or want to spar about your products? Book a demo: a video call with Berend, then a demo account.