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 divergenceDefault settings
12, 26, 9 (fast EMA, slow EMA, signal EMA)MACD line
12 EMA - 26 EMAof the closeSignal line
9 EMA of the MACD lineHistogram
MACD line - signal lineRange
No upper or lower limit; values are in price unitsMain 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.
| Part | How it is made | What it tells you |
|---|---|---|
| MACD line | 12 EMA minus 26 EMA | Direction and strength of the short term trend |
| Signal line | MACD line smoothed by a 9 EMA | A slower copy that the MACD line crosses |
| Histogram | MACD line minus signal line | Whether momentum is speeding up or slowing down |
| Zero line | A flat line at 0 | Where 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.
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.
- New 12 EMA = (53.10 - 52.40) x 0.1538 + 52.40 = 52.5077
- New 26 EMA = (53.10 - 51.70) x 0.0741 + 51.70 = 51.8037
- MACD line = 52.5077 - 51.8037 = 0.7040
- Signal line = (0.7040 - 0.55) x 0.2 + 0.55 = 0.5808
- 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.

How to read MACD on a chart
Read MACD in this order. It keeps you from reacting to one bar.
- Side of zero. Above zero means the short term average is above the long one. Below zero means the reverse.
- Slope of the MACD line. Rising means momentum is improving, even if the line is still negative.
- Position against the signal line. Above the signal line, the histogram is positive.
- Histogram size. Growing bars mean the move is speeding up. Shrinking bars mean it is losing pace.
- 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.
| Signal | Bullish version | Bearish version | Full guide |
|---|---|---|---|
| Signal line crossover | MACD crosses above the signal line | MACD crosses below the signal line | MACD crossover |
| Zero line cross | MACD rises through 0 (12 EMA crosses above 26 EMA) | MACD falls through 0 | Crossovers above and below zero |
| Divergence | Price makes a lower low, MACD a higher low | Price makes a higher high, MACD a lower high | MACD 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.
- Switch MACD on and look at where the histogram changes color.
- Move the fast length slider from 12 down to 8. Count the crossovers again: there will be more of them.
- 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.
For a bounded momentum reading, many traders pair it with the RSI indicator; the RSI vs MACD comparison explains how the two differ.

All MACD guides on this site
| Topic | Guide | Read it when |
|---|---|---|
| Using MACD in practice | MACD trading strategy | You want rule sets to test with filters and exits |
| Signals | MACD crossover | You want to read the signal line and zero line |
| Signals | MACD divergence | Price and MACD disagree at swing highs or lows |
| Parts | MACD histogram | You read momentum from the bars |
| Setup | MACD settings | You trade 1, 5 or 15 minute charts, or weekly ones |
| Comparison | RSI vs MACD | You 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
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.
