A simple moving average (SMA) is the arithmetic mean of a price series over a fixed window of recent periods, with every period given equal weight. It is the most basic form of moving average. The formula is , where to are the last prices, usually each period's closing price. If the last five closes are 10, 11, 12, 11 and 13, the five-period SMA is . When a new price arrives, the oldest one drops out and the average is recalculated.
The SMA smooths short-term fluctuations so that the underlying trend is easier to see. Windows of 20, 50 and 200 days are common, and a moving average crossover compares a short average with a long one. Because all prices count equally, the SMA reacts slowly and shifts when an old extreme value leaves the window. The exponential moving average and the weighted moving average give more weight to recent prices.