Your cart is currently empty!
How to Calculate a Moving Average in Microsoft Excel
A moving average helps smooth out data by filtering out short-term fluctuations and highlighting longer-term trends. Whether you’re tracking stock prices, sales numbers, or website traffic, calculating a moving average in Excel is a quick way to get insights. Here’s how to do it.
Step 1: Set Up Your Data
Before anything else, make sure your data is organized in a single column with a corresponding date or time column. For example:
Date | Sales |
---|---|
1/1/2025 | 100 |
1/2/2025 | 120 |
1/3/2025 | 130 |
… | … |
Let’s say column A is the date and column B is your metric (e.g., daily sales).
Step 2: Choose Your Moving Average Window
Decide how many periods you want to average. A 3-day moving average is common for short-term trends, while a 7- or 30-day average smooths things out more.
Step 3: Enter the Moving Average Formula
In the first row where a full window of data is available (for a 3-day average, start on row 4), enter this formula in column C:
=AVERAGE(B2:B4)
Then drag the formula down the column.
This will give you the average of the current day and the two previous days—your 3-day moving average.
Step 4: Label Your Column
To stay organized, label column C as something like “3-Day Moving Avg”.
Optional: Use Excel’s Built-in Moving Average Tool
If you’re working with larger datasets or want to visualize trends, Excel has a built-in feature:
- Select your data.
- Go to Insert → Charts → Choose a Line or Scatter chart.
- Once your chart is created, click on the data series.
- In the top menu, go to Chart Design → Add Chart Element → Trendline → Moving Average.
- Choose the period (e.g., 3) in the Format Trendline pane.
This overlays a moving average on your chart without modifying your raw data.
Final Tips
- Moving averages lag behind real-time data—they show trends, not predictions.
- The longer the period, the smoother the line—but the slower it reacts.
- Always double-check your range when copying formulas—Excel won’t auto-adjust ranges unless you set it up properly.
Wrapping Up
Calculating a moving average in Excel is easy, useful, and powerful. Whether you’re analyzing data for business, personal finance, or research, it’s a simple way to reveal trends and make smarter decisions.
Got questions or want to see more Excel tips? Drop a comment or subscribe for updates.