Paste the data, get the tables, the forecast plot and APA 7 wording in seconds. Analysis needs no sign-in; downloads need a free sign up, then log in.
Open the free forecast plot calculator
What is a forecast plot?
A forecast plot draws the observed series, then the predicted future values (the point forecast, usually dashed) and a shaded band called the prediction interval. The StatFAS forecast plot calculator uses additive Holt–Winters exponential smoothing, which tracks a level, a trend and a seasonal pattern, or Holt’s linear trend when the series is too short for a seasonal pattern. The smoothing parameters α, β and γ are chosen by minimizing the one-step-ahead squared error, and the 95% prediction interval grows with the horizon because the residual spread accumulates.
The calculator also withholds the final observations, forecasts them and reports the holdout accuracy: RMSE, MAE and MAPE.
When and why to use a forecast plot
When
- Planning capacity or supply: beds, staffing, vaccine doses, drugs or reagents.
- Creating an expected baseline against which excess cases or deaths can be judged.
- Early warning in surveillance when the expected range for the next weeks is needed.
- Communicating the uncertainty around a projected trend.
- Checking whether a recent series stayed inside the range that earlier data predicted.
Why
- A forecast plot shows both the expected value and the range of plausible values, so decisions are not built on a single line.
- The holdout accuracy measures how well the method predicted data that were not used for fitting, which is more honest than in-sample fit.
Typical biomedical examples
weekly influenza-like illness, monthly hospital admissions, laboratory test volumes, vaccine demand, seasonal disease incidence.
How to interpret the results
Point forecast versus interval
The dashed line is the central expectation. The shaded band is the range that should contain a future value with 95% probability if the model assumptions hold. The band is the main message of the forecast plot.
Widening band
The interval grows with the horizon. A very wide band at the end means the long-range forecast carries little information.
Interval assumptions
The 95% interval assumes roughly normal, uncorrelated errors and a stable pattern. When the residuals show autocorrelation, the true coverage is lower than 95%.
Holdout accuracy
RMSE and MAE are in the units of the data (RMSE punishes large misses more). MAPE is a percentage but is undefined when values are zero and is distorted by values near zero.
Compare with a simple benchmark
A method is only useful when the method beats a naive forecast, such as repeating the last observed season. Compute that benchmark in R or Python and compare the errors.
Residual diagnostics
The Ljung–Box test and the residual plot should show no remaining pattern. Remaining pattern means the model missed structure.
Horizon
Forecast no more than about one to two seasonal cycles ahead. Longer horizons rarely deserve trust.
Structural breaks
Outbreaks, policy changes and pandemics break the pattern. A forecast plot assumes the future behaves like the past, so the plot cannot predict the effect of an intervention.
Common mistakes
- Judging a method only by in-sample fit.
- Presenting the point forecast without the prediction interval.
- Using horizons far beyond the data’s seasonal cycles.
- Fitting a series that contains a large outlier or level shift without handling that event.
- Using MAPE on series that contain zeros.
- Reading a forecast as a causal claim.
- Too few cycles: the seasonal version needs at least two full cycles plus two observations.
How to make a forecast plot
The easy way: StatFAS.com
The free forecast plot calculator at StatFAS.com handles the calculations, draws the figure to publication standard and writes the APA 7 results text. The forecast plot calculator page walks through every step.
Paste the data, get the tables, the forecast plot and APA 7 wording in seconds. Analysis needs no sign-in; downloads need a free sign up, then log in.
Open the free forecast plot calculator
SPSS
- Define the cycle with Data > Define Date and Time.
- Choose Analyze > Forecasting > Create Traditional Models.
- Move the series into Dependent Variables.
- On the Variables tab set Method to Exponential Smoothing, click Criteria and choose Winters’ additive (or Holt’s linear trend for non-seasonal data).
- On Statistics tick the fit measures (RMSE, MAE, MAPE) and the Ljung–Box statistic. On Plots tick Forecasts and Fit values.
- On Save tick Predicted Values and the Upper and Lower Confidence Limits.
- On Options set the forecast period (first case after the end of the estimation period through a chosen date). For a holdout check, set an estimation period that stops before the final observations and compare the saved predictions with the data.
- SPSS optimizes the smoothing parameters with a numerical search, so the values can differ slightly from StatFAS.
R
x <- ts(values, start = c(2019, 1), frequency = 12)
h <- 12
# Holdout check
train <- window(x, end = time(x)[length(x) - h])
actual <- window(x, start = time(x)[length(x) - h + 1])
fit_h <- HoltWinters(train, seasonal = "additive")
e <- actual - predict(fit_h, n.ahead = h)
c(RMSE = sqrt(mean(e^2)), MAE = mean(abs(e)), MAPE = 100 * mean(abs(e / actual)))
# Final model, forecast and plot
fit <- HoltWinters(x, seasonal = "additive")
fc <- predict(fit, n.ahead = h, prediction.interval = TRUE, level = 0.95)
plot(fit, fc)
Box.test(residuals(fit), lag = 12, type = "Ljung-Box")Python
import numpy as np
import matplotlib.pyplot as plt
from statsmodels.tsa.exponential_smoothing.ets import ETSModel
h = 12
train, test = y[:-h], y[-h:]
spec = dict(error="add", trend="add", seasonal="add", seasonal_periods=12)
# Holdout check
m = ETSModel(train, **spec).fit(disp=False)
p = m.get_prediction(start=len(train), end=len(train) + h - 1).summary_frame(alpha=0.05)
e = test.values - p["mean"].values
print(np.sqrt((e**2).mean()), np.abs(e).mean(), 100 * np.abs(e / test.values).mean())
# Final model, forecast and plot
full = ETSModel(y, **spec).fit(disp=False)
fc = full.get_prediction(start=len(y), end=len(y) + h - 1).summary_frame(alpha=0.05)
ax = y.plot(label="Observed")
fc["mean"].plot(ax=ax, linestyle="--", label="Forecast")
ax.fill_between(fc.index, fc["pi_lower"], fc["pi_upper"], alpha=0.3)
ax.legend()
plt.show()How to report the results in APA 7
Example wording (simulated monthly clinic visits): “Additive Holt–Winters smoothing (period = 12) was fitted to monthly clinic visits (N = 72) with α = .05, β = .05 and γ = .70. In holdout validation (final 12 observations withheld), RMSE = 2.32, MAE = 2.13 and MAPE = 2.9%. One-step residuals showed no significant autocorrelation, Q(12) = 16.93, p = .152.” Add the forecast at the final horizon with its 95% prediction interval.
Frequently asked questions
What is the shaded area on a forecast plot?
The shaded area is the prediction interval, the range expected to contain a future observation with the stated probability (95% here) if the model assumptions hold.
How far ahead should a forecast plot go?
Usually no more than one to two seasonal cycles. The interval widens with the horizon, which signals decreasing reliability.
Which accuracy measure should be reported?
Report RMSE and MAE (in data units) and add MAPE only when the series has no zeros. Compare the values with a naive benchmark.
Why do R, SPSS and StatFAS give slightly different forecasts?
Each program searches for smoothing parameters differently and constructs prediction intervals with its own formula, so small differences are normal.
Key takeaways
- A forecast plot is only as good as the preparation: correct period, equal spacing, no gaps.
- Point forecast versus interval: The dashed line is the central expectation. The shaded band is the range that should contain a future value with 95% probability if the model assumptions hold. The band is the main message of the forecast plot.
- Report numbers together with the figure, using APA 7 wording.
- StatFAS.com produces the figure, the tables and the APA 7 text from pasted data.
Related reading
Seasonal decomposition plot blog · ACF plot blog · forecast plot calculator