Moving Average Calculator

Simple, weighted or exponential moving average of a data series, with the full table of averages and the latest value as a forecast.

Up to 2000 values in time order. Use a point for decimals (1.5), no thousands separators, and separate numbers with spaces or a comma and a space.

Results

Latest simple moving average (period 3)
10
Used as the forecast for the next period when the series has no trend.
All 10 averages
8.6666667, 9.6666667, 10, 11, 10.666667, 10, 10.333333, 9.6666667, 11, 10
Table
t | value | average 1 | 9 | – 2 | 8 | – 3 | 9 | 8.6666667 4 | 12 | 9.6666667 5 | 9 | 10 6 | 12 | 11 7 | 11 | 10.666667 8 | 7 | 10 9 | 13 | 10.333333 10 | 9 | 9.6666667 11 | 11 | 11 12 | 10 | 10
How each value is calculated
Each average = (sum of the last 3 values) ÷ 3
Number of averages
10

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.

simple: Mₜ = (xₜ + xₜ₋₁ + … + xₜ₋ₙ₊₁) / N weighted: Mₜ = (w₁xₜ₋ₙ₊₁ + … + w_N xₜ) / (w₁ + … + w_N) default weights 1, 2, …, N (newest = N) exponential: Sₜ = α·xₜ + (1 − α)·Sₜ₋₁, S₁ = x₁, 0 < α ≤ 1

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

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