CalcWorldHub
Free online calculator · no signup

Linear trend forecast calculator

Fit a least-squares straight trend to equally spaced observations and extend it by h periods.

Linear trend forecast calculator — Observations, comma-separated, Periods ahead h (≥0) and calculation method
Linear trend forecast calculator: inputs and calculation method.

How to use this calculator

Fit a least-squares straight trend to equally spaced observations and extend it by h periods.

  1. Enter Observations, comma-separated, Periods ahead h (≥0). Match the units shown beside each field and review the result together with the assumptions below.
  2. Read the worked example below to check the expected input format and result.
  3. Compare another scenario by changing one input at a time. Use Reset to return to the starting values.
Calculation guide

How the Linear trend forecast calculator works

Fit a least-squares straight trend to equally spaced observations and extend it by h periods.

Inputs and units

  • Observations, comma-separated: Observations are chronological numeric values; the first is assigned t=1.
  • Periods ahead h (≥0): h is the number of periods beyond the last observation; h must be nonnegative.

Formula and method

Fit ŷₜ=â+bt for t=1,…,n; forecast ŷₙ₊ₕ=â+b(n+h).

Worked example

For observations 4, 7, 7, 10, 12 at t=1,…,5, least squares gives intercept 2.3 and slope 1.9; at h=2 it predicts 2.3+1.9×7=15.6.

Interpreting the result

The output extends the fitted linear trend, not the last observation. Fractional h is mathematically meaningful when the time coordinate is continuous.

Assumptions and limits

Observations are equally spaced and a straight-line trend is an adequate summary. Long-horizon extrapolation ignores uncertainty, seasonality, and structural changes.

Frequently asked questions

Does the forecast use the latest observation as its starting point?

It evaluates the least-squares fitted line at n+h, which may differ from the last observation.

Can h be fractional?

Yes. The fitted linear trend can be evaluated at fractional time coordinates if that matches the use case.

How do I use the Linear trend forecast calculator?

Enter Observations, comma-separated, Periods ahead h (≥0). Match the units shown beside each field and review the result together with the assumptions below.

What is a worked example of Linear trend forecast?

For observations 4, 7, 7, 10, 12 at t=1,…,5, least squares gives intercept 2.3 and slope 1.9; at h=2 it predicts 2.3+1.9×7=15.6.

What does the Linear trend forecast calculator calculate?

Fit a least-squares straight trend to equally spaced observations and extend it by h periods.