Formualizer Docs
ReferenceFunctionsStatistics Functions

FORECAST.LINEAR

FORECAST.LINEAR: Returns a predicted y-value at `x` from simple linear regression over known data.

Summary

FORECAST.LINEAR fits y = intercept + slope * x and evaluates that line at the requested x.

Remarks

  • Requires known_y and known_x arrays with the same numeric length.
  • Returns #N/A when arrays are empty or lengths do not match.
  • Returns #DIV/0! when known_x has zero variance.
  • Alias FORECAST is supported.

Examples

Predict next point on a perfect line
Grid
CellValue
No inputs on Sheet1.
Formula
=
Result
Not evaluated yet.
Expected
8
Forecast with non-zero intercept
Grid
CellValue
No inputs on Sheet1.
Formula
=
Result
Not evaluated yet.
Expected
11

Runtime metadata

Category

Statistics

Signature

FORECAST.LINEAR(arg1, arg2, ... argN: Number (Range))

This function accepts a repeating argument pattern (min args: 3).

Arity

min 3, max 1

Arguments

arg1

Number · Range · coercion NumberLenientText

Caps

PURENUMERIC_ONLY

Source

On this page