Exponential Moving Average (EMA): How It Works

Updated November 2026 · 5 min read

An exponential moving average, or EMA, is a moving average that pays more attention to recent prices than older ones. That makes it react faster when price changes direction. It is the building block of MACD, a favorite of short-term traders, and one of the most common lines you will see on any chart.

This guide explains how the EMA is calculated, why it behaves the way it does, and how traders use it. If you are deciding between an EMA and a simple moving average, see SMA vs EMA for a head-to-head comparison.

What makes it exponential

A simple moving average gives every price in its window equal weight, then forgets anything older completely. An EMA works differently:

That steady, proportional shrinking is what exponential refers to. Old prices never vanish entirely, but their influence fades quickly.

The EMA formula

Multiplier = 2 / (N + 1)
EMA today = previous EMA + multiplier x (today's close - previous EMA)

N is the number of periods. Some common multipliers:

EMA period Multiplier Weight on today's close
9 2 / 10 = 0.200 20.0%
12 2 / 13 = 0.154 15.4%
20 2 / 21 = 0.095 9.5%
26 2 / 27 = 0.074 7.4%
50 2 / 51 = 0.039 3.9%
200 2 / 201 = 0.010 1.0%

Compare that with a 20-day SMA, where each day gets exactly 5% weight. A 20-day EMA gives today 9.5%, almost double.

Getting started: the seed value

An EMA needs a previous EMA to calculate today's value. For the very first calculation, the standard approach is to use the simple average of the first N closes as the starting point. After that, the formula takes over. Because of this, EMAs calculated from different starting dates can differ slightly at first, but they converge as more data is added.

Worked example: a 10-day EMA

Multiplier: 2 / 11 = 0.1818.

Say the 10-day EMA stands at $40.00. Over the next three days, the stock closes at $42, $43 and $39.

Day 1 (close $42): 40.00 + 0.1818 × (42 − 40.00) = 40.00 + 0.36 = $40.36

Day 2 (close $43): 40.36 + 0.1818 × (43 − 40.36) = 40.36 + 0.48 = $40.84

Day 3 (close $39): 40.84 + 0.1818 × (39 − 40.84) = 40.84 − 0.33 = $40.51

The pattern is intuitive: the EMA moves a fixed fraction of the way toward each new close. When price is above the EMA, the EMA rises. When price is below, it falls. The bigger the gap, the bigger the move.

Notice also that the EMA has no drop-off effect. An SMA can jump when an unusual day from N periods ago leaves the window. An EMA changes only based on today's price relative to the current average, so it moves more smoothly in that respect.

How to read an EMA

Reading an EMA is the same as reading any moving average:

The difference is timing. An EMA turns sooner after a change in direction, so it signals trend shifts earlier than an SMA of the same length.

Popular EMA periods and how they are used

9 EMA. Very fast. Used by short-term and day traders to track momentum. Also the length of the MACD signal line.

12 and 26 EMA. The two EMAs inside MACD. MACD is simply the 12 EMA minus the 26 EMA.

20 or 21 EMA. A popular short-term trend line for swing traders. In strong uptrends, pullbacks often find buyers near it.

50 EMA. An intermediate trend line some traders use instead of the 50-day SMA.

200 EMA. A long-term trend line, common in crypto. Because the multiplier is so small, a 200 EMA is quite close to a 200 SMA in practice, but it turns a little faster.

Practical uses

Trend filter. Take long trades only when price is above a rising 20 or 50 EMA.

Pullback entries. In a strong uptrend, wait for price to dip to the 20 EMA, then look for a bounce with a higher close. A stop goes below the recent swing low.

EMA crossovers. A fast EMA crossing a slow EMA (for example 9 over 21) signals a short-term trend change. These crossovers are quicker than SMA crossovers but give more false signals.

Trailing exit. Some trend following traders exit when price closes below the 20 EMA, letting the line rise under them as the trend continues.

Common mistakes

Assuming faster is better. A faster line means earlier signals and more false ones. In choppy markets, an EMA can flip back and forth repeatedly.

Treating it as an exact level. Price often overshoots an EMA slightly before bouncing. Use it as a zone.

Not knowing which average a chart shows. A line labeled MA could be simple or exponential. The difference matters for short periods.

Stacking too many EMAs. Five or six lines on one chart usually adds confusion rather than information.

Limitations

An EMA is still a lagging indicator. It reacts faster than an SMA, but it is still built from past prices and confirms trends rather than predicting them. Its sensitivity to recent prices also means a single large move, such as an earnings gap, can pull it sharply in one direction. And like every moving average, it works poorly in sideways markets.

How Stupid Simple Trader uses EMAs

Stupid Simple Trader uses the 20-day EMA as one of six signal inputs: price above it adds 1 point, below subtracts 1. This captures short-term trend direction. EMAs are also inside the MACD calculation (12/26 EMA with a 9-period EMA signal line), which feeds another part of the score. Longer-term trend context comes from the 50-day and 200-day SMAs.

Try it

Open a ticker page like ETH-USD or AAPL to see whether price is currently above or below its 20-day EMA, and how that combines with the other five inputs into a single signal.

Frequently asked questions

What is the EMA formula?

EMA today equals the previous EMA plus a multiplier times the difference between today's close and the previous EMA. The multiplier is 2 divided by the number of periods plus 1, so a 20-day EMA uses 2 divided by 21, or about 0.095.

Why do traders use the 20-day EMA?

The 20-day EMA covers roughly a month of trading and reacts quickly to recent prices. Swing traders use it to judge short-term trend direction and as a level where pullbacks in a strong trend often pause.

Does an EMA ever forget old prices completely?

Technically no. Every past price still has a tiny influence, but that influence shrinks quickly. In a 20-day EMA, prices from several months back have almost no effect on today's value.