Calculate Moving Average

Share

Facebook
Twitter
LinkedIn

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 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

Rolling Average of Last 3 Months
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.

Facebook
Twitter
LinkedIn

Share this tip with your colleagues

Excel and Power BI tips - Chandoo.org Newsletter

Get FREE Excel + Power BI Tips

Simple, fun and useful emails, once per week.

Learn & be awesome.

Welcome to Chandoo.org

Thank you so much for visiting. My aim is to make you awesome in Excel & Power BI. I do this by sharing videos, tips, examples and downloads on this website. There are more than 1,000 pages with all things Excel, Power BI, Dashboards & VBA here. Go ahead and spend few minutes to be AWESOME.

Read my storyFREE Excel tips book

Overall I learned a lot and I thought you did a great job of explaining how to do things. This will definitely elevate my reporting in the future.
Rebekah S
Reporting Analyst
Excel formula list - 100+ examples and howto guide for you

From simple to complex, there is a formula for every occasion. Check out the list now.

Calendars, invoices, trackers and much more. All free, fun and fantastic.

Advanced Pivot Table tricks

Power Query, Data model, DAX, Filters, Slicers, Conditional formats and beautiful charts. It's all here.

Still on fence about Power BI? In this getting started guide, learn what is Power BI, how to get it and how to create your first report from scratch.

5 Responses to “Show more of your workbook on screens [quick tip]”

  1. Bda75 says:

    In 2013 you can also add to the QAT the hidden command "Toggle Full Screen View".

  2. Chris Newman says:

    Instead of using the shortcut CTRL+F1, I prefer just to double-click one of the tab names (ie double-click the "Home" text on the Home tab) to enable the Ribbon Outline view. To return to the normal Ribbon state, just double-click your mouse again!

  3. liu says:

    press Ctrl+Shift+F1, you will get a full screen

  4. efand says:

    Instead of Ctrl + F1, I use Ctrl + Shift + F1 (Excel 2016)

  5. Jay says:

    Alt W E sequence for full screen
    ESC to get back

Leave a Reply