Moving Average Calculator
A moving-average forecast is the mean of the last m values: for sales 10, 12, 13, 12, 15, 16 the 3-period forecast for next period is 14.333333.
14.3333333333333
Full answer, then cut to fewer decimals (not rounded):
- 14.3333333333333
- 14.333333333333
- 14.33333333333
- 14.3333333333
- 14.333333333
- 14.33333333
- 14.3333333
- 14.333333
- 14.33333
- 14.3333
- 14.333
- 14.33
- 14.3
- MAE
- 1.88889
- MSE
- 4.77778
- RMSE
- 2.18581
- MAPE
- 12.4074 %
| Period | Actual | Forecast | Error |
|---|---|---|---|
| 1 | 10 | — | — |
| 2 | 12 | — | — |
| 3 | 13 | — | — |
| 4 | 12 | 11.6667 | 0.333333 |
| 5 | 15 | 12.3333 | 2.66667 |
| 6 | 16 | 13.3333 | 2.66667 |
| 7 | — | 14.3333 | — |
Step-by-step solution
- Fₜ₊₁ = (Aₜ + Aₜ₋₁ + … + Aₜ₋ₘ₊₁) ÷ m
- Next forecast = (12 + 15 + 16) ÷ 3 = 14.333333
Moving Average Formula
Fₜ₊₁ = (Aₜ + Aₜ₋₁ + … + Aₜ₋ₘ₊₁) ÷ m
Aₜ actual value in period t, m window length
Worked Example
Sales of 10, 12, 13, 12, 15, 16 with a 3-period moving average:
- Fₜ₊₁ = (Aₜ + Aₜ₋₁ + … + Aₜ₋ₘ₊₁) ÷ m
- Next forecast = (12 + 15 + 16) ÷ 3 = 14.333333
MSE: 4.77778 · RMSE: 2.18581 · MAPE: 12.4074 %
| Period | Actual | Forecast | Error |
|---|---|---|---|
| 1 | 10 | — | — |
| 2 | 12 | — | — |
| 3 | 13 | — | — |
| 4 | 12 | 11.6667 | 0.333333 |
| 5 | 15 | 12.3333 | 2.66667 |
| 6 | 16 | 13.3333 | 2.66667 |
| 7 | — | 14.3333 | — |
Choosing the number of periods
A moving average forecasts the next period as the mean of the last n actual values. A short window (n = 2–3) follows changes quickly; a long one smooths out noise but lags behind trends. A weighted moving average gives recent periods more weight and responds faster. Like simple exponential smoothing, the method suits data without trend or seasonality; with a trend, the forecast will consistently lag.
Frequently asked questions
How do I choose the window m?
A short window reacts quickly to changes but is noisier; a long window is smoother but lags. Compare MAE or MAPE for different windows on past data.
What is a weighted moving average?
Recent values get larger weights that sum to 1: Fₜ₊₁ = Σ wᵢAᵢ. Exponential smoothing is a weighted average with weights that decay geometrically.
How do I calculate a moving average in Excel?
Put =AVERAGE(B2:B4) next to the 4th value and fill down, or use Data Analysis › Moving Average.
Sources
- NIST/SEMATECH e-Handbook of Statistical Methods, National Institute of Standards and Technology .
Last reviewed: . Factors are stored exactly and computed with 50-digit decimal arithmetic. See how we verify conversion factors.
Cite this page
APA
Scientific Converters. (2026, October 15). Moving Average Calculator. Retrieved October 25, 2026, from https://scientificconverters.com/calculators/moving-average-calculator/
IEEE
Scientific Converters, "Moving Average Calculator," scientificconverters.com. Accessed: Oct. 25, 2026. [Online]. Available: https://scientificconverters.com/calculators/moving-average-calculator/