Excel FORECAST Function

Forecast Equations

The Excel Forecast Function calculates a new y-value using the simple straight line equation:

Straight Line Equation
Equation for the intercept of a linear regression line
Equation for the slope of a linear regression line
and the values of   x   and   y   are the sample means (the averages) of the known x- and the known y-values.
Related Function:
TREND function

Basic Description

The Excel Forecast function predicts a future point on a linear trend line fitted to a supplied set of x- and y- values.

The syntax of the function is:

FORECAST( x, known_y's, known_x's )

Where the arguments are as follows:

x-A numeric x-value for which you want to forecast a new y-value.
known_y's-An array of known y-values.

An array of known x-values.

Note that the length of the known_x's array should be the same length as known_y's, and the variance of the known_x's must not be zero.

Forecast Function Example

In the spreadsheet below, the Excel Forecast function is used to predict an additional point along the straight line of best fit through a set of known x- and y-values (stored in cells F2:F7 and G2:G7).

Example of use of the Excel Forecast Function

As shown in cell F7 of the spreadsheet, the function to calculate the forecast y-value at x=7 is:

=FORECAST( 7, G2:G7, F2:F7 )

This gives the result 32.666667.

Further examples of the Excel Forecast function can be found on the Microsoft Office website

Forecast Function Errors

If your Forecast function gives you an error message, this is likely to be one of the following:

Common Errors
#N/A-Occurs if there are problems with the supplied known_x's or known_y's arrays - i.e. if either of these arrays is empty, or if the arrays are of different lengths.
#DIV/0!-Occurs if the variance of the supplied known_x's evaluates to zero.
#VALUE!-Occurs if the supplied future value of x is non-numeric.