TradingMaths

Home › Learn › Moving averages: SMA vs EMA

Moving averages: SMA vs EMA

Updated 11 October 2026

A moving average is the average of a stock's recent prices, recalculated every new candle. As each candle is added, the oldest one drops out (or fades away), so the average "moves" along the chart. It smooths out day-to-day noise and shows the general direction prices have taken.

The two types you will see most are the simple moving average (SMA) and the exponential moving average (EMA).

Simple moving average (SMA)

SMA = sum of the last N closing prices ÷ N

Every close in the window gets equal weight. When a new close arrives, the oldest one leaves.

Exponential moving average (EMA)

New EMA = previous EMA + k × (today's close − previous EMA)

where k = 2 ÷ (N + 1). For a 5-period EMA, k = 2 ÷ 6 = 1/3. For a 20-period EMA, k = 2 ÷ 21 ≈ 0.095.

The EMA gives the latest close the most weight, and older closes count for less and less. It is usually started (seeded) with the SMA of the first N closes.

Worked example: 5-day SMA vs EMA

Stock XYZ closes over seven days (made-up prices):

DayClose5-day SMA5-day EMA
1₹100––
2₹102––
3₹104––
4₹103––
5₹106₹103.00₹103.00
6₹112₹105.40₹106.00
7₹109₹106.80₹107.00

Day 5

SMA = (100 + 102 + 104 + 103 + 106) ÷ 5 = 515 ÷ 5 = ₹103. The EMA is seeded with this value, so EMA = ₹103.

Day 6

Day 7

The jump to ₹112 on day 6 lifted the EMA by ₹3 but the SMA by only ₹2.40. That is the key difference: the EMA reacts faster to new prices, and the SMA is steadier.

Grey: price. Blue: average trailing behind.
Any moving average trails price; an EMA trails less than an SMA of the same length.

Common periods and how they are read

Common ways people describe moving averages:

MACD is built directly from two EMAs, and Supertrend uses a smoothed average of range, so understanding moving averages helps with both.

SMA or EMA: which to use?

Neither is better in general. An EMA tracks price more closely, so it turns earlier but also gives more false turns in choppy markets. An SMA is smoother but slower. Picking one is a trade-off between speed and noise, not a route to better results.

Limits you should know

The risk side

Moving-average crossovers are among the most widely shared trading rules, and they do not change the base rate: SEBI's studies (SEBI study, 2023 and 2025) found about 9 in 10 individual F&O traders lost money in FY22 and FY25. Plan your exit and use a position size calculator before you trade.

Questions people ask

What is the difference between SMA and EMA?
An SMA gives equal weight to every close in its window. An EMA gives more weight to recent closes, so it reacts faster to new prices.
How is the EMA multiplier calculated?
The multiplier is 2 divided by the period plus 1. For a 20-period EMA that is 2 divided by 21, about 0.095.
What is a golden cross?
It is the name for a shorter moving average, usually the 50-day, crossing above a longer one, usually the 200-day. It describes past prices and does not predict a rise.
Which moving average period is best?
No period is best. Shorter periods follow price closely and flip often; longer ones are smoother but slower to change.

Sources

Related