In this blog, I demonstrate four ways to calculate moving averages in Excel: with AVERAGE function, using data analysis, with OFFSET function, and adding moving average as trendline in a graph.

You can count manually the moving average. In the cell B6 we count average A2:A6. In the following the cell B7 the average is counted from A3:A7 and so on.
Another way is to install analysis toolpak in Excel option.


Then select data – data analysis – moving average.
Toolpak include different kinds of tools, but we are concentrating only on moving average.

Input range is the data range. Interval is five, we are taking average for five values. Output range is in B-column next to the values.
Press ok.

Excel created the averages automatically. As interval is five, first four values cannot have averages.
The moving average can also be done with OFFSET function.

In B6, we have an OFFSET function which has the reference in A2, then we do not move anywhere from A2 but just take five steps downwards. Then we activated area A2:A6. The nested function is taking AVERAGE from A2:A6. In the cell, we have a reference in A3 and function works fine.
This way is somewhat complicated but returns the same values as other options.

You can also add moving average into a graph.
Activate the data range and take insert – the graph.

Activate the line and take right mouse button, then select add trendline.

Select moving average and period 5.

As default the average line is quite thin, you can add value in width parameter.

Moving average in the graph.




