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.
Syntax
| Argument | Description | |
|---|---|---|
x | Required | The data point (x value) for which you want to predict a y value. |
known_ys | Required | The dependent array or range of known y values. |
known_xs | Required | The 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.
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
Enter a target x plus matching known-y and known-x lists to predict along the trend line.
Practice workbook
Frequently asked questions
What does FORECAST predict?
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?
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.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