# Moving Average Calculator

> Calculate simple (SMA), exponential (EMA) and linearly weighted (WMA) moving averages for any window, with the full series in a table and chart.

Category: Statistics & probability · Applies to: Worldwide · Last updated: 2026-10-29
Interactive calculator: https://calculators.geekmidst.com/calculators/moving-average-calculator

A moving average smooths a series by averaging the most recent k values. The simple average weights them equally; the exponential and weighted versions lean towards the latest values.

Also called: Rolling average calculator, SMA calculator, EMA calculator.

## Inputs
- Series (oldest first) (default 2, 4, 6, 8, 12)
- Window (k) (unit periods; default 3)

## Results
- Latest simple moving average
- Latest exponential moving average
- Latest weighted moving average
- EMA smoothing factor α
- Averages calculated

## Formula

```
SMA = (x₁ + … + x_k) ÷ k;  EMA_t = α·x_t + (1 − α)·EMA_{t−1}, α = 2 ÷ (k + 1), first EMA = first SMA;  WMA = Σ j·x_j ÷ (k(k + 1)/2), newest weight k
```

Where:
- k: window length
- x: values in the window
- α: EMA smoothing factor

## Worked example
1. Latest SMA = (6 + 8 + 12) ÷ 3 = 8.6667.
2. α = 2 ÷ (3 + 1) = 0.5. EMA starts at the first SMA, 4; then 0.5 × 8 + 0.5 × 4 = 6; then 0.5 × 12 + 0.5 × 6 = 9.
3. WMA = (1 × 6 + 2 × 8 + 3 × 12) ÷ 6 = 9.6667.

**Result:** With a 3-period window the latest SMA is 8.67, the EMA 9 and the WMA 9.67.

## What the result means

Moving averages lag the data. The SMA lags most; the EMA and WMA react faster to the latest change. A longer window smooths more but lags more.

## Assumptions and limits
- Values are equally spaced in time and listed oldest first.
- The EMA is seeded with the simple average of the first k values, the usual convention.
- EMA values for the first few periods depend on the seeding method, so they can differ slightly from charting software that seeds differently.

## Questions

### Why does my EMA differ from my trading platform?

Platforms differ in how they start the EMA (first value or first SMA) and how much history they load. After about 3k periods the difference becomes negligible.

### Should I use a centred moving average?

For smoothing historical data, a centred average avoids lag. For forecasting or live signals, use a trailing average like this one, which only uses past values.

## Related calculators
- [Exponential Smoothing Calculator](https://calculators.geekmidst.com/calculators/exponential-smoothing-calculator)
- [Time Series Growth Calculator](https://calculators.geekmidst.com/calculators/time-series-growth-calculator)
- [Average Calculator](https://calculators.geekmidst.com/calculators/average-calculator)

Source: GM¹X CalcVerse — https://calculators.geekmidst.com/calculators/moving-average-calculator
