๐Ÿงฐ UtlKit

MACD Calculator

Calculate MACD (Moving Average Convergence Divergence) from closing prices. Detect buy/sell signals.

Understanding MACD

What is MACD?

The Moving Average Convergence Divergence (MACD) is a trend-following momentum indicator developed by Gerald Appel in the late 1970s. It shows the relationship between two moving averages of a security. The MACD line, signal line, and histogram together provide signals for trend direction, momentum, and potential reversals.

MACD Formulas

MACD = EMA(12) - EMA(26)

Signal = EMA(MACD, 9)

Key Signals

๐ŸŸข Bullish Crossover

MACD line crosses above signal line โ†’ potential buy signal. Most reliable when above zero line.

๐Ÿ”ด Bearish Crossover

MACD line crosses below signal line โ†’ potential sell signal. Most reliable when below zero line.

MACD Divergence

When price moves opposite to MACD, it suggests weakening momentum. Bullish divergence: price lower lows, MACD higher lows. Bearish divergence: price higher highs, MACD lower highs.

Frequently Asked Questions

What is MACD?

MACD (Moving Average Convergence Divergence) is a trend-following momentum indicator. It shows the relationship between two EMAs of price.

How to use MACD signals?

When the MACD line crosses above the Signal line, it generates a buy signal. When it crosses below, it generates a sell signal.

๐Ÿ›

Report a Problem

Found a bug or have a suggestion? Help us improve this tool.

๐Ÿ“Š Data Summary (auto-filled)

Tool: macd-calculator ยท /tools/macd-calculator/

fast: 12

slow: 26

signalPeriod: 9

What is this tool?

MACD (Moving Average Convergence Divergence) calculator computes this popular trend-following momentum indicator. MACD is calculated by subtracting the 26-period EMA from the 12-period EMA. The signal line (9-period EMA of MACD) and histogram help identify buy/sell signals, trend direction, and momentum shifts. A cornerstone indicator in technical analysis.

How to use

  1. 1

    Enter price data

    Input closing prices or connect data source.

  2. 2

    Set parameters

    Configure EMA periods (default: 12, 26, 9).

  3. 3

    View signals

    See MACD line, signal line, histogram, and crossovers.

Frequently Asked Questions

How do I read MACD signals?

MACD crossing above signal line = bullish signal (buy). MACD crossing below signal line = bearish signal (sell). Histogram bars growing = momentum increasing. Divergence between MACD and price = potential reversal warning. Best used with other indicators for confirmation.

How is signal line calculated?

9-period EMA of the MACD line.

What is the best MACD setting?

The default setting of (12, 26, 9) works well for most timeframes and is the standard used by most traders. For shorter-term trading, some use (5, 13, 1) for faster signals. For long-term trends, (24, 52, 18) can filter noise better. There is no universally optimal setting โ€” backtest different parameters on your specific market and timeframe to find what works best for your strategy.