LoginEnter the platform free
DOMINA › Technical analysis › The indicators › Exponential moving average (EMA)

Exponential moving average (EMA): how to calculate it and how to read it

InteractiveFind where the EMA turns and where the SMA turnsTwo clicks on a real chart: the judge tells you whether you found the two bottoms, and why the SMA comes later.Try it →

Exponential moving average (EMA): what it is, on a real chart

The exponential moving average (EMA) is an average of closing prices that gives more weight to recent sessions: each day it moves toward the new close by a fixed fraction of the distance, α = 2/(n+1). You read it like the simple moving average (slope, price above or below, crossovers), but it reacts sooner when the price changes pace.

Trend indicator · weighted average of closes · common periods: 9, 12, 20, 26, 50, 200
Exponential moving average (EMA)
Example: JPMorgan Chase, sessions from to · EMA and SMA of the same period · adjusted prices, to the cent
volumeperiod start 235.02SMA 50EMA 50329.17208.26323.42Jan 2, 2025Apr 3, 2025Jul 3, 2025Oct 1, 2025Dec 30, 2025
Sessions249EMA α3.92%Weight in the SMA2.00%Sessions moving in opposite ways34

Amber: the 50-day EMA; blue: the 50-day SMA. Same period, different weights.

InteractiveRead a session. Click a day on the chart: I’ll tell you the close, both averages and why each one rose or fell that day.

2/(n+1)the weight of today’s close in the EMAwith 50 days: 3.9% in the EMA, 2% in the SMA

How do you calculate the exponential moving average?

You start from the simple average of the first n closes. From there, every session, the EMA takes a step toward the new close and covers a fixed fraction of the distance: α = 2/(n+1). With 5 days α is one third, with 20 days 2/21, with 50 days 2/51.

Fig. 1 · The weights of the closes, with 10 days

today: 18.2%SMA: 10.0% for each of the last 10beyond 10 sessions the SMA drops themthe EMA still counts them, less and lesstoday10 sessions ago20 sessions ago10-day EMA: the bars10-day SMA: the step
  • Each amber bar is the weight of one close in the EMA: today on the right, the oldest on the left.
  • Today’s close weighs α, yesterday’s α × (1 − α), and so on: a little less every day.
  • The blue step is the SMA: the last 10 closes weigh the same, the others zero.
  • With α = 2/(n+1) today’s close weighs almost twice as much as in the SMA, and old closes never fully drop out.

Fig. 2 · One session’s step

distanceα = one thirdyesterday’s EMAtoday’s close
  • The dashed line is yesterday’s EMA; today’s candle closes much higher.
  • The new EMA covers one third of the distance, which is α with 5 days: not all of it, not none of it.
  • Close above yesterday’s EMA: the EMA rises. Below it: it falls. That is all.
EMAtoday = EMAyesterday + α × (Ctoday − EMAyesterday)  ·  α = 2 / (n + 1)
first value: the simple average of the first n closes

The same formula can be written EMAtoday = α × Ctoday + (1 − α) × EMAyesterday: today’s close weighs α, the whole past together weighs 1 − α.

The EMA calculation, step by step

JPMorgan Chase, 5-day EMA, last ten closes of 2025
The last ten closes of 2025 for JPMorgan Chase, with the 5-day simple and exponential moving averages, in dollars
SessionClose5-day SMA5-day EMA
315.55——
314.98——
313.00——
317.21——
323.09316.766316.766
325.93318.842319.821
329.17321.680322.937
327.91324.662324.595
323.75325.970324.313
323.42326.036324.015
The exponential moving average of JPMorgan Chase, step by step
StepCalculationResult
Starting point: the simple average of the first 5 closes, up to (315.55 + 314.98 + 313.00 + 317.21 + 323.09) / 5316.766
α with 5 days2 / (5 + 1)1 / 3
: the distance between the close and yesterday’s EMA325.93 − 316.7669.164
One third of the distance: divide by 39.164 / 33.055
The EMA on 316.766 + 3.055$319.821
Last session, : same calculation324.313 + (323.42 − 324.313) / 3$324.015

On a chart the EMA does not start five sessions earlier: on this page it starts on , the first session we cut. At the start of 2025 that starting point weighs 0.34% of the 50-day EMA. That is why two platforms starting from different dates can show slightly different values in the first sessions, and then almost the same.

What is the difference between EMA and SMA?

The EMA is the weighted sibling of the simple moving average (SMA): with the same period the closes have the same average age, (n − 1)/2 sessions, but the weight is spread in a different way. That is why on a steady climb the two lines stay together, and they part when the price changes pace.

Fig. 3 · The jump

the price jumpsafter 20 sessionsSMA arrived · EMA at 86%EMASMA
  • The price jumps and stays up.
  • The EMA moves more at once: on the first day it covers α of the jump, the SMA only 1/n.
  • The SMA arrives in n sessions, in a straight line; the EMA gets closer ever more slowly.

Fig. 4 · The turn

the EMA turnsthe SMA turns5 sessionson a straight climb: one single line
  • On a straight climb the EMA and the SMA of the same period are one single line.
  • At the price peak the EMA turns first: it weighs the first falling closes more.
  • The SMA turns only when the close coming in is lower than the one going out.

Fig. 5 · The echo

one unusual daythe echo20 sessions later it drops outthe two averages, magnifiedEMA
  • One single unusual day, then everything as before.
  • The SMA rises by one step and, n sessions later, drops all at once: that day leaves the calculation.
  • The EMA rises more and then forgets it slowly: it has no exit day.

Fig. 6 · The sideways market

price crossings: EMA 9 · SMA 9without a trend the averages say little
  • Without a trend the price goes up and down around both averages.
  • It keeps crossing them: a different weighting does not create a trend that is not there.
  • A moving average describes a trend: where there is none, it says little.

On the chart at the top, in 2025 the 50-day EMA and SMA of JPMorgan Chase moved in opposite directions on 34 sessions out of 249: one rose, the other fell. The EMA compares today’s close with yesterday’s EMA; the SMA compares the close coming in with the one going out, 50 sessions earlier. Click a session and read why.

InteractiveHow much does each close weigh in an EMA? The calculator

type the period and a past session: the page does the math
Period of the average
days
Close from how many sessions ago
days

Period between 2 and 400 days. The numbers hold on a series long enough for the starting point no longer to matter.

Today’s weight in the EMA9.52%that is α; in the SMA: 5.00%
Close from 10 sessions ago3.50%in the SMA: 5.00%
Half the weight7 sessionsthe most recent closes that make up half of the EMA
The last 20 closes86.5%of the EMA’s weight; in the SMA 100%
today40 sessions ago10 sessions ago20-day EMA: amber bars20-day SMA: blue step
With 20 days α = 2 / 21 = 0.0952: today’s close weighs 1.90 times what it weighs in the SMA. The close from 10 sessions ago weighs 3.50% in the EMA and 5.00% in the SMA. The average age of the closes is 9.5 sessions in both averages: only the way the weight is spread changes.

How do you read the exponential moving average?

six things to look at, one at a time

1The slope is the trend

  • rising EMA: recent closes are above their weighted average
  • flat EMA: no trend to describe

2Close above the EMA, EMA rising

  • the EMA rises every time the close is above yesterday’s EMA, and falls when it is below
  • the SMA does not work that way: the close going out counts too

3It moves first when the pace changes

  • at a sharp turn the EMA changes direction as soon as the closes cross to the other side of the EMA
  • the SMA waits for the closes from n sessions ago to drop out

4No echo

  • in the EMA there is no day on which an old close drops out
  • a jump in the SMA can come from a close n sessions ago, not from today

5Same period, different lines

  • the 20-day EMA and the 20-day SMA have the same average age, but they are not the same line
  • on different platforms the EMA can start from different dates: in the first sessions the values differ slightly

6Inside other indicators

  • the MACD is the difference between the 12-day EMA and the 26-day EMA
  • its signal line is a 9-day EMA of the MACD itself

Exponential averages are the building blocks of the MACD. The weighted moving average (WMA) weighs the closes in a third way, in a straight line, and stops at the last n. Bollinger Bands instead use the 20-day simple average as their middle line.

Deeper dives: the simple moving average · the MACD · Bollinger Bands.

Interactive exerciseFind where the EMA turns and where the SMA turns

JPMorgan Chase, March to July 2025: two clicks on the chart, the judge tells you whether they are right and why
  1. Click the lowest point of the 50-day EMA (amber): where it stops falling and starts rising.
  2. Click the lowest point of the 50-day SMA (blue).
  3. Read the verdict. A click is right if on that session the average is within 0.3% of its lowest point.
click the bottom of the EMA

Two lines: amber is the 50-day EMA, blue the 50-day SMA. Find the lowest point of each.

Where to go from here

The indicators · Moving averages

The other indicators in the «Moving averages» family

Simple moving average (SMA)

  • the average of the last n closes, recalculated every session
  • 20, 50 and 200 days, golden cross, death cross and lag
  • try the periods on a real chart and find the crossovers

The other lessons in the guide

What is technical analysis

  • the study of price and volume to recognise the trend and the levels
  • three premises: price discounts everything, trends, history repeats
  • exercise: uptrend, downtrend or sideways on three real charts

Efficient market hypothesis

  • One chart is real, the other is the same deck shuffled.
  • The three forms of the hypothesis, from Fama to Malkiel.
  • The critics and how to measure the problem, with no verdicts.

Candlestick chart

  • the four prices of a session: body and shadows
  • green and red, long and short bodies, long shadows, the doji
  • find the candle on a real chart: the judge says yes or no with the numbers

Frequently asked questions

What is the exponential moving average (EMA)?

It is an average of closing prices that gives more weight to recent sessions: each day it moves toward the new close by a fixed fraction of the distance, α = 2/(n+1). Older closes weigh less and less but never fully drop out. On the chart it is a line that follows the price and reacts sooner than the simple average when the price changes pace.

How do you calculate the exponential moving average?

Start from the simple average of the first n closes; then, every session, today’s EMA = yesterday’s EMA + α × (close − yesterday’s EMA), with α = 2/(n+1). A real example, JPMorgan Chase with 5 days, α = 1/3: on yesterday’s EMA was $316.766 and the close $325.93, so the new EMA is $319.821.

What is the difference between EMA and SMA?

The SMA gives the same weight to the last n closes and no weight to the others; the EMA gives more weight to recent closes and an ever smaller weight, never zero, to older ones. With the same period they have the same average age of the closes: the EMA parts from the SMA at turns and after jumps, where it moves first. They are two ways of weighting the same closes.

What periods are used for the exponential moving average?

On daily charts you often see 9, 12, 20, 26, 50 and 200 days. The MACD uses the 12-day and the 26-day EMA, and a 9-day EMA as its signal line. These are common conventions, not numbers with special properties.

Method and sources

The sources of this page: the books are cited, the text is ours
Source
John J. Murphy, Technical Analysis of the Financial Markets: chapter 9, moving averages (simple, weighted, exponential).
Charles D. Kirkpatrick and Julie R. Dahlquist, Technical Analysis (CMT curriculum): moving averages.
Gerald Appel, Technical Analysis: Power Tools for Active Investors: the MACD, built from exponential averages.

The chart uses the JPMorgan Chase sessions from to in our end-of-day archive, adjusted for dividends and corporate actions and rounded to the cent: 2025 is shown, the 2024 sessions are needed to start the averages. The EMA starts from the simple average of the first n closes. The exercise example is chosen by a rule: from to the lowest point of the 50-day EMA and that of the 50-day SMA are apart, and the sessions within 0.3% of each do not overlap. The page recalculates both dates on every build and is not published if they do not match. The numbered figures are diagrams drawn to explain, not prices. This guide explains how the tools work: it does not contain investment recommendations and promises no returns. Our method · license · report an error.

Cookie preferences