How it’s calculated
A moving average smooths a series by averaging a window of recent values and sliding the window forward one step at a time. It shows the underlying level of noisy data, and the latest average is a simple forecast for the next period when there is no trend.
The simple and weighted averages start once N values are available. The exponential moving average uses every past value, with weights α, α(1 − α), α(1 − α)², … that shrink geometrically. It starts from the first value, one of the common ways to initialise it. (NIST writes the same recursion as a forecast, Sₜ₊₁ = αxₜ + (1 − α)Sₜ, so its S for period t + 1 equals the EMA shown here for period t.)
Example (NIST/SEMATECH e-Handbook, 6.4.2.1): dollar amounts 9, 8, 9, 12, 9, 12, 11, 7, 13, 9, 11, 10 with a 3-period simple moving average. The first average is (9 + 8 + 9)/3 = 8.667, then 9.667, 10, 11, 10.667, 10, 10.333, 9.667, 11 and finally (9 + 11 + 10)/3 = 10, matching the handbook’s table. These are the default values. With linear weights 1, 2, 3 the last weighted average is (9 + 22 + 30)/6 = 10.167.
Frequently asked questions
Which moving average should I use?
A simple moving average is easiest to explain. A weighted or exponential average reacts faster to recent changes. Exponential smoothing needs only one number (α) and never drops old data abruptly.
How do I choose the period or α?
Longer periods (or smaller α) give smoother lines but lag further behind turning points. A common approach is to try several and choose the one with the smallest forecast errors on past data.
Why are there fewer averages than values?
A simple or weighted average of N values needs N values to exist, so the first N − 1 periods have no average. The exponential average starts at the first value, so it has one for every period.
Can I use a moving average to forecast a trend?
Not well. A plain moving average always lags behind a rising or falling series. Use a method with a trend term, such as double exponential smoothing or regression, for trending data.
Embed this calculator
Add this free calculator to your own website. Copy the code below into your page’s HTML:
Need this calculator branded, changed or built around your own prices?See custom business solutions →
Sources
- NIST/SEMATECH e-Handbook, 6.4.2.1 Single Moving Average — NIST
- NIST/SEMATECH e-Handbook, 6.4.3.1 Single Exponential Smoothing — NIST
- Forecasting with moving averages (Nau), Fuqua School of Business — Duke University
Formulas are taken from the free public references above. Results are provided “as is” for informational and educational purposes only. See our disclaimer.
Added · Last updated · How we check our calculators
Spotted a mistake or missing option? Report a problem· Suggest a calculator