FORECAST.LINEAR Function

Excel Functions › Statistical

Excel 2016+ Statistical

The Excel FORECAST.LINEAR function predicts a future value along the straight line of best fit through known x–y data — the modern replacement for the legacy FORECAST function.


Quick answer:
=FORECAST.LINEAR(30,{6,7,9,15,21},{20,28,31,38,40}) linear prediction at x = 30 = ~10.61

Syntax

=FORECAST.LINEAR(x, known_ys, known_xs)
ArgumentDescription
xRequiredThe data point (x value) at which you want a prediction.
known_ysRequiredThe known dependent values — the y's you are predicting.
known_xsRequiredThe known independent values — the matching x's. Must be the same size as known_ys.

How to use it

FORECAST.LINEAR fits a least-squares regression line to your known points, then reads the y value on that line at the x you give. The order of arguments is the y's before the x's:

=FORECAST.LINEAR(30, {6,7,9,15,21}, {20,28,31,38,40}) // ~10.61

It is mathematically identical to INTERCEPT + SLOPE * x — the line's intercept plus its slope times your x. The x can lie outside the known range (extrapolation) or inside it (interpolation).

FORECAST vs FORECAST.LINEAR: they return the exact same number. FORECAST.LINEAR (Excel 2016+) is the renamed, future-proof version; the old FORECAST still works for backward compatibility but Microsoft recommends the new name.

For data with a repeating seasonal pattern over time, reach for FORECAST.ETS instead — it models seasonality, which a straight line cannot.

Try it: interactive demo

Live demo

Pick a FORECAST.LINEAR example to see the formula and its result.

Result:

Practice workbook

📊
Download the free FORECAST.LINEAR practice workbook
Every example on this page, ready to open in Excel — plus practice challenges with answers on a separate tab. No sign-up required.

Frequently asked questions

Is FORECAST.LINEAR the same as FORECAST?
Yes — they compute the identical linear prediction. FORECAST.LINEAR was introduced in Excel 2016 as the future-proof name; the original FORECAST remains only for backward compatibility.
What is the argument order?
It is (x, known_ys, known_xs) — the value to predict first, then the y's, then the x's. Mixing up the y and x ranges is the most common mistake and gives a wrong result.
Can I forecast beyond my data range?
Yes. FORECAST.LINEAR extrapolates the fitted line to any x, inside or outside the known range. Just remember extrapolation assumes the linear trend continues.
When should I use FORECAST.ETS instead?
Use FORECAST.ETS when the data has a seasonal pattern over time (monthly sales, daily traffic). A straight line can't capture seasonality; the ETS family can.

Master functions like this in one day

This page covers one function. Our Excel Formulas and Functions class covers the 30 that matter most — live, hands-on, taught by professionals in Dallas–Fort Worth, Houston, Austin, Oklahoma City, Denver, or online.

See the Formulas & Functions Class

Related functions: FORECAST.ETS.CONFINT · TREND · SLOPE · INTERCEPT · LINEST