Statistical function

FORECAST.LINEAR function

Predicts a future value by fitting a straight line through known data, e.g. next month's sales from the past six months.

Available in Microsoft 365, Excel 2016 and later, Excel for the web

Excel 2016 and laterWorks in Google Sheets

Syntax

FORECAST.LINEAR(x, known_y's, known_x's)
ArgumentWhat it means
xRequiredThe point you want a prediction for, such as month 7 or a future date.
known_y'sRequiredThe known results you want to predict, e.g. past sales.
known_x'sRequiredThe known inputs that go with them, e.g. month numbers, dates or ad spend. Same number of values as known_y's.

Returns: A number: the value on the best-fit straight line at x.

How FORECAST.LINEAR works

FORECAST.LINEAR draws the best straight line through your past data and reads off where that line will be at a new point. Give it the history (the y values you care about and the x values that go with them) and the x you are interested in, and it returns the predicted y. It is the quickest way to extend a steady trend: next month's sales, staff needed for a given order volume, expected cost at a certain production level.

The line is the ordinary least-squares line, the same one Excel draws as a linear trendline on a chart. Its slope is SLOPE and its starting point is INTERCEPT; FORECAST.LINEAR simply calculates intercept + slope × x. Dates work as x values because Excel stores them as serial numbers.

A straight line ignores seasonality and curves. If your sales jump every December, use FORECAST.ETS, which learns repeating patterns. And remember that any forecast is an extrapolation: the further x is from your data, the less you should trust it. FORECAST.LINEAR gives the same result as the older FORECAST.

Examples

1Next month's sales from the trend

D2fx=FORECAST.LINEAR(7, B2:B7, A2:A7)
ABCD
1Month no.Sales (units)
21120187.87
32132
43141
54155
65163
76178

Result: 187.87

The best-fit line rises by about 11.34 units a month (=SLOPE(B2:B7, A2:A7)). Continuing it to month 7 gives 187.87 units (shown with 2 decimals), a sensible order quantity for July.

2Sales expected for a given ad budget

E2fx=FORECAST.LINEAR(4.5, C2:C7, B2:B7)
ABCDE
1MonthAd spend (k€)Sales (k€)
2Jan24162.12
3Feb3.558
4Mar1.544
5Apr456
6May353
7Jun566

Result: 62.12

Here x is not time but advertising spend. The line through the six months predicts sales of 62.12 k€ for a 4.5 k€ budget. Note the argument order: the values to predict (sales) come before the inputs (spend).

3Forecasting on a date axis

D2fx=FORECAST.LINEAR(DATE(2026,7,1), B2:B7, A2:A7)
ABCD
1Month startSubscribers
22026-01-0124802,912
32026-02-012555
42026-03-012610
52026-04-012700
62026-05-012765
72026-06-012840

Result: 2,912

The dates in column A are serial numbers (1 Jan 2026 is 46023), so the line is fitted per day. Predicting for 1 July 2026 gives about 2,912 subscribers (no decimals). Because months have different lengths, a per-day line is slightly more accurate than numbering the months 1 to 6.

4Staff needed for 300 orders a day

D2fx=FORECAST.LINEAR(300, B2:B6, A2:A6)
ABCD
1Orders per dayStaff on shift
2120614.8
31507
41809
521010
624012

Result: 14.8

Past shifts suggest about 5.0 extra staff per 100 orders. At 300 orders the line gives 14.8 people, so plan for 15. 300 is beyond the observed range (120–240), so treat this as a rough guide.

⬇Practice workbookExamples with live formulas + practice sheets · .xlsx · 18 KB

Common errors and how to fix them

ErrorWhy it happensFix
#N/Aknown_y's and known_x's have different numbers of values.Make both ranges the same size.
#DIV/0!All the known_x's are the same, so no line can be fitted (or the ranges are empty).Provide x values that vary.
#VALUE!x is text.Use a number or a real date.

Tips

  • Check how well the line fits with =RSQ(B2:B7, A2:A7); close to 1 means the trend explains the data well.
  • To forecast several future points at once in Microsoft 365, pass an array as x: =FORECAST.LINEAR(SEQUENCE(3,1,7), B2:B7, A2:A7) spills months 7–9.
  • For a curved (exponential) trend use GROWTH; for several input variables use TREND or LINEST.

Questions

What is the difference between FORECAST and FORECAST.LINEAR?

They calculate exactly the same thing. FORECAST.LINEAR is the newer name introduced in Excel 2016 next to the ETS functions; FORECAST is kept so older workbooks keep working and is available in every version.

Should I use FORECAST.LINEAR or FORECAST.ETS?

Use FORECAST.LINEAR for a steady trend or when x is not time (ad spend, orders). Use FORECAST.ETS for time series with seasonal patterns, such as monthly retail sales.

Why is my forecast negative?

The straight line keeps going. If your data trend downwards, extending far enough will cross zero. Forecast only a short distance beyond your data, or use a model that cannot go negative.

Google Sheets

FORECAST.LINEAR also exists in Google Sheets and works the same way for everyday use, so the examples above work there too.

FORECAST.LINEAR in other languages

In a non-English version of Excel the function has a local name. Excel translates formulas automatically when a file is opened in another language.

LanguageFunction name
DanishPROGNOSE.LINEÆR
DutchVOORSPELLEN.LINEAR
FinnishENNUSTE.LINEAARINEN
FrenchPREVISION.LINEAIRE
GermanPROGNOSE.LINEAR
HungarianELŐREJELZÉS.LINEÁRIS
ItalianPREVISIONE.LINEARE
Norwegian (Bokmål)PROGNOSE.LINEÆR
PolishREGLINX.LINIOWA
Portuguese (Brazil)PREVISÃO.LINEAR
Portuguese (Portugal)PREVISÃO.LINEAR
RussianПРЕДСКАЗ.ЛИНЕЙН
SpanishPRONOSTICO.LINEAL
SwedishPROGNOS.LINJÄR
TurkishTAHMİN.DOĞRUSAL