Quick Navigation
FORECAST Function
Summary
The FORECAST function predicts future values using linear regression analysis on historical data. It calculates the expected y-value for a specified x-value based on known x and y data points, making it essential for trend analysis and forecasting.
Syntax
FORECAST(x, known_y's, known_x's)
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| x | Number |
Yes | The specific x-value (data point) for which you want to predict the y-value |
| known_y's | Array/Range |
Yes | Range containing the dependent variable values (outcomes/effects) |
| known_x's | Array/Range |
Yes | Range containing the independent variable values (predictors/causes) |
Using the FORECAST Function
FORECAST applies the linear regression formula y = a + bx to predict values beyond your existing dataset. Use it when you have historical data showing a linear relationship and need to estimate future performance, such as projecting sales based on past advertising spend or inventory needs from historical demand.
Common FORECAST Examples
Sales Forecasting Example
=FORECAST(2024, B2:B10, A2:A10)
Predicts 2024 sales based on historical sales (B2:B10) and years (A2:A10). Returns expected sales value using linear regression.
Budget Projection
=FORECAST(30, C2:C8, B2:B8)
Forecasts expense at month 30 using historical expenses (C column) against months (B column).
Trend Extrapolation
=FORECAST(50, D5:D15, E5:E15)
Extends temperature trend to predict value at 50 degrees using known data points.
Frequently Asked Questions
Common Errors and Solutions
#VALUE!
Cause: x value is non-numeric
Solution: Ensure x parameter contains a valid number
#N/A
Cause: known_y's or known_x's arrays have different sizes or are empty
Solution: Verify both ranges contain the same number of data points
#DIV/0!
Cause: All known_x's values are identical (zero variance)
Solution: Ensure known_x's range has varying numeric values
Notes
- In Excel 2016+, FORECAST.LINEAR is the recommended replacement with identical syntax
- Uses linear regression equation: y = a + bx where a and b are calculated from known data
- Both arrays must contain the same number of values
- Perfect for simple trendline extrapolation
- Consider FORECAST.ETS for seasonal time series data
Compatibility
Available in: Excel 2007, Excel 2010, Excel 2013, Excel 2016 (as FORECAST.LINEAR), Excel 2019, Excel 2021, Microsoft 365
Not available in: Excel 2003 and earlier
Content last reviewed: December 9, 2025
Update frequency: As needed
Excel versions tested: Excel 2007+, Excel 2016 (as FORECAST.LINEAR)