Inventory how-to
How to calculate lost sales from stockouts
Estimate lost sales by multiplying your pre-stockout daily sales rate by the number of days you were out of stock.
Short answer: Estimate lost sales by multiplying your pre-stockout daily sales rate by the number of days you were out of stock. This gives you an estimate, not an exact figure, since you cannot know what demand would have been without running an experiment.
Why this matters
Stockouts cost you more than the obvious missed order. Customers who find an item out of stock may buy elsewhere and not come back for that SKU again. Tracking the estimated cost helps you decide which SKUs deserve tighter safety stock and which suppliers need shorter lead times.
The basic formula
Lost sales estimate = average daily sales before the stockout x number of days out of stock. Use a clean period before the stockout started, ideally the 28 days right before stock hit zero, so seasonal spikes or one-off promotions do not distort the number.
Adjust for demand you can see
If customers kept visiting the product page or adding to cart during the stockout, your real demand was probably close to your pre-stockout rate. If traffic to that product also dropped, demand may have shifted elsewhere and your estimate should be treated as a ceiling, not a guarantee.
Turn it into a decision
Once you have a lost sales estimate per SKU, compare it to the cost of holding more safety stock. If lost sales are consistently higher than the cost of a few extra days of inventory, raise the safety days for that SKU with that supplier.
Step by step
- Pull daily sales for the 28 days before the stockout started for the SKU.
- Calculate the average daily sales rate from that period.
- Count the number of days the SKU showed zero available stock.
- Multiply average daily sales by days out of stock to get the lost sales estimate in units.
- Multiply by your selling price to get a rough revenue figure.
- Check if product page traffic dropped during the stockout; if not, treat the estimate as fairly reliable.
- Compare the lost sales estimate to your holding cost and consider raising safety days for that SKU.
Worked example
Suppose a candle SKU sold 60 units over the 28 days before it stocked out, so the daily average is 60 / 28 = 2.14 units per day. It was out of stock for 10 days. Lost sales estimate = 2.14 x 10 = 21.4 units, call it 21 units. At a selling price of $18, that is about $378 in estimated lost revenue for that stockout.
How SteadyShelf helps
SteadyShelf does not calculate lost sales directly, it is not built for that. What it does is use your sales history to forecast demand and set an order-by date per SKU so you reorder before you hit zero, which reduces how often you need to run this calculation at all. You would still do the lost sales math manually using your own sales reports.
$29/month flat, unlimited products and suppliers, 30-day free trial. Run the numbers now with the free reorder point calculator.
SteadyShelf is launching on the Shopify App Store. Join early access to get the install link first.
Related guides
- How to calculate safety stock with variable demand
- How to calculate safety stock with variable lead times
- How to calculate sell through rate
- How to calculate lead time demand
All inventory how-to guides ยท Inventory glossary
FAQ
Should I use the sales rate from right before the stockout or an average over a longer period?
Use the shorter, more recent window, like 28 days before the stockout, unless that period was unusually busy or quiet. A longer average can smooth out a real demand shift and give you a less accurate picture of what you actually lost.
Does a stockout on one variant affect sales of other variants I should account for?
It can, if customers substitute a different size or color instead of leaving. Check whether other variants of the same product saw a sales bump during the stockout window; if so, your true lost sales figure for the whole product is lower than the single variant estimate suggests.
Let SteadyShelf do this math for every SKU
Order-by dates per supplier, seasonal forecasts and draft POs for your Shopify store. $29/month after a 30-day free trial.
Get early access