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.