Blog · Forecast and pipeline · Supply chain
Evaluate supplied linear regression demand forecasts against actual demand and a baseline. Align the exports, calculate errors, and investigate patterns before relying on the predictions.
Demand forecasting with linear regression relates demand to measured business inputs, then needs a separate check against actual demand. Start with supplied predictions, their issue dates, and the input assumptions used to produce them. Compare those predictions with the same actual rows and a baseline before using them in a purchasing decision.
A simple regression relationship expresses expected demand as an intercept plus an input multiplied by a coefficient. More inputs add further terms. NIST describes linear least squares regression as linear in its parameters, and explains that least squares estimates them by minimizing squared deviations.
This workflow evaluates forecasts supplied by your planning team. It does not fit coefficients or claim that a measured association proves a cause. For the spreadsheet fitting procedure, use regression analysis in Excel. For interpreting supplied price and promotion scenarios more broadly, see causal demand forecasting.
Agree on the target first: ordered units, fulfilled units, or an explicitly estimated unconstrained-demand quantity. Those measures are not interchangeable. Keep any lost-demand estimate labeled as an assumption rather than adding it to recorded sales without explanation.
Keep product ID, site, demand period, forecast issue date, forecast version, predicted units, and the input values available at issue time. Add actual units from the corresponding demand export. Use IDs consistently so a renamed product does not appear as a missing observation.
Check uniqueness before joining quantities. For each product, site, period, and selected forecast version, there should be one prediction to compare. Multiple actual order lines may be aggregated, but duplicate forecast snapshots must not multiply those lines.
Use a baseline forecast issued with the same information cutoff and for the same periods. It could be the existing planning estimate or a documented simple rule. Comparing an earlier regression prediction with a baseline revised after sales arrived would not be a fair test.
If you need the mechanics of a spreadsheet prediction function, the Excel FORECAST guide owns that separate question. Here, keep the exported prediction fixed while testing its performance.
A US packaging distributor supplies four weekly predictions for one carton SKU at one site. All forecasts were issued on August 31, 2026. Planned active accounts are an input recorded at that cutoff, not the later actual account count. The predictions below are supplied quantities, not coefficients fitted from this small table.
Start in A1 with columns A through J:
| Product | Week starting | Planned active accounts | Regression units | Baseline units | Actual units | Regression error | Absolute error | Baseline error | Absolute baseline error |
|---|---|---|---|---|---|---|---|---|---|
| Carton A | September 7, 2026 | 20 | 100 | 95 | 90 | 10 | 10 | 5 | 5 |
| Carton A | September 14, 2026 | 25 | 120 | 110 | 130 | -10 | 10 | -20 | 20 |
| Carton A | September 21, 2026 | 30 | 150 | 130 | 140 | 10 | 10 | -10 | 10 |
| Carton A | September 28, 2026 | 35 | 170 | 150 | 180 | -10 | 10 | -30 | 30 |
| Total | 540 | 485 | 540 | 0 | 40 | -55 | 65 |
In G2 through J2, enter:
=D2-F2
=ABS(G2)
=E2-F2
=ABS(I2)
Fill down to row 5. Positive errors mean overforecasting here. NIST defines a fitted residual as actual minus predicted, the opposite sign; preserve that distinction when comparing this worksheet with statistical output.
The regression total equals actual demand, but the weekly predictions still miss. The signed errors cancel: 10 - 10 + 10 - 10 = 0. Check that SUM(G2:G5) also equals SUM(D2:D5)-SUM(F2:F5). Repeat the identity for the baseline, whose 485 units are 55 below actual demand.
Use the same completed rows for every metric:
WAPE = Sum of absolute forecast errors / Sum of actual demand
MAE = Sum of absolute forecast errors / Number of observations
For regression WAPE and MAE:
=SUM(H2:H5)/SUM(F2:F5)
=SUM(H2:H5)/COUNT(H2:H5)
Regression WAPE is 40 / 540 = 7.4%; baseline WAPE is 65 / 540 = 12.0%. Regression MAE is 40 / 4 = 10 units, versus 65 / 4 = 16.25 for the baseline. Percentages are rounded to one decimal place.
Root mean squared error gives larger misses greater weight. For the regression errors:
=SQRT(SUMPRODUCT(G2:G5,G2:G5)/COUNT(G2:G5))
Microsoft documents SUMPRODUCT as summing products of corresponding entries. Here the squared errors total 400; dividing by four and taking the square root gives 10 units. The baseline's squared errors total 1,425, giving 18.9 units, rounded to one decimal place. Covirage is not affiliated with Microsoft.
The regression prediction performs better across this window, but four observations do not establish general reliability. Repeat the evaluation across completed forecast windows and separate results by product, site, horizon, promotion status, and availability.
NIST's validation guidance explains why a high R-squared is insufficient and recommends examining residual patterns. A chart of errors over time can reveal repeated directional misses that an aggregate score hides. Use forecast bias by SKU and site for that recurring business review.
Bring the regression forecast export, its input assumptions, a baseline, and actual demand to Covirage. Covirage maps the columns; its tools compute and check comparisons from your supplied predictions, and the external AI model explains error patterns with every figure traced to its rows. Create a free Covirage account, then set up your business and bring a sample of your own data.
See forecast analysis in Covirage for the supporting planning context.
Inputs should match the business relationship being evaluated and be available when the forecast is issued. Examples include planned distribution, known prices, and scheduled promotions. Preserve those planning values separately from later realized values so evaluation does not benefit from information unavailable at the time.
A high R-squared describes fit within the data used to estimate a relationship. It does not establish accuracy on later demand. Evaluate forecasts against observations excluded from fitting, compare a baseline, and inspect errors by period, product, and operating conditions.
A supplied regression forecast and its input file do not by themselves establish causation. Prices, promotions, distribution, and other factors may move together. Treat the relationship as predictive evidence and keep any causal claim separate from the forecast-error comparison.