SLOPE function

SLOPE(YValues, XValues) SLOPE(YValues; XValues)

YValues

{ Number }

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

XValues

{ Number }

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

Returns

Number

The slope of a straight line which has been fitted to data using linear regression.

Fits a straight line to data using linear regression and returns its slope.

Examples

SLOPE({ 1, 2, 3, 4, 5 }, { 2, 4, 6, 8, 11 })SLOPE({ 1; 2; 3; 4; 5 }; { 2; 4; 6; 8; 11 })

Returns roughly 0.45.

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

Returns roughly 0.033.

Partly derived from the OpenOffice.org documentation, licensed under the Apache License 2.0.