FORECAST.LINEAR Function
Predicts a value along a straight-line trend.
Category
Statistical
Available in
Excel 2016+, Microsoft 365
Returns
A number
Overview
FORECAST.LINEAR fits the least-squares straight line through your known points and returns the y value for a new x. It's the same as INTERCEPT + SLOPE × x.
x can be anything numeric: ad spend, headcount, or a period number or date for a time trend. For trends with a seasonal pattern, FORECAST.ETS usually does better.
Syntax
Arguments
| Argument | Required? | What it does |
|---|---|---|
| x | Yes | The new x value to predict for. |
| known_y's | Yes | The values you want to predict (for example, sales). |
| known_x's | Yes | The values that drive them (for example, ad spend), the same size as known_y's. |
Examples
Example 1 — Sales at $10k of advertising
Ad spend has ranged from $2k to $8k.
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | Month | Ad spend ($k) | Sales ($k) | Measure | Result |
| 2 | Jan | 2 | 21 | At $10k | 53.29 |
| 3 | Feb | 3 | 25 | At $6k | 36.86 |
| 4 | Mar | 5 | 33 | ||
| 5 | Apr | 4 | 28 | ||
| 6 | May | 6 | 38 | ||
| 7 | Jun | 7 | 40 | ||
| 8 | Jul | 8 | 46 | ||
| 9 | Aug | 5 | 31 |
About $53.3k. $10k is beyond anything in the data, so the further you extrapolate, the less you should trust the line.
Example 2 — Next quarter from a time trend
With quarters numbered 1–12 in A and sales in B, predict quarter 13.
Use dates as x for daily or monthly data.
Common mistakes
- y before x. The known y's come before the known x's. Swapping them predicts x from y.
- #DIV/0! All the known x's are the same.
- #N/A The ranges are different sizes.
Notes
- FORECAST.LINEAR replaces the older FORECAST function, which works the same way.
- Related functions: TREND, SLOPE, INTERCEPT, FORECAST.ETS, GROWTH.

Author
Kyle Stott
Certified Microsoft Excel Expert
Kyle has worked professionally with Microsoft Excel for over a decade and has consulted on and taught Excel best practices to over 400 companies across 30+ countries.