TradingCalculated
Calculations run privately in your browser
80 values
Paste a column from a spreadsheet or export.
MACD (12, 26, 9)1.846fast EMA above slow EMA
Histogram0.146bullish crossover 25 bars ago
Signal line1.7
MACD crossing above its signal line is the classic bullish trigger; crossing below is bearish. The histogram shrinking towards zero warns that momentum is fading before the crossover happens.
Price
MACD and signal
Histogram (MACD − signal)
Last 10 bars
BarCloseMACDSignalHist
#80109.881.8461.70.146
#79109.741.7971.6640.134
#78108.821.7231.630.093
#77107.551.6961.6070.089
#76108.581.7671.5850.183
#75106.891.7271.5390.188
#74107.981.8231.4920.331
#73108.581.8081.4090.399
#72107.571.7021.3090.392
#71108.121.6441.2110.432

Not financial advice. Results are estimates based on the values you enter and simplified assumptions; real trades are affected by fees, slippage, gaps and other factors. Trading involves substantial risk of loss. Read the full disclaimer.

How to calculate MACD

MACD line = EMA(12) − EMA(26) Signal = EMA(9) of the MACD line Histogram = MACD − Signal

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

  1. EMA(12) = 105.40 and EMA(26) = 103.90 → MACD = 1.50.
  2. The 9-period EMA of recent MACD values is 1.20 → signal = 1.20.
  3. 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.
Technical Indicators

EMA Calculator

Calculate an exponential moving average with the 2 ÷ (n + 1) multiplier, bar by bar.

80 closes · EMA 20 & 50
Technical Indicators

RSI Calculator

Calculate the Relative Strength Index with Wilder or simple averaging and see overbought/oversold readings.

Avg gain 0.714 / avg loss 0.357 → RSI 66.67
Technical Indicators

ADX Calculator

Calculate ADX, +DI and −DI with Wilder smoothing to measure trend strength and direction.

ADX(14) with +DI / −DI → trend strength

MACD calculator FAQ

What are the best MACD settings?

12, 26, 9 is the standard. Faster settings (e.g. 5, 35, 5) react sooner but whipsaw more.

Is MACD a trend or momentum indicator?

Both: the line measures trend (EMA spread), the histogram measures momentum of that trend.