---
title: "How to calculate stockout cost and revenue at risk"
description: "How to calculate stockout cost and revenue at risk per product: forecast demand until the restock, minus sellable stock, times the price excl. VAT."
canonical: "https://www.productmetrics.io/blog/stockout-cost-ecommerce"
pageType: article
language: en
publisher: "Product Metrics"
author: "Berend Vrakking"
datePublished: 2026-10-25
dateModified: 2026-10-25
image: "https://www.productmetrics.io/og/blog/stockout-cost-ecommerce.png"
---

> Content index: https://www.productmetrics.io/llms.txt

# How to calculate stockout cost and revenue at risk

## Key takeaways

- Only the uncovered weeks count: 120 pairs selling 40 a week with a restock in 6 weeks leave 120 pairs, €16,798.80, exposed. Never add gross profit at risk on top.
- In the worked example, four scarce products put €29,296.20 at risk. Total units × their average price overstates that by €10,125.00.
- When stock covers half the wait, a 20% error in forecast demand moves units at risk by 40%, so report a low and a high case.

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](#how-do-you-estimate-demand-during-a-stockout) shows how to build that baseline.

A [stockout](https://www.productmetrics.io/glossary/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.

**Figure: Road shoe: projected stock and unmet demand (units) until the restock lands.** The 120 pairs on hand last three weeks at 40 a week. The restock lands in week 6, so demand in weeks 4 to 6, 120 pairs, has no stock to meet it.

![Line chart for an illustrative road shoe: stock falls from 120 to 0 by week 3 at 40 a week, then unmet demand climbs to 120 units before the week 6 restock.](https://www.productmetrics.io/images/blog/stockout-cost-ecommerce/stock-runs-out.png)

| 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 |

_Source: Calculated from 120 units on hand, forecast demand of 40 a week and a restock in 6 weeks. Illustrative data_

### 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.

**Figure: Revenue at risk per product (€) until each restock lands.** The road shoe carries €16,798.80 of the €29,296.20 total. The race cap and recovery shoe have more cover than wait, so nothing of theirs is at risk.

![Bar chart of illustrative revenue at risk per product: road shoe €16,798.80, socks €4,998.00, trail shoe €4,799.70, rain jacket €2,699.70, two products €0.](https://www.productmetrics.io/images/blog/stockout-cost-ecommerce/revenue-at-risk-by-product.png)

| 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 |

_Source: Calculated as units at risk × current price excl. VAT. Illustrative data_

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.

**Figure: Revenue at risk by brand (€), summed per product.** Northpeak carries 74% of the exposure, almost all of it from one road shoe, although Riverline has four of the six products.

![Bar chart of illustrative revenue at risk by brand, summed per product: Northpeak €21,796.80 and Riverline €7,499.40, out of €29,296.20 in total.](https://www.productmetrics.io/images/blog/stockout-cost-ecommerce/revenue-at-risk-by-brand.png)

| Brand | Revenue at risk |
| --- | --- |
| Northpeak | €21,796.80 |
| Riverline | €7,499.40 |

_Source: Sum of product-level revenue at risk. Illustrative data_

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.

**Figure: Revenue at risk by price band (€), summed per product.** Products priced €100 and over hold €21,598.50 of the exposure. The socks put the under-€50 band second, ahead of the €50 to €99.99 band.

![Bar chart of illustrative revenue at risk by price band: €21,598.50 for €100 and over, €4,998.00 under €50 and €2,699.70 for €50 to €99.99.](https://www.productmetrics.io/images/blog/stockout-cost-ecommerce/revenue-at-risk-by-price-band.png)

| Price band | Revenue at risk |
| --- | --- |
| €100 and over | €21,598.50 |
| Under €50 | €4,998.00 |
| €50 to €99.99 | €2,699.70 |

_Source: Sum of product-level revenue at risk; bands by current price excl. VAT. Illustrative data_

### 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.

**Figure: Two ways to total revenue at risk (€) for the same 380 units.** Multiplying total units by the average price gives €39,421.20, €10,125.00 too high, because the 200 cheapest units get the price of a shoe.

![Bar chart comparing two totals for 380 illustrative units at risk: €29,296.20 summed per product against €39,421.20 from total units times an average price.](https://www.productmetrics.io/images/blog/stockout-cost-ecommerce/sum-vs-average-price.png)

| Method | Revenue at risk |
| --- | --- |
| Sum per product | €29,296.20 |
| Total units × average price | €39,421.20 |

_Source: Per product: Σ units at risk × price. Shortcut: 380 units × €103.74 unweighted average price of the four scarce products. Illustrative data_

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.

**Work out revenue at risk in five steps**

1. **Forecast weekly demand.** Per product, in units, from the weeks it had stock on hand.
2. **Find the scarce products.** Cover is sellable units ÷ weekly demand. A product is scarce when its cover is shorter than the weeks until its restock lands.
3. **Count the uncovered weeks.** Weeks until restock − weeks of cover. That is the gap between running out and the restock.
4. **Price the exposed units.** Forecast weekly demand × uncovered weeks × current selling price excl. VAT, after any discount.
5. **Roll up by summing.** Add 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](https://www.productmetrics.io/glossary/gross-margin). Profit at risk can rank products differently from revenue at risk.

**Figure: Revenue at risk against gross profit at risk per product (€).** The socks put more revenue at risk than the trail shoe, but the trail shoe puts more gross profit at risk: €2,999.70 against €2,598.00.

![Bar chart of illustrative revenue and gross profit at risk: road shoe €16,798.80 and €8,398.80, socks €4,998.00 and €2,598.00, trail shoe €4,799.70 and €2,999.70.](https://www.productmetrics.io/images/blog/stockout-cost-ecommerce/revenue-vs-profit-at-risk.png)

| 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 |

_Source: Gross profit at risk = units at risk × (price excl. VAT − unit cost). Illustrative data_

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](https://www.productmetrics.io/glossary/safety-stock) shrinks revenue at risk but ties up capital, which is why [excess inventory](https://www.productmetrics.io/glossary/excess-inventory) and [GMROI](https://www.productmetrics.io/glossary/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.

> **Turn your stock into revenue.** See which products to push and which hold you back, segmented on your own data. [Analyse your products for free](https://app.productmetrics.io/) Log in with Google, no credit card.

## 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.

**Figure: Rain jacket: weekly units sold, with two weeks out of stock.** The jacket sold 10 a week while it was in stock. Averaging all eight weeks, the two empty ones included, gives 7.5 and understates demand by 25%.

![Line chart of illustrative weekly rain jacket sales: 8 to 12 units in weeks 1 to 6, then 0 in weeks 7 and 8 while out of stock, against an in-stock rate of 10.](https://www.productmetrics.io/images/blog/stockout-cost-ecommerce/censored-sales.png)

| 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 |

Reference line: In-stock weekly rate (10).

_Source: Illustrative data_

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.

**Figure: Road shoe: units at risk at low, central and high forecast demand.** Forecast demand 20% lower or higher moves units at risk from 120 to 72 or 168: 40% either way, because the 120 pairs on hand absorb the first weeks.

![Bar chart of illustrative road shoe units at risk by forecast demand: 72 at 32 a week, 120 at 40 a week and 168 at 48 a week, with 120 on hand and a 6-week restock.](https://www.productmetrics.io/images/blog/stockout-cost-ecommerce/demand-range.png)

| Forecast demand | Units at risk |
| --- | --- |
| Low, 32 a week | 72 |
| Central, 40 a week | 120 |
| High, 48 a week | 168 |

_Source: Calculated as weekly demand × 6 weeks − 120 units on hand. Illustrative data_

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](https://www.productmetrics.io/glossary/reorder-point): demand during the [lead time](https://www.productmetrics.io/glossary/lead-time) plus safety stock. Products with high [inventory turnover](https://www.productmetrics.io/glossary/inventory-turnover) reach it fastest, so check them first.

[Inventory Insights](https://www.productmetrics.io/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](https://www.productmetrics.io/blog/dead-stock-inventory). To weigh both risks against profit for every product, see [ecommerce inventory planning](https://www.productmetrics.io/blog/ecommerce-inventory-planning).

## Frequently asked questions

### How does lead time affect revenue at risk?

Lead time sets the weeks until restock. For an order already placed, count the weeks until it lands; with no order placed, count the weeks until you order plus the supplier's lead time. Each week of delay adds one more week of demand × price: €5,599.60 for the road shoe in the example.

### What does a stockout rate tell you?

A stockout rate tells you how often products were unavailable, as orders you could not fill ÷ all orders or days out of stock ÷ days in the period. It doesn't say how much revenue was exposed: a 5% rate on a best seller can cost more than 20% on a slow product, so read it next to revenue at risk.

### How often should you recalculate revenue at risk?

Recalculate each time stock, the demand forecast or a purchase order changes, and before a big promotion. For a promotion, use the promoted forecast: for a scarce product, every extra unit of demand before the restock adds a unit at risk.

## Keep reading.

- [Ecommerce inventory planning: replenish, hold or promote](https://www.productmetrics.io/blog/ecommerce-inventory-planning)
- [Dead stock inventory: what it is and how to get rid of it](https://www.productmetrics.io/blog/dead-stock-inventory)
- [Dropshipping profit margin after ads, refunds and returns](https://www.productmetrics.io/blog/dropshipping-profit-margin-after-returns)

---

Written by Berend Vrakking, founder of Product Metrics. Last updated 2026-10-25.

HTML version: https://www.productmetrics.io/blog/stockout-cost-ecommerce
