Advertisement

Moving average calculator

Smooth an ordered price series using an equally weighted trailing window.

Calculator

Separate numbers with commas or spaces. Do not use thousands separators.

Latest moving average
16.0000
Latest price
18.0000
Latest price less average
2.0000
Trailing moving averages
ObservationPriceMoving average
1.000010.0000Not enough observations
2.000012.0000Not enough observations
3.000014.000012.0000
4.000016.000014.0000
5.000018.000016.0000

Advertisement

How this calculator works

A trailing simple moving average takes the current observation and the preceding window minus one observations. Every included price receives equal weight. Enter data in time order and use a consistent observation interval. Early rows remain uncomputed until a full window exists. The table replaces a chart and preserves every supplied price up to 500 observations.

Formula

SMA_t = (P_t + P_(t-1) + ... + P_(t-n+1))/n, for a window of n observations.

Worked example

For prices 10, 12, 14, 16 and 18 with a three-observation window, the available averages are 12, 14 and 16. With prices 2, 4, 6 and 8 and a two-observation window, they are 3, 5 and 7.

Advertisement

Frequently asked questions

Does a price above its average predict a gain?

No. The difference describes the supplied history and is not a reliable forecast or trading instruction.

Is this an exponential moving average?

No. A simple moving average assigns equal weights inside a finite trailing window.

What if prices are not evenly spaced in time?

The tool averages observations, not elapsed time. Uneven intervals can change the meaning of the smoothing.

Sources

Advertisement