Key takeaways
- Recorded sales are the smaller of demand and the stock on the shelf; on a day the shelf runs empty, the rest of the demand leaves no trace.
- Forecasts trained on such sales under-predict demand, and the error is largest in the fresh categories that sell out most often.
- The error feeds itself: a lower forecast means a smaller order, an earlier stock-out and an even lower record.
- Store managers make the same mistake by hand when they cut an order after a stock-out.
- Treat empty-shelf days as missing or as a floor, and check that the stock record behind the flag is right.
A till records what was sold, not what was wanted. When the yoghurt runs out at three in the afternoon, the day's record stops at whatever was on the shelf, and the customers who came in the evening leave nothing behind. Statisticians call such data censored. Most replenishment in store chains is built on it, and the error it introduces does not stay put.
1. Sales are demand capped by stock
Write the day's demand as D and the stock available as I. The till sees y = min(D, I): all of the demand on a day the shelf holds out, and exactly the stock on a day it does not. The lost part, D − y, is never recorded. An average of sales over 28 days therefore mixes two kinds of day, and the days that ran out pull it down. The same happens to the spread of sales, which is the other input to safety stock. Finding those days is the first step; the out-of-stocks guide shows how to spot them in sales and stock data.
2. How much a day hides
The clearest public measurement comes from FreshRetailNet-50K, a dataset released in 2025 by the Chinese online grocer Dingdong: hourly sales of 863 perishable products at 898 sites in 18 cities, with every hour flagged when the product was out of stock1. The sites are small fresh-food warehouses that deliver within 30 minutes, which the paper calls stores. After the 6 AM restock, stock-outs fell below 2%; from there they climbed steadily to 26% by 8 PM.
On sale at 06:00, after the restock98Still on sale at 20:0074
A product that sells out in the afternoon still shows sales for the day, so a daily report counts it as in stock. Its record is short by whatever the evening would have sold. Across the dataset, recovering the hidden demand removed a systematic underestimate of 7.37%1. A 2026 study on the same data broke the censoring down by category2:
| Category | Store-hours out of stock | Forecast error, trained on sales | Forecast error, censoring-aware | Simulated waste cut |
|---|---|---|---|---|
| Leafy vegetables | Store-hours out of stock31.2% | Forecast error, trained on sales42.8% | Forecast error, censoring-aware38.9% | Simulated waste cut4.7 points |
| Fish and seafood | Store-hours out of stock27.6% | Forecast error, trained on sales41.5% | Forecast error, censoring-aware38.0% | Simulated waste cut4.2 points |
| Fruit | Store-hours out of stock21.4% | Forecast error, trained on sales39.4% | Forecast error, censoring-aware36.9% | Simulated waste cut3.4 points |
| Meat | Store-hours out of stock19.8% | Forecast error, trained on sales38.3% | Forecast error, censoring-aware36.2% | Simulated waste cut3.0 points |
| Root vegetables | Store-hours out of stock17.3% | Forecast error, trained on sales37.6% | Forecast error, censoring-aware35.8% | Simulated waste cut2.6 points |
| Dairy | Store-hours out of stock8.9% | Forecast error, trained on sales35.2% | Forecast error, censoring-aware34.4% | Simulated waste cut1.4 points |
The pattern is monotonic: the more often a category runs out, the more a sales-trained forecast misses and the more a censoring-aware one recovers. Dairy, with long shelf life and few empty hours, barely moves.
3. The model learns the shelf
Any model asked to reproduce sales will reproduce the cap along with them. Yin, Zheng and Kong put it plainly: "Every model trained to reproduce sales under-predicts demand by roughly eight percent"2. When they hid more of the peak hours, from a tenth to half, the bias of a strong sales-trained model grew from −4.2% to −21.1%. Their model treats an hour that ran out as a floor, not as the demand: demand was at least what sold. In their simulation, ordering from it cut modelled waste from 9.8% to 6.4% while the share of demand served rose from 92.9% to 94.7%2. Less waste and better availability at once is what correcting a bias looks like; a model that merely ordered more would have traded one for the other.
4. The spiral
Over time the bias grows, because the forecast sets the next order and the order sets the next record:
The shelf empties in the afternoonSales stop at what was on it
The day goes into the history as a weak dayThe evening's demand is not in it
The forecast learns the lower number
The next order is smaller
The shelf empties earlierand the record falls again
Pedregal, Trapero and Holgado de Frutos tested this on a product series from the M5 dataset of Walmart sales, censoring it at the stock an ordering policy would have held3. With a target of 70%, a standard exponential smoothing forecast tracked demand for five weeks, until the first stock-outs; after one bad week, "ETS never recovers from that bad forecast", because each short order produced the next short record. Their Tobit variant, which reads a sold-out day as a lower bound, held its course. At a target of 80% of order cycles without a stock-out:
Standard exponential smoothing
Tobit exponential smoothing
Same series, same target
People do it too. In an upmarket supermarket chain whose store managers could edit the system's order proposals for perishables, a 2026 study found that after a stock-out managers were more likely to cut the proposal, as if the empty shelf had shown that the product sells less, and that these cuts made the next stock-out more likely4. Blocking the downward edits that followed a stock-out reduced such self-inflicted stock-outs at a reasonable inventory cost4.
5. When the flag itself is wrong
Spotting an empty shelf in the data depends on the stock record, and the record can be wrong in the direction that hides it. When the system shows units the shelf does not have, sales stop, nothing triggers an order, and the day looks like a day of no demand rather than a stock-out. In a study of about 24,000 products in 11 stores of a large European grocer, a full stock count raised sales across the store by 11%, and all of that lift came from products whose record had shown more stock than the shelf5. On those products the effect was 2.67 times the store average. Censoring and record errors are one problem seen from two sides: both turn missing stock into apparently missing demand.
6. What to do with empty-shelf days
- Flag every store-product day that closed with no stock, and every run of zero sales while the record still shows stock.
- Leave flagged days out of the average and the spread of sales, or treat them as a floor, as Tobit and similar models do. Never as a day of zero or low demand.
- For fresh products, keep the hour the shelf emptied. A day that ran out at 14:00 lost far more than one that ran out at 20:00.
- Do not cut an order because last week's sales were low if the shelf was empty for part of it.
- Count products that show stock but have stopped selling, so the flags themselves can be trusted.
The corrected average then feeds the reorder point and the safety stock as usual.
7. Limitations
FreshRetailNet-50K comes from an online grocer's delivery sites in China, not from walk-in stores, and its paper is a preprint. The category table and the waste figures come from simulations on that data with demand rebuilt under assumptions. The spiral numbers are from the preprint of the published paper and rest on one product series. The manager study is cited from its abstract, and the stock-count study from one retailer. None of them measures a European store chain's lost sales directly, which no till can do.
How marql handles it
In Retail-Bench, the open simulation marql built to test replenishment policies, every estimator reads a day that ended with an empty shelf at the level of the days that did not, whether it is the textbook formula, the manual rule or marql's engine6. The simulation knows the true demand behind each sale, so it can measure what the empty shelves cost, which a real chain can only estimate.
Sources
- Wang, Y., Gu, J., Long, L. et al. (2025). FreshRetailNet-50K: a stockout-annotated censored demand dataset for latent demand recovery and forecasting in fresh retail. arXiv:2505.16319, preprint. arxiv.org
- Yin, C., Zheng, Y. and Kong, Z. (2026). Demand hidden by stockouts: censored demand recovery and green waste-reduction forecasting for sustainable fresh-food consumption under emerging-market urbanization. Sustainability, 18(15), 7642. doi.org
- Pedregal, D. J., Trapero, J. R. and Holgado de Frutos, E. (2025). Tobit exponential smoothing, towards an enhanced demand planning in the presence of censored data. International Journal of Production Research. Figures from the preprint, arXiv:2407.17920. doi.org
- Özdemir, B. and Tenhiälä, A. (2026). Discretion in automated supermarket replenishment: censorship bias and self-inflicted stockouts. Manufacturing & Service Operations Management. doi.org
- Rekik, Y., Oliva, R., Syntetos, A. and Glock, C. H. (2026). Inventory record inaccuracy in grocery retailing: impact of promotions and product perishability, and targeted effect of audits. Journal of Business Logistics. doi.org
- MARQL Retail-Bench (2026). Methodology, equation 2. retail-bench.marql.one
TopicsCensored demand, Lost sales, Demand forecasting, Store replenishment