Statistical

FORECAST Formula

FORECAST predicts a y-value for a given x-value using linear regression on your historical data. It fits a straight line to the known x and y values and then extends it to your target x. Use it for simple trend-based projections like next month's sales, expected costs at a given volume, or extrapolating any linear relationship.

Syntax

FORECAST(x, known_y, known_x)
ParameterDescription
x Parameter of the FORECAST function.
known_y Parameter of the FORECAST function.
known_x Parameter of the FORECAST function.
Try FORECAST in Viztab — free, no signup

Examples

Next month's sales

Formula
=FORECAST(13, B2:B13, A2:A13)
Predicts month 13's sales based on the linear trend in months 1-12. If sales grew steadily, this extrapolates the line forward.

Expected cost at volume

Formula
=FORECAST(1000, C2:C20, D2:D20)
Predicts the total cost when producing 1,000 units, based on the observed cost-vs-volume relationship.

Interpolation

Formula
=FORECAST(5.5, B2:B11, A2:A11)
Estimates the value at x=5.5 even though your data only has integer x-values. FORECAST interpolates using the regression line.

Common Errors

#N/A

The known_y and known_x arrays have different lengths.

#DIV/0!

All x-values are identical (zero variance). The regression line is undefined.

Tips

Equivalent to SLOPE*x + INTERCEPT

FORECAST(x, y, x_known) = SLOPE(y, x_known)*x + INTERCEPT(y, x_known). It is a convenience function that combines both.

Only linear predictions

FORECAST assumes a straight-line relationship. If your data curves (exponential growth, seasonality), consider using LOGEST or time series methods instead.

Check RSQ before trusting results

If RSQ is low (below 0.5), the linear model is a poor fit and FORECAST predictions will be unreliable. Always validate the model first.

Try FORECAST in Viztab

Import your data and use FORECAST with 370+ other formulas. No signup required.

Open Viztab

Related Formulas