What is MACD? MACD line, signal line and histogram explained

Lesson 6 of 8 · 7 min read · Updated 23 Nov 2026

MACD (moving average convergence divergence) is the gap between a 12-day and a 26-day exponential moving average. It shows whether short-term prices are running above or below longer-term prices and whether that gap is widening or narrowing.

What MACD measures

MACD stands for moving average convergence divergence. Gerald Appel developed it in the late 1970s. It turns two moving averages into one line that shows how far apart they are.

When a short average moves away from a long average, the averages are diverging. When they move toward each other, they are converging. MACD tracks that distance over time.

If you have not read about moving averages yet, start with trends and moving averages, since MACD is built from exponential moving averages (EMAs).

The three parts

The standard setting is written as MACD(12, 26, 9).

  1. MACD line = 12-day EMA − 26-day EMA.
  2. Signal line = 9-day EMA of the MACD line.
  3. Histogram = MACD line − signal line, usually drawn as bars above or below zero.

There is also a zero line. The MACD line is above zero when the 12-day EMA is above the 26-day EMA, and below zero when it is below.

A worked example

Suppose an index has these made-up values on four days:

Day12-day EMA26-day EMAMACD lineSignal lineHistogram
15,0005,020−20−10−10
25,0305,0300−88
35,0605,04020−222
45,0705,05020317

Read it row by row:

  • Day 1: the short EMA is below the long EMA, so MACD is negative (−20). It is also below the signal line, so the histogram is negative.
  • Day 2: the MACD line has risen above the signal line, so the histogram turns positive. Traders call this a signal-line crossover.
  • Day 3: the MACD line moves above zero. Traders call this a zero-line crossover. The histogram is at its largest.
  • Day 4: MACD is flat at 20, but the signal line keeps catching up, so the histogram shrinks from 22 to 17.

All this describes how recent prices compare with older prices. None of it says what Day 5 will bring.

How traders read MACD

Traders commonly look at four things. Each one describes past prices.

  • Signal-line crossovers: the MACD line crossing above or below its signal line. This shows that short-term momentum has changed direction relative to its own recent average.
  • Zero-line crossovers: the MACD line crossing zero. This is the same event as the 12-day EMA crossing the 26-day EMA.
  • Histogram size: growing bars show the gap between MACD and its signal line is widening; shrinking bars show it is narrowing.
  • Divergence: the price makes a new high while MACD makes a lower high, or the reverse. This shows momentum slowing, but divergences can last a long time without any reversal.

Limits of MACD

  • It lags. MACD is built from moving averages of moving averages, so it reacts after the price has moved.
  • Whipsaws in sideways markets. When prices move in a range, the lines cross back and forth often.
  • No fixed scale. Unlike RSI, MACD has no 0 to 100 range. A MACD value of 20 means something very different for a ₹100 stock and a ₹5,000 stock, so you cannot compare MACD values across stocks directly.
  • Settings matter. Changing 12, 26 and 9 to other numbers gives different crossovers on the same chart.

MACD vs RSI

PointMACDRSI
Built fromTwo EMAsAverage gains and losses
ScaleOpen-ended, in price units0 to 100
Common reference linesZero line, signal line70 and 30
LagMoreLess

Many traders look at both together, since they measure momentum in different ways. See the RSI lesson for the other half.

Where to see MACD on Stocks Glance

Open any company page and choose the Technicals section to see its MACD line, signal line and histogram along with RSI, moving averages and Bollinger bands. Index pages, such as Nifty Bank, show the same for the index.

Frequently asked questions

What is a MACD crossover?
A MACD crossover is when the MACD line crosses its signal line, or when the MACD line crosses zero. It shows a change in recent momentum relative to older prices. It is not a buy or sell signal on its own.
What do the MACD histogram bars show?
The bars show the gap between the MACD line and the signal line. Bars above zero mean MACD is above its signal line; growing bars mean the gap is widening.
What are the standard MACD settings?
The standard settings are 12, 26 and 9: a 12-day EMA, a 26-day EMA and a 9-day EMA for the signal line. Changing them gives different readings on the same chart.

All lessons in Technical analysis

  1. What is technical analysis? Meaning, assumptions and limits for beginners
  2. How to read candlestick charts: open, high, low, close and common patterns
  3. Support and resistance explained: how traders find price levels on a chart
  4. Moving averages explained: SMA vs EMA, 50-day and 200-day, and crossovers
  5. What is RSI? Relative strength index explained for beginners
  6. What is MACD? MACD line, signal line and histogram explained
  7. Volume in stock market: how traders use trading volume to confirm moves
  8. Stop-loss and risk management in trading: position sizing and risk-reward

For education only. Examples use made-up numbers. Nothing here is a recommendation to buy, sell or hold any security. Disclaimer