Skip to main content
Pulse of the Markets
Latest prices

Moving Averages: SMA and EMA Explained

In short

A moving average smooths a price series by averaging recent closing prices; the simple version weights every bar equally and the exponential version gives more weight to recent bars.

A moving average replaces each price with the average of the most recent bars. That removes much of the short-term noise and leaves a smoother line that follows the direction of the trend. The number of bars averaged is the period: a 20-bar average reacts quickly and a 200-bar average slowly, and both lag the price because they are built from past data.

The simple moving average (SMA) adds the last N closing prices and divides by N, so every bar in the window counts equally and a price leaving the window removes its whole weight at once. The exponential moving average (EMA) multiplies each new close by a smoothing factor of 2 divided by N plus 1 and blends it with the previous EMA, so recent bars count for more and old ones fade gradually instead of dropping out.

Academic studies have tested simple moving-average rules on long price histories, with mixed conclusions about whether they add anything once trading costs are included. What an average does show reliably is where the price has traded, on average, over the chosen window. Comparing the latest close with a long average, or a short average with a long one, is a common way to describe the prevailing trend; it is a description of the past and not a forecast.

Formula

SMA(N) = (close[t] + close[t-1] + ... + close[t-N+1]) / N
EMA[t] = close[t] * k + EMA[t-1] * (1 - k),   k = 2 / (N + 1)

The formula is shown as code; N stands for the number of bars or periods.

Figures used in this guide

1
constant term of the EMA smoothing factor
2
numerator of the EMA smoothing factor
3
minimum ratio of series length to period before Lzzo.com shows an EMA
5
first of the six periods shown on Lzzo.com product pages
10
second of the six periods shown on Lzzo.com product pages
20
example period used for illustration
50
fourth of the six periods shown on Lzzo.com product pages
100
fifth of the six periods shown on Lzzo.com product pages
200
example period used for illustration

Each number in the text is a definition, a convention or a stated value of the source, not a market observation.

How Lzzo.com shows it

Each product page lists SMA and EMA values for the 5, 10, 20, 50, 100 and 200 period averages, calculated from daily or weekly candles and shown in the unit of the product. An EMA appears only when the series is at least 3 times as long as its period, because on a shorter series the starting value keeps too much weight; otherwise the table says there is not enough history instead of showing a number.

Sources

  1. John J. Murphy, Technical Analysis of the Financial Markets (New York Institute of Finance, 1999)
  2. W. Brock, J. Lakonishok and B. LeBaron, Simple Technical Trading Rules and the Stochastic Properties of Stock Returns, Journal of Finance, 1992
  3. C.-H. Park and S. H. Irwin, What Do We Know About the Profitability of Technical Analysis?, Journal of Economic Surveys, 2007

Primary and official sources, named as plain text.

Content last changed on 5 October 2026.

Reviewed on 5 October 2026.

These guides explain concepts and methods for general information. They do not address anyone's circumstances and make no statement about what a price will do.