Skip to content
lesslater

Guides Forecasting

Stockout days in the sales history and how to clean them out

When a product is out of stock, sales look lower than demand was. How to calculate the real sales and estimate the lost sales.

Updated 8 November 2026 · 2 min read

A product that was out of stock for half the month has sold about half as much as it could have. If you use those sales directly in the forecast, the next order will be too small, the product runs out again, and it can go on like that.

Calculate sales per day in stock

The solution is to calculate sales per day on which the product was actually in stock, not per calendar day.

A product sold 30 units in September but was only in stock on 12 of 30 days:

Per calendar day Per day in stock
Sales per day 30 / 30 = 1.0 30 / 12 = 2.5
Sales per month 30 units 75 units

The cleaned demand is therefore 75 units a month, more than twice what the sales show.

It requires stock history

To clean the data, you need to know which days the product was in stock. The webshop usually only shows the current stock, so the history has to be saved daily. If you do not have it, you can get some of the way by looking at days without sales on a product that otherwise sells every day, but this is uncertain for products that sell rarely.

Pitfalls

  • The days just before the product runs out. When there are only a few units or a few sizes left, the product sells less. These days can also usefully be left out.
  • The days just after the product arrives. Customers who have been waiting buy straight away, so sales can look higher than usual. This typically evens out over a month.
  • Variants. If a jumper is sold out in M but not in L, clean per variant and not per product.
  • Very short periods. If the product was only in stock for two days, 2.5 units per day is an uncertain figure. It is probably better to combine the period with the previous month.

Estimate the lost sales

When you know sales per day in stock, you can also estimate what the stockout days have cost:

Lost sales = stockout days × sales per day in stock

In the example the product was out of stock for 18 days. That gives 18 × 2.5 = 45 units. Multiply by the margin per unit and you get an amount in DKK, which is often a stronger argument for changing purchasing than a percentage.

It is an estimate. Some customers buy a different product instead, and then the sale is not lost for the shop. But it shows where the problem is greatest.

Stockout days in lesslater

lesslater saves the stock for each product every day and only counts the days the product was in stock when calculating sales per month. The analysis shows lost sales and lost margin on out-of-stock products.

See your own products in lesslater

Create an account and connect your webshop. The first 14 days are free, and no credit card is needed. If you would rather go through it on your own data with us, book a demo.

No credit card · No commitment · Data in the EU