Excel FORECAST.LINEAR Function

The Excel FORECAST.LINEAR function is new in Excel 2016 and forms part of the new suite of forecasting functions.

The FORECAST.LINEAR function uses the least squares or linear regression method to forecast future values based on historical figures. It’s useful for forecasting sales, stock requirements, trends etc.

If you have an earlier version of Excel you can use the identical FORECAST function that shares the same syntax and results.

Excel FORECAST.LINEAR Function Syntax

 
Syntax: =FORECAST.LINEAR(x, known_y’s, known_x’s)
 

Excel FORECAST.LINEAR Function Arguments

 
Argument Description
x This is the next data point that you want to forecast. E.g. it might be a date, or period
known_y's The range of cells containing your historical values you're basing your forecast on
known_x's The range of cells containing the periods you already know
 

Notes:

  • All arguments are required.
  • The known y's and x's must contain the same number of data points.
  • x must be a numeric value, otherwise the #VALUE! Error will be returned.
  • The #DIV/0! Error will be returned if the variance of known_x's equals zero.

Excel FORECAST.LINEAR Function examples

Let’s take some sales data for 2017 that we’d like to forecast for the first 6 months of 2018. In a separate column I’ll insert my FORECAST.LINEAR function:

Excel FORECAST.LINEAR Function

Notice the ‘x’ argument cell reference is relative, so that when I copy the formula down it picks up the next date and so on. Meanwhile the known_x and known_y references are absolute.

BTW, the month names in column C are actually dates formatted to display the month name, thus satisfying the requirement that x values must be numeric.

Chart Forecast Data

Notice that I entered the forecast figures in a separate column. I did this so that I can colour the forecast line different to the actual sales. To do this I need it entered as a separate series in the chart:

chart forecast data

Download the Workbook

Enter your email address below to download the sample workbook.

By submitting your email address you agree that we can email you our Excel newsletter.