Skip to content
Calculators

MACDLive chartTopic guide

MACD indicator: what it is, how it is built and how to read it

MACD is the 12 EMA minus the 26 EMA, with a 9 EMA signal line and a histogram.

12, 26, 9MomentumTrend followingChecked 6 Dec 2026

MACD indicator chart example on a currency pair, with bullish and bearish crossovers and a zero line cross

MACD stands for moving average convergence divergence, and it measures how far a quick exponential moving average of price sits from a slower one. The gap is the MACD line. A 9 period average of that gap is the signal line, and the bars showing the space between those two lines form the histogram. When the gap widens, momentum is building; when it narrows, momentum is fading.

This page is the hub for every MACD guide on the site. You will learn the formula, check one day of the math by hand, read the three parts on a chart, and see the kind of chart where MACD signals let you down.

Quick read

  • Full form

    Moving average convergence divergence
  • Default settings

    12, 26, 9 (fast EMA, slow EMA, signal EMA)
  • MACD line

    12 EMA - 26 EMA of the close
  • Signal line

    9 EMA of the MACD line
  • Histogram

    MACD line - signal line
  • Range

    No upper or lower limit; values are in price units
  • Main weakness

    Lags price and flips back and forth in sideways markets

What is MACD? The meaning in one minute

Think of two moving averages on a price chart. The 12 period EMA hugs price closely. The 26 period EMA trails further behind. MACD simply subtracts the slow one from the fast one and plots the answer in a panel under the chart.

  • Positive MACD: the 12 EMA sits above the 26 EMA. Recent prices are higher than older prices, on average.
  • Negative MACD: the 12 EMA sits below the 26 EMA. Recent prices are lower.
  • Convergence: the two averages move closer, so MACD heads toward zero.
  • Divergence: the averages pull apart, so MACD moves away from zero.

That is where the long name comes from. In the share market, in forex and in crypto charts the idea is the same, because MACD only needs a series of closing prices.

The three parts of the MACD indicator chart

Every MACD panel shows the same three things. Most charting platforms draw them in two colors plus a set of bars.

PartHow it is madeWhat it tells you
MACD line12 EMA minus 26 EMADirection and strength of the short term trend
Signal lineMACD line smoothed by a 9 EMAA slower copy that the MACD line crosses
HistogramMACD line minus signal lineWhether momentum is speeding up or slowing down
Zero lineA flat line at 0Where the 12 EMA and 26 EMA are equal

The histogram has its own guide, the MACD histogram explained, because many traders read it first. Its bars grow when the MACD line runs away from the signal line and shrink when the two lines close in.

MACD formula and calculation, step by step

Here is the full MACD formula. Each EMA uses the multiplier k = 2 / (n + 1), so k is 0.1538 for 12, 0.0741 for 26 and 0.2 for 9.

EMA today = (close - EMA yesterday) x k + EMA yesterday
MACD line = EMA(12) - EMA(26)
Signal line = EMA(9) of the MACD line
Histogram = MACD line - signal line

Worked example: one new day of MACD

Say a busy stock closed at 53.10 today. Yesterday the 12 EMA was 52.40, the 26 EMA was 51.70 and the signal line was 0.55.

  1. New 12 EMA = (53.10 - 52.40) x 0.1538 + 52.40 = 52.5077
  2. New 26 EMA = (53.10 - 51.70) x 0.0741 + 51.70 = 51.8037
  3. MACD line = 52.5077 - 51.8037 = 0.7040
  4. Signal line = (0.7040 - 0.55) x 0.2 + 0.55 = 0.5808
  5. Histogram = 0.7040 - 0.5808 = 0.1232

With MACD higher than the signal, the histogram bar is positive. A strong close pulled the fast EMA up more than the slow one, which widened the gap. You can repeat this every bar in a spreadsheet; the MACD settings guide has a calculator that does it for a whole list of closes.

How much history MACD needs before it shows

MACD cannot start on the first bar. The 26 EMA needs 26 closes to seed its first value, and the signal line then needs 9 MACD values of its own. That is 26 + 9 - 1 = 34 closes before the full indicator appears.

This matters on new charts and on monthly charts, where 34 bars is nearly three years of data. Early values are also less settled, because each EMA keeps a little memory of its starting point for a while.

Bar chart of how many closes the MACD line, signal line and histogram need before they appear
The default MACD needs 34 closes before the histogram can be drawn.

How to read MACD on a chart

Read MACD in this order. It keeps you from reacting to one bar.

  1. Side of zero. Above zero means the short term average is above the long one. Below zero means the reverse.
  2. Slope of the MACD line. Rising means momentum is improving, even if the line is still negative.
  3. Position against the signal line. Above the signal line, the histogram is positive.
  4. Histogram size. Growing bars mean the move is speeding up. Shrinking bars mean it is losing pace.
  5. Compare with price swings. If price makes a new high but MACD does not, that is a divergence worth noting.

In the first chart on this page, the example pair fell to a low of 1.0284 and then turned. The MACD line crossed above its signal line at bar 51, then crossed above zero at bar 64. By the last bar the 12 EMA (1.0861) was above the 26 EMA (1.0787), so MACD read 0.0074.

MACD signals: crossovers, zero line and divergence

People use three kinds of MACD buy and sell signals. None of them is a command to trade; each one describes a change in momentum.

SignalBullish versionBearish versionFull guide
Signal line crossoverMACD crosses above the signal lineMACD crosses below the signal lineMACD crossover
Zero line crossMACD rises through 0 (12 EMA crosses above 26 EMA)MACD falls through 0Crossovers above and below zero
DivergencePrice makes a lower low, MACD a higher lowPrice makes a higher high, MACD a lower highMACD divergence

Signal line crosses come first and are the most frequent. Zero line crosses come later and are rarer. Divergence is the slowest to confirm and can last a long time. Rule sets that combine them are in the MACD strategy guide.

Try it on the example chart above

Above this article sits an interactive chart: it plots invented prices with MACD underneath. Use it to build a feel for how the lines react.

  1. Switch MACD on and look at where the histogram changes color.
  2. Move the fast length slider from 12 down to 8. Count the crossovers again: there will be more of them.
  3. Press the new example button a few times. Find one series that trends and one that moves sideways, and compare how many crossovers each one gives.

Doing this ten times teaches more than reading about it. Most readers notice that the same settings look sharp on a trending series and messy on a flat one.

What 12, 26, 9 means and when people change it

The numbers are bar counts, not days. On a daily chart, 12 and 26 are about two and a half and five weeks of trading. On a 15 minute chart, 26 bars is six and a half hours. The 9 sets how slowly the signal line follows.

Shorter settings such as 8, 17, 9 respond earlier and produce extra signals, false ones included. Longer settings react later and give fewer. There is no best set for every chart. The MACD settings page compares the common choices with counts from one example series.

Where MACD fails

MACD is built from moving averages, so it always reports a move after it has started. That lag is the price of smoothing. The bigger problem shows up when price goes sideways.

In the chart below, a stock-like example drifts between about 240 and 258. MACD crossed its signal line seven times between bar 43 and bar 90, roughly once every seven bars. Each crossing hinted at a turn, yet the example closed at 246.70, close to its first close of 248.27. Signals that flip back and forth like this are called whipsaw.

There are no overbought or oversold lines on MACD. A very high reading does not mean price must fall. And because MACD is in price units, a reading of 2.0 on a stock near 250 cannot be compared with a reading of 0.002 on a currency pair near 1.08.

For a bounded momentum reading, many traders pair it with the RSI indicator; the RSI vs MACD comparison explains how the two differ.

MACD chart on a sideways example stock showing seven signal line crossovers in about 48 bars
Example chart: seven MACD crossovers between bar 43 and bar 90 while price went nowhere.

All MACD guides on this site

TopicGuideRead it when
Using MACD in practiceMACD trading strategyYou want rule sets to test with filters and exits
SignalsMACD crossoverYou want to read the signal line and zero line
SignalsMACD divergencePrice and MACD disagree at swing highs or lows
PartsMACD histogramYou read momentum from the bars
SetupMACD settingsYou trade 1, 5 or 15 minute charts, or weekly ones
ComparisonRSI vs MACDYou are choosing between them or combining them

MACD is built on EMAs, so the moving average guide is a good companion if the EMA idea is new to you.

A word on risk

MACD describes past prices; it does not know what comes next. Margin trading in forex and CFDs magnifies every loss; most people who try it through a retail CFD account come out behind. Test any MACD idea on a demo account or on past charts first. This page is general education, not financial advice. Investor.gov sums up what chart analysis can and cannot do.

Questions traders ask

What is MACD full form in the stock market?

MACD stands for moving average convergence divergence. Share traders read it the same way forex traders do: the 12 period EMA minus the 26 period EMA, with a 9 period signal line. It works on any chart that has closing prices.

What does MACD indicate?

It shows whether short term prices are above or below longer term prices, and whether that gap is growing or shrinking. A rising MACD points to improving momentum. How far price will travel is not something it can say.

What does 12 26 9 mean in MACD?

12 is the length of the fast EMA, 26 is the slow EMA, and 9 is the EMA used to smooth the MACD line into the signal line. They count bars, so on an hourly chart 26 means 26 hours.

What is the MACD signal line?

It is the MACD line smoothed by a 9 bar EMA. Being slower, it gets crossed by the MACD line whenever momentum swings around, and those crosses are what most people watch.

Does MACD work for crypto?

The math works on any price series, including crypto markets that trade every day. The same weaknesses apply too: sharp swings and sideways periods create many false crossovers. Test it on past charts before relying on it.

How does MACD timing compare with price?

MACD turns after price turns, because it is built from moving averages. A crossover usually appears several bars after a swing low or high. Faster settings shorten the delay but add noise.

MACD

Lines, histogram, crossovers and settings