FORECAST Function

Excel Functions › Statistical

All versions Statistical

The Excel FORECAST function predicts a future value along a straight-line trend, using linear regression on a set of known x and y data points.


Quick answer:
=FORECAST(30,{6,7,9,15,21},{20,28,31,38,40}) predicted y at x=30 ≈ 10.6

Syntax

=FORECAST(x, known_ys, known_xs)
ArgumentDescription
xRequiredThe data point (x value) for which you want to predict a y value.
known_ysRequiredThe dependent array or range of known y values.
known_xsRequiredThe independent array or range of known x values, the same size as known_ys.

How to use it

FORECAST fits a least-squares regression line through your known points, then evaluates that line at the new x you supply. It is the prediction equivalent of SLOPE and INTERCEPT combined.

=FORECAST(30,{6,7,9,15,21},{20,28,31,38,40}) // ≈ 10.6

Note the argument order: the known y values come before the known x values — the reverse of how you might read the regression. The result is INTERCEPT(known_ys,known_xs) + SLOPE(known_ys,known_xs) · x.

In Excel 2016 and later, FORECAST was renamed FORECAST.LINEAR for clarity (to distinguish it from the new exponential-smoothing FORECAST.ETS functions). The original FORECAST name still works in every version for backward compatibility.

Note: known_ys and known_xs must be the same length, and the x values cannot all be identical (zero variance gives #DIV/0!). FORECAST only models a linear trend.

Try it: interactive demo

Live demo

Enter a target x plus matching known-y and known-x lists to predict along the trend line.

Result:

Practice workbook

📊
Download the free FORECAST 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

What does FORECAST predict?
It predicts a y value for a new x by fitting a least-squares straight line through your known x-y pairs and evaluating that line at the requested x. It assumes a linear relationship.
What is the argument order for FORECAST?
=FORECAST(x, known_ys, known_xs) — the new x first, then the known y values, then the known x values. The y array comes before the x array, which trips up many users.
What is the difference between FORECAST and FORECAST.LINEAR?
They are identical. FORECAST.LINEAR was introduced in Excel 2016 as the clearer modern name; the original FORECAST still works everywhere for backward compatibility.
How is FORECAST different from FORECAST.ETS?
FORECAST fits a single straight line and is best for steady linear trends. FORECAST.ETS uses exponential smoothing on a time series and can capture seasonality and changing trends.

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.LINEAR · FORECAST.ETS · TREND · SLOPE · INTERCEPT · LINEST