Ad Space — Top Banner

MACD Calculator (Moving Average Convergence Divergence)

Calculate MACD line, signal line, and histogram from fast and slow EMAs.
Standard 12/26/9 settings or any custom periods for trend trading.

MACD line

Gerald Appel built MACD in the late 1970s. The recipe is three exponential moving averages stacked together:

  • MACD line = 12-period EMA - 26-period EMA
  • Signal line = 9-period EMA of the MACD line
  • Histogram = MACD line - Signal line

The 12/26/9 numbers are convention but not gospel. Day traders run 5/13/5. Weekly chart traders sometimes use 19/39/9. The key relationship — fast minus slow, smoothed by signal — is what generates the readings, not the specific numbers.

Three signals come from one indicator.

  1. Zero-line cross: MACD crossing above 0 means the fast EMA crossed above the slow EMA. That is the underlying golden cross.
  2. Signal cross: MACD crossing above its signal line is a faster, noisier momentum trigger. Short-term traders use this; trend followers ignore it.
  3. Histogram divergence: when price makes a new high but the histogram makes a lower high, momentum is fading. This is the classic divergence setup.

Why MACD lags everything. It is a moving average of a moving average. By the time the signal line crosses, price has often already moved 30 to 50% of the next swing. Use MACD for confirmation in trending markets and avoid it in chop — it whipsaws hard when price grinds sideways.

The histogram is the early-warning system. Histogram peaks before the signal cross. If the histogram bars are getting shorter while price climbs, the cross is coming. Pros watch the histogram, not the line.

Worked example. Stock at $50. 12-EMA = $49.20, 26-EMA = $48.40, 9-EMA of MACD line = $0.65.

  • MACD line = 49.20 - 48.40 = 0.80
  • Signal = 0.65
  • Histogram = 0.80 - 0.65 = 0.15 (positive and rising)

Interpretation: short-term momentum is bullish, signal cross has already fired, histogram is expanding upward.


Ad Space — Bottom Banner

Embed This Calculator

Copy the code below and paste it into your website or blog.
The calculator will work directly on your page.