Sales and demand forecasting tells you how much you'll sell in the coming weeks, as a range you can plan stock and cash on. Every forecast is backtested before you rely on it, by forecasting your most recent weeks blind and scoring the result against what sold.
Last reviewed
Forecast backtest, example
Over 12 held-back weeks, the model was out by 4.0% and the seasonal baseline by 8.4%
Example data
Actual 6,390Forecast 6,720Seasonal baseline 5,780
Outside the 80% band: 4,120 on 16 Aug, above it. 4,050 on 30 Aug, below it.
80% prediction interval, ±4.0% in week 1 widening to ±8.4% by week 12
Model
4.0%mean absolute percentage error
Seasonal baseline
8.4%
Seasonal baseline: the same week last year, unadjusted
Actuals inside the 80% band
10 of 12
Example data: weekly units for an invented shop, all products. The model was trained on weeks up to 9 August 2026 and never saw the 12 weeks after it. Error is mean absolute percentage error: each week's gap between actual and forecast as a share of actual, averaged over the 12 weeks.Show the numbers
Forecast backtest, weekly units, example data
Week ending
Actual
Forecast
Band low
Band high
Seasonal baseline
21 Jun
3,840
28 Jun
3,910
5 Jul
3,780
12 Jul
3,960
19 Jul
4,050
26 Jul
3,990
2 Aug
4,130
9 Aug
4,070
16 Aug
4,120
3,950
3,790
4,110
3,880
23 Aug
4,310
4,180
4,000
4,360
3,950
30 Aug
4,050
4,290
4,080
4,500
3,790
6 Sep
4,480
4,300
4,080
4,520
4,090
13 Sep
4,620
4,510
4,260
4,760
4,210
20 Sep
4,390
4,600
4,320
4,880
4,030
27 Sep
4,710
4,580
4,290
4,870
4,310
4 Oct
4,880
5,050
4,710
5,390
4,420
11 Oct
5,240
5,010
4,650
5,370
4,760
18 Oct
5,610
5,390
4,980
5,800
5,120
25 Oct
6,020
5,760
5,300
6,220
5,480
1 Nov
6,390
6,720
6,160
7,280
5,780
What a sales forecast should fix
The forecast is one numberThere's no measure of whether it's good to 2% or 20%, so buying adds a safety margin and finance adds another.
Last peak, we bought for a guessStock was ordered against an untested forecast, and the surplus went out at a discount in January.
The tool gives a number and no historyA predictive analytics tool gives next month's sales, with no record of how far off it was last quarter.
Finance and buying have their own forecastsTwo spreadsheets carry two growth assumptions, and neither team recorded which came closer.
What a demand forecasting project hands over
The backtest reportIt sets actual against forecast over the held-back weeks, with the error for the model and for the seasonal baseline, as in the exhibit.
The weekly forecastYou get the next 13 weeks by product range, each with its 80% band, refreshed every Monday in your warehouse.
The planning rulesStock is planned on the upper band so a strong week doesn't sell you out, and cash on the lower band so a weak week doesn't leave a bill unpaid. The cash side goes next to the actuals on a finance dashboard.
The forecast logEach week's forecast is stored as it was made and scored as actuals arrive, so you can check the error you were quoted against the error you got.
How a forecasting project runs
1
Scoping
The work needs two years or more of weekly sales at the level you buy, plus promotions and any stock-out records, because with less there's only one season to learn from.
2
Build
The seasonal baseline is fitted first, then the model, and both are scored on the same held-back weeks. The model only goes forward if its error is lower.
3
Handover
The forecast, its band and the log run on a schedule in your accounts, and your team learns to read the band.
4
Every month after
The log scores each forecast against actuals, so you'll see it if the model stops beating the baseline.
What usually goes wrong with stock forecasting
Scoring on the training dataA model checked on the weeks it learned from has seen the answers, so it's scored once, on weeks it never saw.
A point treated as a promiseOne number planned on as if it were certain leaves the miss with whoever bought the stock, so the forecast is a band, with written rules for which edge each plan uses.
Stock-outs read as low demandEmpty shelves record low sales that a model reads as low demand, so stock-out weeks are flagged before fitting.
In the example, the two actuals outside the band were 16 August, 10 units above its upper edge, and 30 August, 30 units below its lower edge.
Sales forecasting by industry
EcommerceWeekly units are forecast by product range, with promotions from the calendar and stock-out weeks flagged first.
When the question is how much demand comes from ad spend, that's marketing mix modelling, and a planned spend level can go into the forecast as an input.
Questions about forecasts
How accurate will our sales forecast be?
Nobody can say before the backtest, which forecasts your most recent weeks blind and scores the result next to the seasonal baseline. You see how the model does on your own data before you plan on it.
What does the error figure mean?
It's mean absolute percentage error: each held-back week's gap between actual and forecast as a share of actual, averaged across the weeks. 4.0% means the forecast was out by 4% of the real figure in an average week. Products with zero-sale weeks get a weighted version.
Do you do demand forecasting for ecommerce stock?
Yes, weekly by product range at the level you buy. Out-of-stock weeks are flagged first, because sales in those weeks show what you had to sell, which can be less than what people wanted.
Is this predictive analytics?
Yes, it's the part of predictive analytics that predicts a quantity over time, such as units sold or revenue. Predicting which customers will buy again is customer analytics work.
What if the model doesn't beat the seasonal baseline?
Then we ship the baseline, because same week last year, adjusted for nothing, is a forecast too, and the backtest has scored it. The report says what more history or another input might change.
Does anyone know how far off last quarter's forecast was?
On the call we find where your weekly sales history is kept and say what a backtest on two years of it would need.