Moving Average Calculator — SMA & EMA
Paste any time series — stock prices, sales figures, sensor readings — choose the period and instantly get the Simple Moving Average (SMA) and Exponential Moving Average (EMA) for each point, with a chart overlaying the smoothed line on the raw data.
Simple Moving Average — unweighted mean of the last 4 values
- 1
Sum of last 4 values
57 + 60 + 58 + 62 = 237 - 2
Simple Moving Average
237 ÷ 4 = 59.2500Unweighted mean of the last N data points in the window.
How does this calculator work?
SMA(N) = arithmetic mean of the last N values (equal weight). EMA(N) = α × current + (1−α) × previous EMA, where α = 2/(N+1) (recent values weighted higher). Both smooth noisy series; EMA reacts faster. Enter your series and period to get both averages charted against the raw data.
Formula
How this is calculated
A moving average smooths a noisy time series by averaging nearby observations. The Simple Moving Average (SMA) gives equal weight to each of the last N values: SMA = sum of last N values / N. It lags behind rapid changes because an old data point has the same weight as the most recent one.
The Exponential Moving Average (EMA) fixes this by weighting recent values more heavily. The smoothing factor α = 2 / (N+1) controls how quickly older observations fade: EMA_i = α × current + (1 − α) × previous EMA. An EMA with the same period N as an SMA reacts faster to price moves while still filtering noise — which is why traders often prefer the EMA for momentum signals.
For the first N−1 points there are not yet enough observations to form an SMA. The EMA is seeded at position N−1 with the first SMA value, then extended forward. Both averages share the same period N: larger N gives a smoother but slower-reacting average; smaller N is more reactive but noisier.
Frequently asked questions
SMA weights all N values equally, so it changes slowly and lags behind trends. EMA applies exponentially decreasing weights so the most recent data matters most — making it faster to react to a trend change at the cost of slightly more sensitivity to noise.
Common choices in finance are 10, 20, 50 and 200 periods. Short periods (10–20) track short-term trends; long periods (50–200) smooth out noise and reveal long-term direction. The best period depends on your data frequency and the time-horizon you care about.
Yes. Moving averages apply to any time series — sensor readings, website traffic, daily temperatures or production volumes. Enter your values as comma-separated numbers and choose a period that represents a meaningful smoothing window for your use case.
Also known as
TG we-Calculate Editorial Team. (2026). Moving Average Calculator — SMA & EMA [Online calculator]. TG we-Calculate. https://we-calculate.com/calculator/moving-average-calculator
TG we-Calculate Editorial Team. "Moving Average Calculator — SMA & EMA." TG we-Calculate. 2026. https://we-calculate.com/calculator/moving-average-calculator.
TG we-Calculate Editorial Team, "Moving Average Calculator — SMA & EMA," TG we-Calculate, 2026. [Online]. Available: https://we-calculate.com/calculator/moving-average-calculator
@misc{wecalculate_moving_average_calculator, title = {Moving Average Calculator — SMA & EMA}, author = {{TG we-Calculate Editorial Team}}, howpublished = {\url{https://we-calculate.com/calculator/moving-average-calculator}}, year = {2026}, note = {TG we-Calculate} }
Did this calculator help you?
