A stock-out costs you the sales you could have made between the day the shelf empties and the day new stock arrives. Nothing more mysterious than that. The hard part is that you only notice the cost after it has happened, when the order you should have placed three weeks ago would already be here.
You can work it out in advance, per product, with three numbers you already have: how many you sell a day, how many you have, and how long your supplier takes.
The sum
Take a product that sells 3 a day. You have 20 in stock, it sells for £40, and your supplier takes 21 days from order to delivery.
- Your 20 units last 20 ÷ 3 = 6.7 days.
- If you order today, the new stock lands on day 21.
- Between day 6.7 and day 21 you have nothing to sell: 14.3 days.
- 14.3 days × 3 a day = 43 sales you cannot make.
- 43 × £40 = £1,720.
That £1,720 is what happens if you order today and nothing else changes. Had you ordered a week ago, it would be close to zero. The number tells you which products need an order now, and puts a price on waiting.
Stock already on order changes the answer
The first thing a store owner says when shown a figure like this is "but I have an order coming". They are right to, and a figure that ignores it will lose their trust the first time they spot a product that is already covered.
So count stock on order, but only for what it actually covers. Say you placed an order for 30 units last week and the supplier says it lands on day 10:
- Your 20 units run out on day 6.7. You are out of stock until day 10: 3.3 days, or 10 lost sales.
- The 30 units arrive and last another 10 days, to day 20.
- A new order placed today still lands on day 21, so there is one more empty day: 3 lost sales.
- 13 lost sales × £40 = £520, not £1,720.
If that same order were due on day 25, after a new order could arrive, it does not help with this gap at all, and the answer goes back to £1,720. An order only counts if it arrives in time.
Past stock-outs make best sellers look slow
Most spreadsheets get this part wrong. You sold 120 of a product over the last 60 days, so you divide by 60 and get 2 a day. But the product was out of stock for 20 of those 60 days. Nobody could buy it. It actually sold 120 in 40 days, which is 3 a day.
Use the 2-a-day figure in the example above and you get 22 lost sales instead of 43. You would under-order, run out again, and the next 60-day average would look even slower. Each stock-out makes the next one more likely.
The fix is to divide by the days the product was actually on sale. Shopify does not keep a history of stock levels, so this needs stock-outs recorded as they happen. If you track it by hand, a note of the date a product hit zero and the date it came back is enough.
What this does not tell you
Lost sales are an estimate, and an honest one has limits. Some customers will wait or buy a different variant, so not every lost sale is lost revenue. Price is the retail price, not your margin, so £1,720 of sales might be £700 of profit. And a sales rate from the last 60 days assumes the next three weeks look like the last two months, which a promotion or a season can break.
The figure still earns its place as a ranking. The products at the top of the list are the ones where waiting costs the most, so work through them in that order.

Doing this for every product
For one product this takes a minute. For 200 it is an afternoon, and it is out of date the next day. This is the job Replenishly does each night: it reads the last 60 days of paid orders, corrects each product's sales rate for the days it was out of stock, uses each supplier's own lead time, subtracts stock already on order that arrives in time, and multiplies by the price.
Every product in the list shows its working, in the same plain numbers as the example above, so you can check any figure against Shopify before you act on it. Products that would have run out but are covered by an order are listed separately, with the order that covers them.

Then the next step is the order itself, which Replenishly builds in your supplier's own spreadsheet layout. For the other side of the problem, stock you have too much of, see how much cash is sitting in your slow stock.