Equations for calculating trendlines

Microsoft Office Excel 2003

Calculates the least squares fit for a line represented by the following equation:

Equation

where m is the slope and b is the intercept.

ShowPolynomial

Calculates the least squares fit through points by using the following equation:

Equation

where b and Variable are constants.

ShowLogarithmic

Calculates the least squares fit through points by using the following equation:

Equation

where c and b are constants, and ln is the natural logarithm function.

ShowExponential

Calculates the least squares fit through points by using the following equation:

Equation

where c and b are constants, and e is the base of the natural logarithm.

ShowPower

Calculates the least squares fit through points by using the following equation:

Equation

where c and b are constants.

ShowR-squared value

Equation

Note  The R-squared value you can display with a trendline is not an adjusted R-squared value. For logarithmic, power, and exponential trendlines, Microsoft Excel uses a transformed regression model.

ShowMoving average

Equation

Note  The number of points in a moving average trendline equals the total number of points in the series less the number you specify for the period.