Moving Average Calculator (SMA, EMA, WMA)

Calculate moving averages from a data series: per-point SMA (simple), EMA (exponential, α=2/(n+1)), and WMA (weighted), detect two-period golden cross / death cross crossovers, and compare the moving averages of two series — all 100% in your browser.

Results are educational — not investment/trading advice.

SMA — Simple Moving Average

Formula per point: (sum of the last n values) ÷ n. Enter one value per line, from oldest to newest.

Verified example

When to use another calculator on this site?

This tool is for time series only: per-point SMA, EMA, and WMA, two-period crossover detection, and a two-series moving average comparator.

Frequently Asked Questions

What is a moving average?

A moving average is the average of the most recent values, recalculated every time a new value arrives, so it moves along with the time series. Example: SMA(3) of the series 10, 20, 30, 40, 50 gives 20, then 30, then 40 — each point is the average of the last 3 values. The goal is to smooth short-term fluctuations so the general trend is easier to read. Moving averages work for any time-series data: prices, daily sales, temperature, or site traffic.

What is the difference between SMA, EMA, and WMA?

All three are moving averages; they differ in weighting. SMA (simple) weights all n values equally: the sum of the last n values divided by n. EMA (exponential) gives exponentially declining weight to older values, using the smoothing factor α = 2/(n+1); the newest value carries the most weight. WMA (weighted) uses linear weights 1 through n, with the newest value weighted n. For the same period, EMA is generally the most responsive to the newest data, followed by WMA, then SMA. This calculator’s convention: EMA uses seed = SMA of the first n values, then EMA is computed from the n-th value onward as α×value + (1−α)×previous EMA.

What are golden cross and death cross?

Golden cross and death cross are descriptive terms for crossover patterns of two moving averages with different periods. A golden cross happens when the short-period MA crosses above the long-period MA. A death cross happens when the short-period MA crosses below the long-period MA. Example: for the series 10, 10, 10, 10, 10, 20, 30, 40, 50, SMA(2) crosses above SMA(4) at point #6 — that is what is called a golden cross. Important: this is only a chart-pattern label, not a buy or sell recommendation. This calculator only detects the crossover points and gives no trading signals whatsoever.

Why is a moving average called a lagging indicator?

Because a moving average is computed from data that already happened, it always lags the latest value. When the data jumps sharply, the MA only starts rising a few points later. The larger the period, the smoother the line but the greater the lag; the smaller the period, the faster it responds but the noisier it gets. That is the fundamental trade-off: no moving average is both very smooth and very fast.

How do I choose a moving average period?

There is no universally correct period; it depends on the goal of the analysis. Small periods (e.g. 3–10) suit tracking the latest changes quickly, at the cost of a choppier line. Large periods (e.g. 20–200) suit reading the long-term direction, at the cost of slow response. Periods like 5, 10, 20, 50, and 200 are often used as examples in technical analysis literature, but that is common habit, not a fixed rule. For crossovers, two different periods are compared — e.g. a short 2–10 against a long 20–50 — and this calculator accepts any pair of periods as long as the short period is smaller than the long one.

How is this calculator different from other statistics calculators on this site?

This calculator is for time-series data: computing per-point SMA, EMA, and WMA, detecting two-period crossovers, and comparing the moving averages of two series. For the central tendency of a single data set (not a time series), use Mean Median Mode Calculator or Mean vs Median vs Average. For the average together with the spread of the data, use Average and Standard Deviation Calculator.

When is a moving average not a good fit?

A moving average is less informative when the data moves sideways with no clear direction: the MA line gets crossed back and forth by the data, producing many meaningless crossovers. It is also a poor fit for data that is not a time series (e.g. categories or one-off surveys) and for series with extreme outliers, since a single extreme value can pull the SMA far off. In such cases the MA can still be computed, but it should be interpreted with care.

Free tool by NRTechStudio