Key takeaways
- MACD, developed by Gerald Appel in the late 1970s, is the 12-day exponential moving average of closing prices minus the 26-day EMA.
- The signal line is a 9-day EMA of the MACD line, and the histogram is MACD minus the signal line.
- Positive MACD means the shorter average is above the longer one; the further apart they move, the larger the value.
- Signal-line and zero-line crossovers are the most common readings, and both can produce whipsaws when no strong trend follows.
- Because MACD is built from moving averages, it inherits their lag and describes momentum that has already happened.
MACD usually appears under a price chart as two wavy lines and a bar graph. It looks complicated, but every part of it is built from one ingredient, the exponential moving average, in three simple steps, and knowing the construction makes it harder to read more into it than it contains.
StockCharts' ChartSchool credits the indicator to Gerald Appel in the late 1970s and describes what it does: it turns two trend-following indicators, moving averages, into a momentum oscillator by subtracting the longer moving average from the shorter one.
The three parts
| Component | Calculation (standard 12, 26, 9 settings) | Shown as |
|---|---|---|
| MACD line | 12-day EMA of closing prices − 26-day EMA | A line oscillating around zero |
| Signal line | 9-day EMA of the MACD line | A second, smoother line |
| Histogram | MACD line − signal line | Bars above or below zero |
ChartSchool notes that 12, 26 and 9 are the typical settings, though others can be used. If exponential moving averages are unfamiliar, moving averages explained works through the calculation; the important property here is that an EMA weights recent prices more heavily than older ones.
A quick numerical example. Suppose today the 12-day EMA of a stock is $52.40 and the 26-day EMA is $51.10. The MACD line is 52.40 − 51.10 = 1.30. If the signal line, the 9-day EMA of recent MACD values, is 0.95, the histogram bar is 1.30 − 0.95 = 0.35.
Reading the MACD line
- Positive MACD means the 12-day EMA is above the 26-day EMA: recent prices have been higher than longer-run prices.
- Negative MACD means the reverse.
- Rising MACD means the gap between the averages is widening in the positive direction. ChartSchool describes increasing positive values as increasing upside momentum.
The names "convergence" and "divergence" refer to the two averages moving toward or away from each other.
Unlike the RSI, MACD has no fixed upper or lower limit. Because it is the difference between two averages of price, its values are in price units, so a $500 stock produces larger MACD values than a $20 stock, and MACD values cannot be compared directly between them.
What the histogram adds
The histogram is the gap between the MACD line and its signal line, drawn as bars. ChartSchool notes it is positive when MACD is above the signal line and negative when it is below. Because it measures the distance between two lines that are themselves built from moving averages, it reacts before a crossover happens:
| Histogram behaviour | What it describes |
|---|---|
| Positive and growing | MACD pulling away above its signal line |
| Positive but shrinking | MACD drifting back toward its signal line |
| Crossing zero | A signal-line crossover |
| Negative and growing | MACD pulling away below its signal line |
A shrinking histogram is sometimes read as momentum fading. It is still a description of recent prices; a shrinking histogram can turn around and grow again without any crossover at all.
Crossovers
ChartSchool describes two kinds as the most common readings:
- Signal-line crossovers. MACD crossing above its signal line is called bullish; crossing below, bearish.
- Centerline crossovers. MACD crossing above zero means the 12-day EMA has moved above the 26-day EMA; below zero, the reverse.
The same source is candid about their reliability. In one example it counts eight signal-line crossovers in six months, "some good signals and some bad signals", including two bearish crossovers while the stock kept trending higher. In another, a stock produced seven centerline crossovers in five months that would have resulted in numerous whipsaws, because strong trends did not follow. It advises due diligence before relying on these common signals.
Divergences
When price makes a new low but MACD makes a higher low, or price makes a new high while MACD makes a lower high, chart readers call it a divergence, a sign that momentum is not confirming the price move. As with RSI, divergences describe past momentum and can persist.
The built-in lag
MACD is made of moving averages, and moving averages are made of past prices. Every MACD reading therefore describes momentum that has already happened. ChartSchool's overview of technical analysis notes the general criticism that signals can arrive late, after much of a move has already taken place, and that not all technical signals and patterns work.
That matches the framing in the listing for our simulator, Learn to Trade Stocks Beginner: technical indicators summarise price or volume information but cannot confirm a future outcome or remove uncertainty. Its lessons include momentum indicators, and its chart replay lets you test your reading of them on simulated price action with a virtual balance, so you can see how often crossovers whipsaw without real money at stake. It is one of our education apps; the investing basics hub lists the other chart guides, including support and resistance and technical versus fundamental analysis.
Good to know
Frequently asked questions
What is the MACD indicator?
How is the MACD histogram calculated?
What does a MACD crossover mean?
How is MACD different from RSI?
Sources
- MACD (Moving Average Convergence/Divergence) Oscillator (ChartSchool) (opens in a new tab)StockCharts.com — accessed
- Moving Averages – Simple and Exponential (ChartSchool) (opens in a new tab)StockCharts.com — accessed
- Technical Analysis (ChartSchool) (opens in a new tab)StockCharts.com — accessed
About the author
Reign Creative LLC — The independent app studio that builds the apps covered on this site and publishes every article here. On Google Play it publishes as Reign Collective Apps.
We use AI tools to help research, draft and edit our articles. Each article lists the sources its factual claims rely on, and details about our apps come from their live Google Play listings. No article on this site has been reviewed by an independent expert unless the reviewer is named on it.
No person at Reign Creative LLC has read this article in full. It was published after automated checks and an AI editorial review, which are described in our editorial policy and are not the same as a person reading every sentence.
Spotted an error? Tell us — how corrections are handled is set out in our editorial policy.