Intermediate

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.
Comma-separated numbers (prices, measurements, any series)
Number of data points per average window
Latest SMA
59.2500

Simple Moving Average — unweighted mean of the last 4 values

Period (N)
4
Smoothing factor α
0.4
Latest EMA
58.9881
Data points
12
Step by step
  1. 1

    Sum of last 4 values

    57 + 60 + 58 + 62 = 237
  2. 2

    Simple Moving Average

    237 ÷ 4 = 59.2500
    Unweighted mean of the last N data points in the window.
Lock the current result, then change any input to compare scenarios.
Results are estimates for general information only and are not professional advice — always verify important results independently before relying on them. This is not financial, investment or tax advice; consult a qualified professional. Read the full disclaimer.
Quick answer

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
SMA_n = (x_i + x_{i−1} + … + x_{i−N+1}) / N • EMA_i = α × x_i + (1−α) × EMA_{i−1} where α = 2 / (N+1)
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

simple moving average sma calculator
exponential moving average ema
rolling average calculator
stock price moving average
technical analysis ema sma
moving average smoothing
time series average calculator

APA

TG we-Calculate Editorial Team. (2026). Moving Average Calculator — SMA & EMA [Online calculator]. TG we-Calculate. https://we-calculate.com/calculator/moving-average-calculator

Chicago

TG we-Calculate Editorial Team. "Moving Average Calculator — SMA & EMA." TG we-Calculate. 2026. https://we-calculate.com/calculator/moving-average-calculator.

IEEE

TG we-Calculate Editorial Team, "Moving Average Calculator — SMA & EMA," TG we-Calculate, 2026. [Online]. Available: https://we-calculate.com/calculator/moving-average-calculator

BibTeX

@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?