Skip to content

Forecast a trend with FORECAST.LINEAR and a trendline

Loans, forecasts and Solver8 minPremium

Builds on Show a trend with a line chart and Copy a formula down a column.

The manager of a self-storage business in Dublin plans next quarter's staff from the bookings trend. Bookings have grown fairly steadily for a year, and she wants next month's figure worked out from the numbers.

How it works

FORECAST.LINEAR fits the straight line that runs closest to the past values and reads it further along.

RowAB
1ArgumentWhat it is
2xThe point to forecast, such as month 13
3known_y'sThe past values, such as bookings
4known_x'sWhere each past value sits, such as months 1 to 12, or their dates

The x's are usually month numbers or dates, and the two known ranges must be the same size. FORECAST.LINEAR needs Excel 2016 or later. FORECAST, in every version, takes the same arguments and gives the same result.

A chart can draw the same line. Select a line chart and choose Chart Design > Add Chart Element > Trendline > Linear, on Windows and on a Mac. The Forward box in Format Trendline extends it past the last month.

A straight line ignores seasons. For data with a pattern that repeats, such as a peak every December, Forecast Sheet (Data > Forecast Sheet, in Excel 2016 and later for Windows) uses exponential smoothing, which follows the seasons. It draws a confidence band around the forecast, the range the future values should fall in, 95% of the time by default.

Example

=FORECAST.LINEAR(B14,C2:C13,B2:B13)
Forecasts the bookings for the month number in B14, from the bookings in C2:C13 and their month numbers in B2:B13.

With bookings rising from 212 in month 1 to 290 in month 12, about 7 more each month, it returns 294.26 for month 13.

Common mistakes

  • =FORECAST.LINEAR(B14,B2:B13,C2:C13) returns -27.74. The y's and x's are swapped, so it forecasts a month number from bookings. The values to forecast come first.
  • Known ranges of different sizes, such as C2:C13 with B3:B13. FORECAST.LINEAR returns #N/A.
  • Ranges left unlocked when the formula is filled down for several months. Each row reads a range one row lower. Lock them with $.

In short

  • FORECAST.LINEAR(x, known_y's, known_x's) reads the straight-line trend at x.
  • A linear trendline draws the same line on a chart.
  • For seasonal data, use Forecast Sheet on Windows, which follows the seasons and shows a confidence band.

Practice

Premium

4 exercises: 2 formulas, 1 chart and 1 quiz question.

Practice is part of Premium

Every lesson is free to read, and you can practice the free lessons without an account. This lesson's exercises are part of Premium, which you add to a free account.