FORECAST.LINEAR fits a straight line through your known data and reads off the y value that the line gives for a new x. It is the quickest way to answer "if we spend 60k on ads, what sales should we expect?" or "what will next month's total be if the trend continues?".
How it works
FORECAST.LINEAR uses least squares, the same fit as SLOPE and INTERCEPT. The prediction is:
intercept + slope × x
so =FORECAST.LINEAR(60, C2:C6, B2:B6) equals =INTERCEPT(C2:C6,B2:B6) + SLOPE(C2:C6,B2:B6) * 60. The function simply does both steps in one.
The argument order
The new x comes first, then the known y values, then the known x values. It is easy to mix up the last two. If you swap them, the prediction answers a different question and no error appears. The y values are what you want to predict; the x values are what drives them.
Forecasting over time
For a time trend, use period numbers 1, 2, 3 ... as x, or the dates themselves. With sales for months 1 to 6, =FORECAST.LINEAR(7, B2:B7, A2:A7) predicts month 7. Dates work as x because they are numbers, so the prediction for a future date is on the same straight line.
Linear forecasts assume the trend continues at the same rate. For seasonal data or curved growth, the line misses patterns. Excel also has FORECAST.ETS for seasonal data, and TREND, which returns predictions for several x values at once.
FORECAST and FORECAST.LINEAR
FORECAST.LINEAR was added in Excel 2016 as the clearer name alongside FORECAST.ETS. The older FORECAST gives identical results and still works. Use FORECAST.LINEAR in new work. If a file must open in Excel 2013 or earlier, use FORECAST.
Errors and limits
- The two known ranges must have the same number of values, or the result is
#N/A. - If every known x is the same, the result is
#DIV/0!. - A non-numeric x returns
#VALUE!. - Predicting far outside the range of your data is risky, because the line may not hold there. Check how well a straight line fits with CORREL.