Home / Guides / Moving average: simple and exponential, worked

Moving average: simple and exponential, worked

A moving average replaces each price with an average of recent prices, to smooth out the small moves. A simple moving average weights each price in the window equally. An exponential one weights recent prices more. Both lag the price, and both are descriptions of the past.

Last updated 28 Nov 2026. Reviewed by the Custom Trading Platform education desk. Every figure on this page is sample arithmetic, shown in full.

The formulas, written in full

  • Simple moving average of n closes equals the sum of the last n closes divided by n.
  • Exponential moving average equals today's close times a plus yesterday's average times (1 minus a).
  • The weight a equals 2 divided by (n plus 1).
  • The first exponential value is usually the simple average of the first n closes.

Worked example: five closes, a window of 3

Closes: 10, 11, 12, 11, 16. For the exponential average, a is 2 divided by 4, which is 0.5, and it starts at the simple average of 10, 11 and 12, which is 11.

CloseSimple (3)Exponential (3)
10
11
1211.0011.00
1111.3311.00
1613.0013.50

The last simple value is (12 plus 11 plus 16) divided by 3, which is 13.00. The exponential value is 0.5 times 16 plus 0.5 times 11, which is 13.50. The jump to 16 pulled the exponential average up further, because it gives the latest price more weight.

How much each one lags

A simple average of n closes is, on average, centred on data about (n minus 1) divided by 2 bars old. A 5 bar average lags by 2 bars and a 20 bar average by 9.5 bars. A longer window is smoother and slower. A shorter window follows price more closely and flips more often.

Crossovers

A common rule compares a shorter average with a longer one and notes when the shorter crosses above or below. The moving average crossover test page and the golden cross test page set the rule out in full. We have not claimed a result for either on this page; see the test pages for what we have measured.

What it cannot tell you

An average cannot lead price, because it is built from past prices. A cross happens after the move that caused it. For the exponential formula in a glossary form, see exponential moving average.

Sources and method

Every figure on this page is sample arithmetic, shown in full, as of 28 Nov 2026. Each result was worked a second way before it was kept. No market data, price quote, broker term or return is stated as fact. How we check numbers is on the methodology page, and corrections go through contact.

How we will test it

We will recompute every figure in a second spreadsheet and repeat the worked example at a second set of inputs. No result is claimed. Last tested: not yet, results pending.

Questions people type

What is a moving average? An average of the last n prices, recalculated as each new price arrives.

What is the difference between SMA and EMA? The simple one weights every price in the window equally and the exponential one weights recent prices more.

Which moving average is best? We make no claim. The right window depends on the market and the purpose, and the choice is tested, not assumed.

Does a moving average predict price? No. It is built from past prices and lags them.

Related

Glossary, exponential moving average, moving average crossover test, golden cross test, 200 day moving average test, Disclaimer.

Start free: create a free account to get the weekly note on tools and tests.

Education only. Nothing here is financial advice or a signal.