In short: Sales history records what you shipped, so any period containing a stockout understates demand and the model retrains on the censored figure. That produces a loop: the forecast falls, the buffer falls with it, the item stocks out earlier, and the next observation is more censored than the last. Four recovery methods exist with different data requirements, and the sensible choice is the one your data supports rather than the most sophisticated one available. Every one of them needs to know which periods were censored, and most projects find their systems never recorded it.
There is a failure loop that runs quietly inside a lot of planning estates, and once you have seen it you notice it everywhere.
An item stocks out in week 12. Sales for that week record 340 units, because 340 is what was on the shelf. True demand was somewhere north of that, and nobody knows how far north. Week 12 goes into the history as a 340. The model retrains, sees a lower number than the surrounding weeks, and forecasts week 12 of next year a little lower. The buffer comes down. The item stocks out again, slightly earlier. That week records an even smaller number.
Three cycles of this and the item has been quietly demoted in the plan by its own stockouts. The forecast is wrong because the history is a record of supply, and you are treating it as a record of demand.
Statisticians call this right censoring. The observation is truncated at a boundary and all you know is that the true value was at least that large. It has a substantial literature in revenue management, where airlines have been correcting for it since the 1980s because a booking class that sells out tells you nothing about how many people wanted the seat. Supply chain adopted the problem and largely skipped the correction.
How much this costs
The revenue management work puts numbers on it that are worth borrowing. A negative bias in the forecast feeding a revenue management system has been estimated to cost up to three percent of potential revenue, with underestimating demand by twelve to twenty five percent hurting revenues by one to three percent on constrained flights.
Supply chain estimates are harder to state cleanly because the mechanism is different, but the direction is the same and the loop makes it self-reinforcing. The insidious part is that the metrics look fine while it happens. Forecast accuracy on that item may even improve, because the model has learned to predict a censored series accurately. You are getting better at forecasting your own stockouts.
The tell is a stable item whose forecast drifts down over several cycles without any commercial reason, combined with service levels that never quite recover. If you have items like that, check the stockout flags before you check the model.
Four ways to recover the missing demand
There is no single accepted general solution, and the literature says so directly. What exists is a set of techniques with different data requirements, and the sensible approach is to use the one your data supports rather than the most sophisticated one available.
Mask the censored periods. The cheapest option, and much better than doing nothing. Instead of feeding a censored week to the model as a low number, feed it as missing. The model then interpolates from the surrounding weeks rather than learning a false dip. This requires only a reliable stockout flag, and it needs care in feature engineering because your lag and rolling features have to be null-aware or they will propagate the gap in a different form.
It has an obvious limitation. Masking discards information rather than recovering it, so if a large share of periods are censored you are throwing away much of the series. As a first move on a catalogue that has never been corrected at all, it usually delivers most of the available benefit.
Impute with a truncated conditional mean. This is the Tobit approach, fitted by expectation maximisation. Assume demand is normally distributed around the model's expectation. For a censored week, you know demand was at least the observed sales, so the appropriate imputation is the expected value of the distribution conditional on being above that threshold, which for a normal is a closed-form expression involving the standard hazard. Impute, refit, re-impute, and iterate until the parameters stop moving.
This works well and it inherits the normality assumption, which is shaky for intermittent items. There is recent work extending exponential smoothing to censored data along the same lines that is worth reading if you want the fuller treatment.
Scale by how long the item was actually purchasable. If your point of sale or inventory system records when the on-hand hit zero, you know the item was buyable for only part of the period. Sales of 340 units over three of seven days implies a weekly rate closer to 790, and scaling by the reciprocal of the available fraction recovers it.
This is the most reliable method available and it depends entirely on having stockout timing rather than just a stockout flag. There is a well-known paper in this area whose title makes the argument outright, that stock-out timing is almost all you need for demand estimation under censoring. If your systems capture that timestamp, use this method and stop reading the alternatives. Cap the multiplier, because an item purchasable for four hours will otherwise produce a preposterous extrapolation from a single sale.
Borrow from comparable uncensored periods. When you have neither reliable timing nor a defensible parametric assumption, use peers. Take weeks in the same seasonal position where the item was in stock, take comparable items in the same category that were in stock during the censored week, and use the ratio between them to lift the censored observation. This is the Kaplan-Meier idea of redistributing the censored mass to the uncensored observations, applied to seasonal peer groups instead of survival times.
It is distribution-free and it fails when the peer group is badly chosen, which happens most often when a stockout was caused by something that hit the whole category at once. Check whether the peers were also constrained before trusting the lift.
The prerequisite nobody wants to talk about
All four methods need to know which periods were censored, and this is where most projects discover an unpleasant fact about their own data.
Daily on-hand snapshots are the minimum. Many businesses keep only current inventory and overwrite it, so the historical record of when things were out of stock does not exist and cannot be reconstructed. If that is your situation, start the snapshot capture today, because in twelve months you will have a corrected history and today you have none.
There are proxies while you wait. A run of consecutive zero-sales days on an item that normally sells every day is a strong signal, particularly in retail, though it produces false positives for genuinely intermittent items. Replenishment records showing a receipt immediately followed by a sales spike suggest the item was dry beforehand. A public dataset released in 2025 with annotated stockouts in fresh retail is worth looking at if you want to test a detection method before applying it to your own data.
One caution about partial availability. An item that is out of stock at forty of two hundred stores is censored at those forty and not at the other hundred and sixty. If your history is aggregated to a regional total before it reaches the planning system, the censoring is smeared across the aggregate and can no longer be corrected properly. This is a good reason to keep the correction as far upstream as you can, at the grain where the stockout actually happened.
What to expect when you turn it on
Two things happen, and the second one surprises people.
The corrected series is higher than the raw series, so forecasts rise and recommended buffers rise with them. That is the intended effect and it needs to be explained before it lands, because a planner who sees every recommendation jump will assume the system is broken.
The less obvious effect is on measured accuracy, which often gets worse. Your model was being scored against censored actuals. Now it is forecasting uncensored demand and being scored against a censored record, so it looks like it is over-forecasting. Score against corrected actuals for the comparison to be meaningful, and be very clear in reporting which basis a number is on. Mixing the two in one dashboard produces an argument that takes a month to resolve.
Run the correction on one high-service category first, ideally one with good stockout data, and compare the corrected forecast against the raw forecast on the periods that follow. The improvement usually shows up in service level rather than in accuracy, which is the right place to look for it.
Where the method runs out
Censoring correction estimates the demand you would have served if you had stock. It cannot estimate the demand that never arrived because a customer learned three months ago that you never have that item and stopped checking.
That second effect is real and it is not recoverable from your own transaction history by any method, because the customer is not in it. If you have chronic availability problems on a line, the corrected demand still understates the addressable demand, and closing that gap needs external data or a controlled availability experiment rather than a statistical fix.
There is also a substitution effect the correction ignores. When an item is out of stock, some of that demand went to a neighbouring item in your own range and shows up as a lift there. Correcting the censored item without allowing for the transfer double counts the volume. If you are running this alongside any assortment or cannibalisation work, model the two together, because independently they will disagree by exactly the amount that moved.
Start with the stockout data audit. Everything else here depends on it, and the audit is usually a day's work that tells you which of the four methods you are actually able to run.