Moving Average Calculator

Time Series

Moving Average Calculator

Calculate SMA and EMA. Smooth trends, reduce noise in time series data.

Input Data

Results

Latest SMA(3)
16.0000
Latest SMA
16.0000
Latest EMA
16.0000
Last Price
17.0000
Trend Signal
Bullish (Above SMA)

What are Moving Averages?

Moving Averages (MA) are statistical techniques that smooth time series data by calculating rolling averages over a fixed window. Two main types:

  • Simple Moving Average (SMA): SMA = (x₁ + x₂ + ... + xₚ) / p. Equal weight to all p values in window.
  • Exponential Moving Average (EMA): EMA = (current × multiplier) + (previous EMA × (1 − multiplier)). Recent values weighted more heavily; multiplier = 2/(period + 1).

Key Characteristics:

  • Reduces noise and random fluctuations in data.
  • Reveals underlying trends by smoothing.
  • SMA: symmetric, stable. EMA: responsive, faster trend detection.
  • Lagging indicator—reacts after markets move.
  • Window size controls smoothness vs. responsiveness trade-off.

Common Uses: Technical analysis, forecasting, demand planning, quality control, signal processing.

How to Calculate Moving Averages

1

Choose period (p)

Decide window size: 3 (responsive), 10 (balanced), 50 (smooth). Larger = smoother but slower response.

2

Calculate SMA

For each position i ≥ p: SMA[i] = average of last p values. Repeat for each data point.

3

Calculate EMA (optional)

Multiplier = 2/(p+1). Start with EMA₁ = SMA₁. Each EMA[i] = (current × mult) + (prior EMA × (1−mult)).

4

Interpret trend

Price above MA = uptrend (bullish). Price below MA = downtrend (bearish). Compare to recent history for signals.

Example Calculation

Data: 10, 11, 12, 11, 13, 14, 15, 16, 15, 17 Period: 3 SMA(3) Calculation: - SMA[2] = (10 + 11 + 12) / 3 = 11.00 - SMA[3] = (11 + 12 + 11) / 3 = 11.33 - SMA[4] = (12 + 11 + 13) / 3 = 12.00 - SMA[5] = (11 + 13 + 14) / 3 = 12.67 - SMA[6] = (13 + 14 + 15) / 3 = 14.00 - SMA[7] = (14 + 15 + 16) / 3 = 15.00 - SMA[8] = (15 + 16 + 15) / 3 = 15.33 - SMA[9] = (16 + 15 + 17) / 3 = 16.00 ← Latest SMA EMA(3) Calculation: Multiplier = 2/(3+1) = 0.5 - EMA[1] = SMA[1] = 11.00 (initialization) - EMA[2] = (12 × 0.5) + (11.00 × 0.5) = 11.50 - EMA[3] = (11 × 0.5) + (11.50 × 0.5) = 11.25 ... continuing pattern, EMA[9] ≈ 15.88 ← Latest EMA

Frequently Asked Questions

Related Tools