Skip to content
stokrio
All guides
Planning

Stockouts and lost sales: how to measure them and why they poison your sales history

How to estimate the sales you lost while out of stock, how stockouts quietly lower future forecasts, and the metrics that show what availability is really costing you.

Stokrio Team · · 7 min read

A stockout has two costs. The obvious one is the sales you miss while the product is unavailable. The less obvious one shows up months later: your sales history now says the product sells less than it does, and every forecast, reorder point and seasonal plan built from that history inherits the error.

This guide covers how to estimate lost sales, how stockouts lock themselves into your planning, and how to measure availability in a way that reflects what it costs.

Key takeaways

  • Lost sales are invisible in a sales report. You have to estimate them from the rate of sale on in-stock days.
  • Use day-of-week patterns and variant-level data for better estimates; product-level averages miss stockouts of individual sizes or colours.
  • If stockout days count as zero-sales days, the forecast falls, the next order is smaller, and the stockout repeats. It doesn't correct itself.
  • A simple in-stock rate treats all products equally. Weight it by demand to see what availability is really costing you.
  • Back-in-stock requests and pre-orders are direct evidence of demand you'd otherwise lose. Record them.

Lost sales don't appear anywhere

A sales report shows what sold. When a product is out of stock, it shows nothing, and nothing looks the same whether nobody wanted the product or everybody did. Lost sales have to be estimated, and the basic estimate is straightforward:

lost units = rate of sale while in stock × days out of stock

Take a product that sells 12 units a day when available and was out of stock for 9 days. It sells for $45 with a 60% gross margin:

lost units   = 12 × 9 = 108
lost revenue = 108 × $45 = $4,860
lost margin  = $4,860 × 60% = $2,916

The margin figure is the one to put in front of whoever approves inventory budgets. It's the direct cost of not having enough stock, expressed in the same terms as the cost of holding too much.

These estimates are deliberately conservative in one way and generous in another. They don't count knock-on effects that are real but hard to measure — customers who don't come back, paid campaigns paused for a sold-out hero product, lower ranking on marketplaces. And they overstate the loss when customers simply bought a similar product instead (more on substitution below).

Better estimates

Use the day-of-week pattern

Demand isn't flat across the week. Suppose the same product sells 10 a day on weekdays and 16 on weekend days. The average day is:

(5 × 10 + 2 × 16) ÷ 7 = 82 ÷ 7 = 11.7 units

If the 9-day stockout ran from a Wednesday to the following Thursday, it covered 7 weekdays and 2 weekend days:

lost units = (7 × 10) + (2 × 16) = 70 + 32 = 102

The flat-average estimate would be 11.7 × 9 = 105. The difference is small here, but it grows for products with strong weekly patterns or stockouts that fall mostly on peak days.

Measure at variant level

A product can be "in stock" while its best-selling variant isn't. A t-shirt sells 20 units a day across four sizes, with the following typical shares:

SizeSMLXL
Share of sales20%35%30%15%

If size M is out for 10 days, the product-level report shows the t-shirt still selling — 65% of 20, or 13 a day. Nobody notices a stockout. But size M lost:

20 × 35% × 10 days = 70 units

This is why lost-sales estimates, stockout flags and forecasts all need to work at the variant level — the level you buy.

Treat partial days carefully

If a product sells out at 2pm, the day's sales understate demand, but not by a whole day. You can count it as a stockout day (simple, slightly overestimates lost time) or as a fraction of a day if you know when it sold out. Some planners also treat very low stock as effectively out: with only a single size left, a product often sells far below its normal rate.

Account for substitution

If customers who wanted the sold-out product bought a similar one instead, the business didn't lose those sales — but the substitute's history is now inflated. Two adjustments follow: lost sales for the business are smaller than the simple estimate, and the substitute's sales during the stockout shouldn't be treated as its normal demand. You won't be able to measure substitution precisely; looking at whether similar products spiked during the stockout is a reasonable check.

How stockouts poison your history

Here's the part that costs the most over time. Suppose a product's true demand is a steady 10 units a day. You plan by taking the last 30 days of sales and dividing by 30, and you order a month's supply at a time.

In month 1 you were out of stock for 6 days:

units sold     = 10 × 24 = 240
naive velocity = 240 ÷ 30 = 8 per day

So you order 30 days at 8 per day: 240 units. Those last 240 ÷ 10 = 24 days. You're out of stock for 6 days again. You sell 240 units, calculate a velocity of 8 per day, and order 240 again.

The process never corrects itself. It settles at a velocity of 8 against true demand of 10, losing 60 units — 20% of demand — every month, with nothing in the sales report to show it. Each month's data confirms the last month's mistake.

Add safety stock and the loop softens; add a seasonal peak and it gets worse, because the understated peak becomes next year's seasonal index. The fix is to stop counting stockout days as zero demand:

adjusted velocity = units sold ÷ days in stock = 240 ÷ 24 = 10 per day

Our earlier guide to stockout-adjusted velocity covers this adjustment in more detail. More sophisticated forecasting methods do the same thing by treating stockout days as missing data rather than zeros; Stokrio's demand forecasting excludes out-of-stock days from demand history for exactly this reason, so a sell-out doesn't teach the forecast to buy less.

All of this depends on knowing which days were stockout days. That means recording stock levels every day. If you're not doing that yet, it's the most valuable data you can start collecting today.

Measuring availability properly

The usual availability metric is the in-stock rate:

in-stock rate = product-days in stock ÷ total product-days

It's easy to calculate and treats every product equally — which is its weakness. Consider three products over 30 days:

ProductDemand per dayDays out of stockDays in stockLost units
A50327150
B5151575
C10300

The simple in-stock rate is:

(27 + 15 + 30) ÷ 90 = 72 ÷ 90 = 80%

Now weight by demand. Expected demand over the period was 1,500 + 150 + 30 = 1,680 units, and 150 + 75 = 225 were lost:

demand-weighted availability = (1,680 − 225) ÷ 1,680 = 1,455 ÷ 1,680 = 86.6%

The two numbers tell different stories. The simple rate is dragged down by product B, a slow seller out for half the month. The weighted rate shows that most of the lost units — 150 of 225 — came from product A's three days out. If you're deciding where to spend effort and inventory budget, the weighted view points you to product A. Report both, but manage to the weighted one.

Stokrio's inventory reports include in-stock rate alongside stockout risk, and replenishment shows revenue at risk if an order is placed late — the forward-looking version of the lost-sales estimate above.

Capture the demand you can see

Some lost demand is directly observable:

  • Back-in-stock requests. Every sign-up is a customer who wanted the product while it was unavailable. The count is a lower bound on lost demand — many customers leave without signing up — but it's a real number, not an estimate.
  • Pre-orders and backorders. If you keep selling while out of stock and ship later, the demand is recorded as an order. That keeps your history clean as well as the sale.
  • Site search for sold-out products. Searches and product page views during a stockout are a useful relative signal of interest, even if they don't convert directly into units.

A practical routine

  1. Record daily stock levels per variant.
  2. Every month, list variants with stockout days, estimate lost units and margin, and rank them.
  3. Adjust the history used for forecasting so stockout days count as missing, not zero.
  4. Report demand-weighted availability alongside the simple in-stock rate.
  5. For the top lost-margin variants, find the cause: forecast too low, lead time longer than planned, an order placed late, or a supplier that shipped short.

The last step matters most. Lost sales are a symptom. The causes are usually few, and fixable.

Frequently asked questions

How do I calculate lost sales from a stockout?
Multiply the product's normal rate of sale on in-stock days by the number of days it was out of stock. Using day-of-week patterns and variant-level rates gives a more accurate estimate, and the result can be converted to lost revenue and margin.
Why do stockouts make future forecasts too low?
If stockout days are counted as days with zero sales, the average rate of sale falls. Orders based on that lower rate run out sooner, causing further stockouts that keep the measured rate low, so the error persists.
What is a good way to measure product availability?
Report the simple in-stock rate, but manage to a demand-weighted availability that counts lost units relative to expected demand. That shows where stockouts are actually costing sales rather than treating every product equally.
Do back-in-stock sign-ups measure lost demand?
They are direct evidence of demand during a stockout, but only a lower bound, since many customers leave without signing up. Use them alongside estimates based on the normal rate of sale.

See Stokrio with your own data

Create a workspace in minutes. Connect Shopify or start with the API.