Moving Averages Explained: Smoothing Noisy Data With a Worked Example

October 21, 2026

A moving average replaces each data point with the average of itself and the points around it, producing a smoother line that reveals the underlying trend. It is widely used to read daily body weight, weekly sales, website traffic, stock prices, and sensor data. Because it is built from the ordinary average, it is easy to calculate by hand, in a spreadsheet, or in a calculator.

The trade-off is that smoothing introduces lag: the more points you average, the smoother the line but the later it reacts to a real change.

Skip the math and get your answer instantly:

Open the Average Calculator →

How a Simple Moving Average Works

For a window of n periods, the moving average at time t is the mean of the last n values. Take the weekly sales series 12, 15, 14, 18, 20, 19, 23. The 3-period moving average starts at the third value: (12 + 15 + 14) ÷ 3 = 13.67. Then (15 + 14 + 18) ÷ 3 = 15.67, (14 + 18 + 20) ÷ 3 = 17.33, (18 + 20 + 19) ÷ 3 = 19.00, and (20 + 19 + 23) ÷ 3 = 20.67.

Each new average drops the oldest value and adds the newest, so you can update it quickly: add the new value, subtract the oldest, and divide by n.

PeriodValue3-period average5-period average
112
215
31413.67
41815.67
52017.3315.80
61919.0017.20
72320.6718.80

Window Length: Smooth or Responsive?

A short window follows the data closely but still shows noise. A long window is smooth but reacts slowly. In the example, the 3-period average for period 7 is 20.67 and the 5-period average is 18.80, while the last actual value is 23. The longer the window, the further the average sits behind a rising series.

Choose the window based on the cycle in your data. For daily data with weekly patterns, a 7-day window removes day-of-week effects. For body weight, a 7-day average ignores daily fluctuations from water and digestion and shows the real trend.

Using a Moving Average for Weight Tracking

If your daily weights are 80.4, 80.9, 80.1, 80.6, 79.9, 80.3, 79.8, the 7-day average is 80.29. A week later, if the next 7 values average 79.9, you have lost about 0.4 kg that week, even though individual days jumped around by more than a kilogram. Looking at averages prevents panic over a single high reading and prevents false celebration over a single low one.

Spreadsheets compute this with a simple formula, such as =AVERAGE(B2:B8) copied down the column.

Weighted and Exponential Moving Averages

A weighted moving average gives recent values more weight, so it reacts faster. An exponential moving average (EMA) applies weights that decline geometrically: EMA_today = α × value_today + (1 − α) × EMA_yesterday, with α = 2 ÷ (n + 1). For a 9-period EMA, α = 0.2. It does not drop old data abruptly, which avoids the sudden jumps a simple moving average shows when a large value leaves the window.

Traders use these to identify trends and crossovers, but they are descriptive tools and do not predict future prices on their own.

Limits and Misuses

Moving averages are backward-looking and can mask turning points. They also distort cycles: averaging over a window that matches a seasonal period removes the seasonality entirely, which may be what you want or may hide something important. At the start of a series, the first n − 1 points have no average. Remember to label which type and window you use whenever you present a smoothed line.

Frequently Asked Questions

What is a moving average?

An average of the most recent n data points, recalculated as new data arrives.

How many periods should I use?

Match the window to the cycle in your data. Seven days is common for daily data with weekly patterns.

Why does a moving average lag?

Because it includes older values, it reacts after a change has already begun.

What is the difference between SMA and EMA?

A simple moving average weights all points equally. An exponential moving average weights recent points more heavily.

Can I use it to forecast?

It can give a rough baseline, but it does not account for trends or seasonality by itself.