How To Add Trendline in Excel Chart Excel Trendline Types, Equations and Formulas
How To Add Trendline in Excel Chart Excel Trendline Types, Equations and Formulas
How To Add Trendline in Excel Chart Excel Trendline Types, Equations and Formulas
Where:
Trendline in Excel
A trendline, also referred to as a line of best fit, is a straight
or curved line in a chart that shows the general pattern or
overall direction of the data.
This analytical tool is most often used to show data
movements over a period of time or correlation between two
variables.
Exponential trendline
The exponential trendline is a curved line that illustrates a rise
or fall in data values at an increasing rate, therefore the line is
usually more curved at one side. This trendline type is often
used in sciences, for example to visualize a human population
growth or decline in wildlife populations.
Please note that an exponential trendline cannot be created
for data that contains zeros or negative values.
A good example of an exponential curve is the decay in the
entire wild tiger population on the earth.
Logarithmic trendline
The logarithmic best-fit line is generally used to plot data that
quickly increases or decreases and then levels off. It can
include both positive and negative values.
An example of a logarithmic trendline may be an inflation rate,
which first is getting higher but after a while stabilizes.
Polynomial trendline
The polynomial curvilinear trendline works well for large data
sets with oscillating values that have more than one rise and
fall.
Generally, a polynomial is classified by the degree of the
largest exponent. The degree of the polynomial trendline can
also be determined by the number of bends on a graph.
Typically, a quadratic polynomial trendline has one bend (hill
or valley), a cubic polynomial has 1 or 2 bends, and a quartic
polynomial has up to 3 bends.
When adding a polynomial trendline in an Excel chart, you
specify the degree by typing the corresponding number in
the Order box on the Format Trendline pane, which is 2 by
default:
Power trendline
The power trend line is very similar to the exponential curve,
only it has a more symmetrical arc. It is commonly used to
plot measurements that increase at a certain rate.
A power trendline cannot be added to an Excel chart that
contains zero or negative values.
As an example, let's draw a power trendline to visualize the
chemical reaction rate. Note the R-squared value of 0.9918,
which means that our trendline fits the data almost perfectly.
Where:
=INTERCEPT(C2:C13,B2:B13)
b: =INDEX(LINEST(LN(y), x), 1)
For our sample data set, the formulas take the following
shape:
a: =EXP(INDEX(LINEST(LN(C2:C13), B2:B13), 1, 2))
b: =INDEX(LINEST(LN(C2:C13), B2:B13), 1)
Logarithmic trendline equation and
formulas
Here's the logarithmic trendline equation in Excel:
y = a*ln(x)+b
b: =INDEX(LINEST(y, LN(x)), 1, 2)
b: =INDEX(LINEST(C2:C13, LN(B2:B13)), 1, 2)
b1: =INDEX(LINEST(y, x^{1,2}), 1, 2)
a: =INDEX(LINEST(y, x^{1,2}), 1, 3)
b2: =INDEX(LINEST(y, x^{1,2,3}), 1, 2)
b1: =INDEX(LINEST(y, x^{1,2,3}), 1, 3)
a: =INDEX(LINEST(y, x^{1,2,3}), 1, 4)
b1: =INDEX(LINEST(C2:C13, B2:B13^{1,2}), 1, 2)
a: =INDEX(LINEST(C2:C13, B2:B13^{1,2}), 1, 3)
b: =INDEX(LINEST(LN(y), LN(x),,), 1)
b: =INDEX(LINEST(LN(C2:C13), LN(B2:B13),,), 1)
Excel trendline equation is
wrong - reasons and fixes
If you think that Excel has drawn a trendline incorrectly or the
trendline formula displayed in your chart is wrong, the
following two points may shed some light on the situation.