FORECAST function

FORECAST(X, YValues, XValues) FORECAST(X; YValues; XValues)

X

Number or { Number }

The horizontal coordinate of the point.

YValues

{ Number }

The vertical coordinates of the data points. This array must have the same size as the xValues parameter.

XValues

{ Number }

The horizonal coordinates of the data points. This array must have the same size as the yValues parameter.

Returns

Number or { Number }

The vertical coordinate of the point on a straight line which has been fitted to data using linear regression.

Fits a straight line to data using linear regression and returns the vertical coordinate of a point on that line.

Example

FORECAST(170, { 8, 9, 10, 11 }, { 50, 80, 110, 140 })FORECAST(170; { 8; 9; 10; 11 }; { 50; 80; 110; 140 })

Returns 12.