An exponential moving average (EMA) smooths a series of values, such as daily prices, temperatures or website visits, while giving more weight to recent observations. A simple moving average treats all of its values equally and drops the oldest abruptly, whereas the EMA lets old values fade out gradually. This calculator updates an EMA from the previous EMA and the latest value, and shows how quickly the average reacts.
How the calculation works
- Smoothing factor α = 2 ÷ (N + 1), with N the period
- New EMA = α × latest value + (1 − α) × previous EMA
- Half-life = ln(0.5) ÷ ln(1 − α), the number of periods after which an observation has lost half of its weight
- Weight of the last N observations = 1 − (1 − α)^N
Example
With a 12-period EMA, α = 2 ÷ 13 = 0.1538. The previous EMA was 100 and the latest value is 105, so the new EMA is 0.1538 × 105 + 0.8462 × 100 = 100.77. The latest value is above its EMA by 4.23. An observation loses half its weight after about 4.1 periods, and the last 12 observations carry about 87% of the total weight, compared with 8.33% each in a simple 12-period average.
Choosing the period
A short period reacts quickly but follows the noise. A long period is smooth but lags behind real changes. Traders often use 12 and 26 periods, or 50 and 200 for slower trends. Outside finance, the EMA is used for forecasting demand, smoothing sensor readings and tracking performance over time, with the period chosen to match how fast the underlying process changes.
Limits
The EMA always lags the data, and it cannot predict turning points. At the start of a series the first EMA values depend on the starting value you choose. The more observations that have passed, the less that choice matters. Use the EMA as a summary of the recent trend, not as a forecast on its own.