Calcoid
Math

Moving Average Calculator (SMA, EMA, WMA)

Compute Simple, Exponential, or Weighted moving averages over any numeric series. Pick a window size, EMA alpha, and see the full smoothed series with min, max, latest value, and trend direction.

Moving Average (SMA, EMA, WMA)

Separate values with commas, spaces, tabs, semicolons, or new lines. Needs 5 to 1000 values.

Max is half the series length.

Default 2 / (window + 1). Range (0, 1].

Latest SMA (window 5)

23.2

Trend: rising (last 5 averages above first 5)

Max average

23.2

Min average

12.4

Defined from index

4

Window size

5

Type

SMA

Alpha (EMA)

n/a

Last 15 averages (index 0 to 14)

  • 0: -
  • 1: -
  • 2: -
  • 3: -
  • 4: 12.4
  • 5: 13.8
  • 6: 14.6
  • 7: 15.6
  • 8: 17
  • 9: 18.2
  • 10: 19.2
  • 11: 20
  • 12: 21
  • 13: 22.2
  • 14: 23.2

Frequently Asked Questions about the Moving Average Calculator (SMA, EMA, WMA)

SMA vs EMA vs WMA: which moving average should I use?
The three average the same window of values but assign weight differently. SMA (Simple Moving Average) gives every value in the window equal weight, so a five-day SMA is just (v1 + v2 + v3 + v4 + v5) / 5. EMA (Exponential Moving Average) puts most of the weight on the newest value and exponentially less on every earlier one, which is why it reacts fastest to a change. WMA (Weighted Moving Average) is linear: the newest value gets weight = window size, the next gets one less, down to weight 1 for the oldest value in the window, divided by the sum 1 + 2 + ... + window. Reach for SMA when you want a clean long-term trend baseline (a 200-day SMA on a stock price), EMA when you need responsiveness to recent change (12 / 26 EMA in MACD, intraday signals), and WMA when you want a middle ground that still up-weights recent data but in a simpler, more transparent way than EMA.
Why does the EMA react faster to recent changes than the SMA?
Because the EMA never fully forgets a value, but it shrinks its influence exponentially with each step. The recurrence is EMA_t = price_t * alpha + EMA_(t-1) * (1 - alpha), with alpha typically set to 2 / (window + 1). The newest value carries the full weight alpha, the previous one carries alpha * (1 - alpha), the one before that alpha * (1 - alpha)^2, and so on. For a 10-period EMA (alpha = 0.1818), the latest value contributes about 18 percent of the result, the previous about 15 percent, the one before that about 12 percent. By comparison, every value in a 10-period SMA contributes exactly 10 percent. So a sudden jump in the most recent value moves the EMA almost twice as much as it moves the SMA of the same window, which is the whole point of the metric: faster signal at the cost of more noise.
Why is the default EMA alpha 2 / (N + 1)?
The 2 / (N + 1) formula was chosen so the center of mass of an N-period EMA roughly matches the average position inside an N-period SMA window. With this alpha, the most recent N values carry about 86 percent of the EMA weight, the same way they carry 100 percent of the SMA weight. Practically, it means a 10-period EMA and a 10-period SMA can be compared apples-to-apples in chart packages. You can override the alpha here if you have a different convention (some platforms use 1 / N, some prefer hand-tuned values for specific markets). Anything inside (0, 1] is accepted: closer to 1 makes the EMA hug the latest value almost exclusively, closer to 0 makes it nearly flat.
When is the Simple Moving Average actually the better choice?
Use SMA when you want a stable, long-term trend baseline and do not care about reacting fast to the latest move. The 200-day SMA on equity prices is the canonical example: it is slow on purpose, because traders and analysts treat it as a structural support and resistance line that should not flip on a single noisy week. SMA is also the right pick when you are smoothing data with heavy short-term noise that you actively want to suppress (daily web traffic with weekday and weekend swings, IoT sensor readings, sales counts with promo spikes). The downside is the obvious one: when a real trend change starts, the SMA is the last metric to confirm it. If you need an early signal, switch to EMA or WMA.
Why do all moving averages lag the original series?
Because each moving-average value at time t is computed from values up to and including time t, never from future values. The smoothing always pulls the result toward older data. For an N-period SMA, the lag is on the order of (N - 1) / 2 periods, meaning a 20-day SMA effectively reflects the average position of the value 9 to 10 days ago. EMA and WMA reduce that lag by overweighting recent values (EMA lag is roughly (N - 1) / 2 only when alpha = 2 / (N + 1), but the weight skew means it reacts faster in practice), and shorter windows always lag less than longer ones. There is a real trade-off: less lag means more responsive but noisier signals, more lag means smoother but slower. The right window is the one that filters the noise you do not care about while still tracking the changes you do.