How to calculate MACD
Paste prices oldest-first, one value or row per bar — straight from a spreadsheet or CSV export. Use “Sample data” to try it instantly.
Worked example
- EMA(12) = 105.40 and EMA(26) = 103.90 → MACD = 1.50.
- The 9-period EMA of recent MACD values is 1.20 → signal = 1.20.
- Histogram = 1.50 − 1.20 = +0.30: MACD above its signal, momentum rising.
How to interpret MACD
- MACD above zero: the fast EMA is above the slow one — bullish trend bias.
- MACD crossing above the signal line: bullish trigger; crossing below: bearish.
- A shrinking histogram warns of fading momentum before a crossover.
- Divergence — price making new highs while MACD doesn't — signals a weakening trend.
Limitations and common mistakes
- MACD needs at least slow + signal bars before the first signal value appears (35 bars for 12/26/9).
- MACD values are in price units, so they can't be compared across instruments with different prices.