Moving average is frequently used to understand underlying trends and helps in forecasting. MACD or moving average convergence / divergence is probably the most used technical analysis tools in stock trading. It is fairly common in several businesses to use moving average of 3 month sales to understand how the trend is.
Today we will learn how you can calculate moving average and how average of latest 3 months can be calculated using excel formulas.

Calculate Moving Average
To calculate moving average, all you need is the good old AVERAGE excel function.
Assuming your data is in the range B1:B12,
- Just enter this formula in the cell D3
- =AVERAGE(B1:B3)
- And now copy the formula from D3 to the range D4 to D12 (remember, since you are calculating moving average of 3 months, you will only get 10 values; 12-3+1)
- That is all you need to calculate moving average.
Calculate Moving Average of Latest 3 Months Alone

Lets say you need to calculate the average of last 3 months at any point of time. That means when you enter the value for the next month, the average should be automatically adjusted.
We can do that using excel formulas AVERAGE, COUNT and OFFSET
First let us take a look at the formula and then we will understand how it works.
=AVERAGE(OFFSET(B4,COUNT(B4:B33)-3,0,3,1))
So what the heck the above formula is doing anyway?
- It is counting how many months are already entered – COUNT(B4:B33)
- Then it is offsetting count minus 3 cells from B4 and fetching 3 cells from there – OFFSET(B4,COUNT(B4:B33)-3,0,3,1). These are nothing but the latest 3 months.
- Finally it is passing this range to AVERAGE function to calculate the moving average of latest 3 months.
Your Home Work
Now that you have learned how to calculate moving average using Excel, here is your home work.
- Lets say you want the number of months used to calculate moving average to be configurable in the cell E1. ie when E1 is changed from 3 to 6, the moving average table should calculate moving average for 6 months at a time. How do you write the formulas then?
Don’t look at the comments, go and figure this out for yourself. If you cant find the answer, come back here and read the comments. Go!
This post is part of our Spreadcheats series, a 30 day online excel training program for office goers and spreadsheet users. Join today.

















9 Responses to “CP044: My first dashboard was a failure!!!”
CONGRATS on the book!
Thanks for this podcast. It's great to hear about your disaster and recovery. It's a reminder that we're all human. None of this skill came easily.
Thank you Oz. I believe that we learn most by analyzing our mistakes.
Hey chandoo
this really a good lesson learned
but as I have already stated in one of my previous email that it would be more helpful for us if you could release videos of your classes for us
thanks
The article gave me motivation, especially you describing the terrible disaster that you faced but how to get back from the setbacks. Thanks for that, but with video this will be more fun.
Hi Nafi,
Thanks for your comments. Please note that this is (and will be) audio podcast. For videos, I suggest subscribing to our YouTube channel. No point listening to audio and saying its not video.
You always motivate me with respect of the tools in excel. How we can really exploit it to the fullest. Thanks very much
Thank you Amankwah... 🙂
Thank you very much, Chandoo, for your excellent lessons, I am anxious to learn so valuable tips and tricks from you, keep up the great job!
I truly appreciate the transcripts of the podcasts, because as a speaker of English as a second language, it allows me to fully understand the material. It'd be great if you can add transcripts to your online courses too, I am sure people will welcome this feature.
Dashboards for Excel has arrived in Laguna Beach, CA! Thanks!
Now I need to make time to "learn and inwardly digest" its contents as one of my high school teachers would admonish us!