Skip to main content
Calcimator

Moving Average Calculator

Calculate Simple Moving Average (SMA), Exponential Moving Average (EMA), Cumulative Moving Average (CMA), and Weighted Moving Average from a series of data points.

About this calculator

This calculator computes four different rolling statistics from up to ten sequential Period values: Simple Moving Average (lines 14-25, the unweighted mean of the last Window Size periods), Exponential Moving Average (lines 27-36, a recursive formula that seeds from Period 1 and then blends each subsequent period in at multiplier = EMA Smoothing Factor / (Window Size + 1)), Cumulative Moving Average (lines 44-49, the running mean of every period entered so far, independent of Window Size), and Weighted Moving Average (lines 52-61, a linearly-weighted mean over the last Window Size periods that gives the most recent period the largest weight). At the defaults, EMA Smoothing Factor is completely inert for Simple, Cumulative, and Weighted Moving Average — none of their formulas reference it, since it only appears in the EMA multiplier (line 28). Window Size is likewise inert for Cumulative Moving Average, which always averages the full period history regardless of how the window is set (lines 44-49 never read windowSize).

Period 10, the most recent data point, dominates Exponential Moving Average's sensitivity — not because it happens to be a large number, but because EMA's recursive blending (line 33) structurally weights the most recent input the heaviest, a genuine recency-weighting mechanism unlike Simple Moving Average's flat window average, where the "dominant" input is only dominant because its default magnitude (26) happens to exceed its window-mates' (19 and 24). This calculator does not detect trend breaks, seasonality, or outliers — it only smooths, so a sudden one-period spike still fully enters every average that includes it.

Inputs

Results

Simple Moving Average (SMA)

23

Exponential Moving Average (EMA)

23.87

Cumulative Moving Average (CMA)18
Weighted Moving Average (WMA)24.17
Periods Used10
Window Size3
How to Use This Calculator
  1. Enter the time series data points and the desired window size.
  2. Select moving average type: simple (SMA), exponential (EMA), or weighted (WMA).
  3. Review the smoothed series values and lag introduced by the window.
  4. Use shorter windows to detect trends sooner; use longer windows for noise reduction.
  5. Compare SMA vs. EMA to determine which better tracks your data underlying trend.

How the result changes with Period 10

Period 10Simple Moving Average (SMA)Exponential Moving Average (EMA)
1318.6717.37
202120.87
3927.3330.37
653643.37

What each input means

Period 1
Value for the first time period in your data series.
Period 2
Value for the second time period.
Period 3
Value for the third time period.
Period 4
Value for the fourth time period.
Period 5
Value for the fifth time period.
Period 6
Value for the sixth time period.
Period 7
Value for the seventh time period.
Period 8
Value for the eighth time period.
Period 9
Value for the ninth time period.
Period 10
Value for the tenth time period.
Window Size
Number of periods to include in each moving average window.
EMA Smoothing Factor
Smoothing constant for EMA calculation. Standard value is 2. Higher = more weight on recent data.

How this is calculated

Worked example, using the default values

  1. Identify Input Parameters
    4 parameters
    Period 1 = 10, Period 2 = 12, Period 3 = 15, Period 4 = 14 = 12 input(s) provided
  2. Calculate Simple Moving Average
    Simple Moving Average
    23 = 23
  3. Calculate Exponential Moving Average
    Exponential Moving Average
    23.8672 = 23.8672
  4. Calculate Cumulative Moving Average
    Cumulative Moving Average
    18 = 18
  5. Calculate Weighted Moving Average
    Weighted Moving Average
    24.1667 = 24.1667

Engine last updated . Checked against 1 independently-derived test — how we verify calculators. Built by Paul Gunder, a software engineer, not a licensed financial, medical, or legal professional.

Frequently Asked Questions

Does the EMA Smoothing Factor affect the Simple Moving Average?

No. Simple Moving Average is a plain arithmetic mean of the last Window Size periods (lines 14-25); EMA Smoothing Factor only appears in the Exponential Moving Average's multiplier calculation (line 28) and never enters the SMA loop, so changing it leaves Simple, Cumulative, and Weighted Moving Average completely unchanged.

Why doesn't Window Size change the Cumulative Moving Average?

Cumulative Moving Average always averages every period entered so far, from Period 1 through the last period supplied (lines 44-49) — the loop that builds it never reads Window Size at all, unlike Simple and Weighted Moving Average, which only look at the most recent Window Size periods.

Why does Period 10 move the Exponential Moving Average more than the Simple Moving Average?

Because the two formulas weight it differently. Simple Moving Average treats every period inside the window equally (line 23 divides by windowSize), so Period 10's outsized influence there comes only from its default value (26) being larger than the other two periods in the window. Exponential Moving Average, by contrast, structurally weights the newest data point the heaviest through its recursive blending step (line 33), so Period 10 would dominate EMA even if all ten periods shared the same default value.

Does the Weighted Moving Average always favor the most recent period?

Yes — Weighted Moving Average assigns linearly increasing weights within the window, so the most recent included period always carries the largest weight (weight = i − startIdx + 1, line 57), meaning raising the most recent period's value always raises the Weighted Moving Average, regardless of what the other periods in the window are set to.

The questions that sit next to this one — chosen by subject, including calculators filed under a different category.

More in Math & Statistics.