SLOPE (slope of a linear trend)

<< Click to Display Table of Contents >>

SLOPE (slope of a linear trend)

Syntax:

SLOPE(y_values, x_values)

Description:

This returns the slope of a best-fit line for the given values. The slope of a line is the value by which the y value grows when the x value is increased by 1.

A best-fit line is the result of a linear regression, a statistical technique that adapts a line (called "trendline" or "best-fit line") to a set of data points (for example, the results of a series of measurements).

For the arguments y_values and x_values, you usually specify a cell range.

Y_values are the dependent variables.

X_values are the independent variables.

Note:

Note that this function expects the y_values first and then the x_values – not the other way around.

Additional info:

The linear regression is performed with this function using the least squares method.

Example:

The resistance of a temperature-dependent resistor has been measured at several temperatures.

Cells A1:A4 contain the temperatures that were measured (the independent variables): 8, 20, 25, 28

Cells B1:B4 contain the resistances that were measured (the dependent variables): 261, 508, 608, 680

The following calculation returns the slope of a best-fit line based on these values:

SLOPE(B1:B4, A1:A4) returns 20.76799

See also:

INTERCEPT, FORECAST, PEARSON, STEYX