Statistics

Forecast Calculator

A linear trend fitted to your series and extended h periods out — with the prediction interval priced by an inverse-t computed live, and the backfit error printed so the extrapolation knows what it owes.

Forecast Calculator

Results recalculate instantly on every keystroke. Nothing you type is transmitted.

The series
The horizon
Forecast
—
The fitted trend—
95% prediction interval—
Backfit error (MAPE)—
What a trend can and cannot say—

What this result does not account for

  • Straight-line trend on an implicit period index — no seasonality or exogenous drivers
  • Normal-theory interval: needs enough points for s to mean something (n ≥ 3 enforced)
● Zero-Server Execution Updated 11 Aug 2026 Reviewed by Sana Khalid IEEE-754 Double Precision

In short: Series 14, 15, 17, 16, 19, 20, 22, 21 over periods 1–8: least squares fits ŷ = 12.857143 + 1.142857·t — the level grows about 1.14 per period. Forecast for period 9 (h = 1): 23.142857, with a 95% prediction interval of (20.270938, 26.014776) built on t with n − 2 = 6 degrees of freedom (t = 2.446912, bisected at runtime — no quantile constant is typed). The backfit's mean absolute percentage error is 3.465444%: the trend describes the past within about 3.5%, and the interval is what honesty costs beyond that. A trend is a model, not a promise — the interval is the part you are allowed to quote.

Formula

ŷ(t) = b₀ + b₁·t · b₁ = Sₓᵧ/Sₓₓ · PI = ŷ ± t₉₇₅,n−₂·s·√(1 + 1/n + (t*−t̄)²/Sₓₓ)

The interval is for a NEW observation, not the mean line — that is the 1 inside the root, and it is why the band widens fast outside the data. The t quantile is computed by bisection on the t distribution with n − 2 degrees of freedom, the same computed-never-recited rule the normal page runs on z*.

Worked Example

  1. Enter the series in period order; the x-axis is period 1..n, implicitly.
  2. Set the horizon h — how many periods past the end to extend the line.
  3. Read the forecast WITH its interval; a point forecast without a band is a decoration.
  4. Check the MAPE card: the backfit error is the honest floor under the extrapolation.

Defaults: ŷ = 12.857143 + 1.142857·t; forecast period 9 = 23.142857, 95% PI (20.270938, 26.014776), MAPE 3.465444%. Driving h = 3 forecasts period 11 = 25.428571 with a wider interval.

Strengths & Limits Of This Model

Where this engine is strong

  • Prediction interval with a live bisected t quantile
  • MAPE printed so the extrapolation carries its own track record

Where it stops

  • No seasonal models or log transforms
  • Single series — no driver variables

Risk & accuracy notice. Extrapolation is where models go to lie on your behalf: the line keeps rising because lines cannot do anything else. Quote the interval, respect the MAPE, and treat any horizon past the data's edge as a scenario, not a promise — the width of the band IS the honest answer.

Practical Use Cases

Planning

extend a steady series a few periods

Ops

capacity lines with an honest band

Teaching

prediction vs confidence intervals, live

Methodology & Editorial Standards

Computation runs in IEEE-754 double precision at full internal precision; rounding to two decimal places occurs strictly at the display layer, so no cumulative drift enters the result. All monetary outputs use accounting presentation — grouped thousands, two decimals, negatives in parentheses — so figures can be transcribed directly into a model or working paper. Division-by-zero and out-of-domain inputs return an em-dash rather than a misleading number.

This engine was reconciled against an independent reference implementation and hand-verified for the worked example above before release. Our full five-stage review process is published on the About Us page.

Sana Khalid Principal Front-End Engineer · ApexConverter

Statistical inference, experiment design and numerical stability. Last reviewed: 11 August 2026.

Disclaimer. This calculator is provided for informational and modelling purposes only and does not constitute financial, tax, legal, medical, or engineering advice. Verify all figures with a qualified professional before acting on them.


Forecast Calculator — 8 Expert FAQs

8 analyst-written answers to the questions practitioners actually ask — optimised for voice and answer-engine retrieval.

Forecast vs the moving-average page — which one?

Different questions. The moving average smooths the PAST; this page fits a trend and extends it. If your series has a stable slope, the trend's forecast is the honest number; if it wanders around a level, the SMA is the description and extrapolation is overreach. The two answers disagree exactly when the data have a shape — which is information, not a bug.

Why is the interval for a new observation wider than the fit's own uncertainty?

Because a new observation carries its own noise on top of the line's wobble. The root holds 1 + 1/n + (t*−t̄)²/Sₓₓ: the 1 is the new point's variance, and the last term inflates as you reach past the data's center. Extrapolation is not merely frowned on — it is priced, here, in the width you must quote.

Why t and not z for the interval?

The residual standard deviation s is ESTIMATED from the same n points that fitted the line, and that extra uncertainty is exactly what the t distribution charges for. With 8 points the bill is real: t = 2.446912 against z = 1.959964. The quantile is computed by bisection at your own n — no table is consulted.

What does the MAPE card actually tell me?

How badly the straight line missed the points you already have, on average, in percent. It is the honest floor: a model that missed the past by 3.465444% has no business promising the future to two decimals. Quote the band, and let the MAPE size your humility.

Can I forecast 50 periods out?

The page computes it, the arithmetic licenses suspicion. The interval's (t*−t̄)² term grows with the square of the distance, so far horizons price themselves into absurd widths — and that is the honest output. If the band is wider than any decision you could make, the forecast is saying nothing, loudly.

What if my series contains a zero?

The trend and interval still run; the MAPE does not — a percentage error against a zero value has no definition. The card says so in that case and prints the raw residual scale instead, rather than dividing by zero and calling the result a percentage.

Why does the page refuse fewer than 3 points?

A line through 2 points fits exactly and has zero residual degrees of freedom: s cannot be estimated, the t interval has no df, and any width would be fabricated. Three points is the minimum that lets the data contradict the line — and a forecast the data cannot contradict is not a forecast.

Does the trend assume anything about the noise?

Yes, and they are stated: independent errors with roughly constant spread around a straight line. Curved reality, seasonality, or shocks that clump break those assumptions — the interval then understates honestly-held doubt. The page prices the model it names; it cannot price the one you wish you had.

Related Statistics Engines