Formula & Calculator

MACD Line

The MACD (Moving Average Convergence Divergence) line is the difference between the 12-period EMA and the 26-period EMA. It measures momentum and trend direction. When the MACD is positive and rising, momentum is bullish; negative and falling is bearish. A signal line (9-period EMA of MACD) is often plotted on top, and crossovers between the two generate trading signals. It is one of the most widely used momentum indicators.

Crypto Trading Technical Analysis
VORZEP · TECHNICAL INDICATOR TOOLS

MACD Line Calculator

Solve the moving-average convergence relation MACD = EMA12 − EMA26 for any of its three unknowns — the MACD line value, the fast EMA, or the slow EMA — with step-by-step math, a live dual-EMA schematic, and companion metrics covering the signal line, histogram, and crossover state.

MACD = EMA12 − EMA26
COMMON MACD SCENARIOS
Solve for
MACD Line The difference between the 12-period EMA and the 26-period EMA of the price. A positive MACD means the fast EMA is above the slow EMA (bullish momentum); a negative MACD means the fast is below the slow (bearish momentum). The magnitude — not just the sign — matters: a growing positive MACD signals accelerating upward momentum, while a shrinking one signals weakening momentum even if still positive. This is the raw MACD line, before any signal-line or histogram calculation.
value
MACD must be a valid number.
= +250.00 · fast is 0.594% above slow
Fast EMA (EMA12) The 12-period exponential moving average of the closing price. The "fast" line reacts quickly to recent price changes because more weight is placed on the most recent bars. The 12-period span corresponds to a smoothing factor of α = 2 / (12 + 1) ≈ 0.1538, meaning the newest price gets about 15% of the weight. In the MACD formula, this is the line that moves first and creates the crossover signal.
price
Fast EMA must be greater than zero.
= 42,350.00 · 0.594% above slow EMA
Slow EMA (EMA26) The 26-period exponential moving average of the closing price. The "slow" line reacts more gradually because the smoothing factor is smaller: α = 2 / (26 + 1) ≈ 0.0741, meaning the newest price gets about 7.4% of the weight. In the MACD formula this acts as the baseline — the MACD line is essentially "how far has the fast EMA diverged from the slow EMA". When the fast line is above the slow line, MACD is positive; when below, negative.
price
Slow EMA must be greater than zero.
= 42,100.00 · the slower, smoother baseline
MACD LINE
+250.00
EMA12 42,350.00 · EMA26 42,100.00 · diff +250.00
BULLISH — FAST ABOVE SLOW
MACD = EMA12 − EMA26
Step-by-step solution
MACD vs. fast EMA (slow fixed)
Current slow EMA Slow − 500 Slow + 500
MACD vs. slow EMA (fast fixed)
Current fast EMA Fast − 500 Fast + 500
Signal line & histogram assumptions
value
value
price
Sensitivity of the MACD
Companion MACD metrics
Compute EMAs from pasted prices

Paste a series of closing prices (comma, space or newline separated). The parser will compute the full 12-period and 26-period EMAs from the data and populate the FAST and SLOW fields.

No data loaded
Fast EMA vs. slow EMA divergence — live schematic
MACD LINE · EMA12 − EMA26 FAST EMA (12) 42,350.00 SLOW EMA (26) 42,100.00 +250.00 MACD HISTOGRAM — VALUE RELATIVE TO ZERO BEARISH (−) BULLISH (+) MACD = 42,350.00 − 42,100.00 = +250.00
Fast EMA (12-period) — reacts quickly Slow EMA (26-period) — the baseline The MACD line = fast minus slow
What the MACD line really measures
MACDmomentum signal
=
EMA₁₂fast line
−
EMA₂₆slow line

MACD measures the speed of trend change

The raw MACD line is a momentum indicator, not a price indicator. When price accelerates upward, the fast EMA pulls away from the slow EMA and MACD rises; when the trend weakens, the fast EMA decelerates and MACD falls even if the trend is still up. This is why traders watch both the sign of MACD (positive = uptrend, negative = downtrend) and its slope (rising = strengthening, falling = weakening). The MACD crossovers — when the line crosses zero — are the signal events.

The magnitude is denominated in the asset's price

A MACD of +250 is very different on a $100 asset than on a $42,000 asset. The raw MACD value scales with the price level, which makes absolute comparisons across assets meaningless. To compare across price levels, normalize MACD by the price (MACD% = MACD / Price × 100), which is what many platforms do under the label "MACD Percentage" or "PPO" (Percentage Price Oscillator). A MACD% of +0.59% on BTC and a MACD% of +0.59% on a $10 stock represent the same momentum intensity.

MACD signals lag the price by design

Because EMA26 places most of its weight on prices from 20–26 bars ago, the MACD line is inherently a lagging indicator. It will always turn after the price has already turned. This lag is the price paid for filtering out noise. Traders who want earlier signals use shorter periods (for example 5-13-1 instead of 12-26-9), accepting more false signals. Traders who want smoother signals use longer periods (for example 19-39-9), accepting more lag. The classic 12-26-9 is the standard middle ground established by Gerald Appel in the 1970s.

The signal line converts MACD into tradeable events

Alone, the MACD line is just a number that oscillates around zero. The signal line — a 9-period EMA of the MACD line itself — converts it into crossovers: when MACD crosses above its signal line, that is a bullish signal; when it crosses below, bearish. The histogram is the difference between MACD and its signal line, and its slope shows acceleration or deceleration of the crossover. This is what makes MACD a complete trading system rather than just a momentum reading.

How to Use This Calculator

The MACD relation links three quantities: the MACD line, the fast EMA and the slow EMA. Pick which one you want the tool to solve, then fill in the other two.

1. Start with a scenario

Click a scenario chip like "Bullish crossover" or "Sharp selloff" to load typical EMA values. Each chip carries fast and slow EMA values so you immediately see the implied MACD.

2. Choose what to solve for

Pick MACD, EMA₁₂ or EMA₂₆ from the toggle. Solving for MACD gives you the indicator value; solving for EMA₁₂ tells you what fast reading would produce a target MACD; solving for EMA₂₆ tells you what slow reading would do the same.

3. Enter actual EMA readings

EMAs are published on every charting platform — TradingView, TradingView-like tools, exchange interfaces, and most charting libraries. Just read the current EMA12 and EMA26 values off the chart and enter them here. Or paste a price series into Advanced mode and let the parser compute them.

4. Read the result and verdict

The result card shows the MACD line value plus the fast/slow EMA readings and the percentage divergence. A colour-coded verdict classifies the reading from strong bearish through neutral and crossover to strong bullish.

5. Check the schematic and charts

The schematic draws the fast and slow EMAs as proportional bars, with the MACD value shown as the difference between them, and a histogram visualization underneath marking the current reading relative to zero. The chart plots MACD against fast EMA for three slow-EMA levels.

6. Switch to Advanced for signal line & parsing

Advanced mode adds a second chart, inputs for the signal line, prior MACD and current price, a sensitivity check, and companion metrics including histogram value, crossover state, MACD%, and the momentum direction. It also has a price parser that computes 12 and 26-period EMAs directly from pasted data.

What This Tool Offers

Built around the MACD relation MACD = EMA₁₂ − EMA₂₆, the standard formula for the momentum signal that drives one of the most widely used technical indicators in trading.

Three-way solving

Solve for the MACD line, the fast EMA or the slow EMA. The calculator rearranges the formula for whichever variable you choose.

Dual-EMA schematic

A live diagram draws the fast and slow EMAs as proportional bars, shows the MACD value as their difference, and visualizes the histogram relative to zero.

Momentum-tier verdict

Each result is classified from strong bearish through crossover to strong bullish, with a coloured badge that updates as you adjust the inputs.

EMA parser

Paste a series of closing prices and the calculator computes the 12-period and 26-period EMAs using the standard exponential smoothing formula.

Signal line & histogram

Advanced mode takes the 9-period signal line value and the prior MACD value, and reports the histogram, the crossover state, and the momentum direction (accelerating or decelerating).

Reference tables

MACD interpretation bands, common EMA period configurations, typical MACD values by asset class, and a full variable reference.

Reference Tables & Conversions

MACD interpretation bands, EMA period configurations, and typical MACD values by asset class.

Quick MACD estimator

price
price
= MACD +250.00 · MACD% +0.591% · bullish crossover territory

MACD Interpretation Bands

General bands used by practitioners. What counts as "strong" depends on the asset's price level and volatility — always normalize by price for cross-asset comparison.

MACD % of priceInterpretationMomentumTypical context
below −3%Strong bearishStrong negativeCapitulation phase, sharp downtrend
−3% to −1%BearishNegativeEstablished downtrend
−1% to −0.2%Mildly bearishWeakly negativeEarly downtrend, or pullback in uptrend
−0.2% to +0.2%Neutral / crossoverFlatCrossover zone, transition territory
+0.2% to +1%Mildly bullishWeakly positiveEarly uptrend, or bounce in downtrend
+1% to +3%BullishPositiveEstablished uptrend
above +3%Strong bullishStrong positiveBlow-off top, parabolic rally, late-cycle acceleration

Common EMA Period Configurations

The classic MACD uses 12-26-9. Different timeframes and asset classes have preferred alternatives.

ConfigurationFast / Slow / SignalUse caseCharacter
Classic (Appel)12 / 26 / 9Daily charts, standard across all marketsBalanced lag vs noise; the default
Fast5 / 13 / 1Intraday and short-term tradingEarlier signals, more false positives
Slow19 / 39 / 9Weekly charts, long-term positionsFewer signals, more lag, higher reliability
Crypto short-term8 / 21 / 54-hour and daily crypto chartsResponsive to crypto's higher volatility
Crypto swing12 / 26 / 9Daily and 3-day crypto chartsStandard; well-behaved on BTC and ETH
Equity intraday6 / 19 / 65-minute to 15-minute chartsEarlier entries for scalping
Monthly macro12 / 26 / 9Monthly close chartsUsed for regime identification

Typical MACD Values by Asset Class

Representative ranges during active trending markets. These are highly regime-dependent — the same asset can show 10× the MACD value during a strong trend versus a sideways market.

Asset classTypical price rangeNeutral MACD rangeTrending MACD rangeExtreme MACD
Major FX (EUR/USD)1.00 – 1.20±0.001±0.005±0.02
Large-cap equity ($100 stock)80 – 150±0.5±3±10
S&P 500 index (SPX)4,000 – 5,500±20±80±300
Gold (per oz)1,800 – 2,500±5±30±100
Bitcoin (BTC)40,000 – 100,000±300±2,000±8,000
Ethereum (ETH)2,000 – 4,000±20±120±400
Altcoins ($1-5)1 – 5±0.01±0.08±0.30
Meme coins ($0.001)0.0005 – 0.01±0.00002±0.0001±0.0005

Variable Reference

SymbolMeaningTypical rangeUnits
MACDMACD line = EMA12 − EMA26asset-dependentprice
EMA1212-period exponential moving average> 0price
EMA2626-period exponential moving average> 0price
Signal9-period EMA of MACDasset-dependentprice
HistogramMACD − Signalasset-dependentprice
MACD%MACD / Price × 100−5% – +5%%
α12Smoothing factor for EMA12 = 2/130.1538—
α26Smoothing factor for EMA26 = 2/270.0741—

What Does the MACD Line Measure?

The MACD — Moving Average Convergence Divergence — was developed by Gerald Appel in the late 1970s as a way to combine trend-following and momentum into a single indicator. The MACD line itself is simply the difference between two exponential moving averages: the 12-period EMA and the 26-period EMA of the price. When the fast EMA is above the slow EMA, MACD is positive and the trend is upward; when it is below, MACD is negative and the trend is downward. The magnitude of the difference measures how strongly the trend is diverging.

What makes MACD more than just a moving-average crossover is the additional layer on top: a 9-period EMA of the MACD line, called the signal line, which converts the raw oscillator into tradeable crossover events. Combined with a histogram (the difference between MACD and the signal line), MACD becomes a complete system for identifying trend direction, momentum strength, and likely reversal points. It is one of the most widely used technical indicators in equities, futures, FX and crypto.

MACD Line Formula

The defining relationship is:

MACD = EMA12 − EMA26

Rearranged to solve for the other two unknowns:

EMA12 = MACD + EMA26
EMA26 = EMA12 − MACD

The signal line and histogram extend the calculation:

Signal = EMA9(MACD)
Histogram = MACD − Signal

The EMA itself is computed recursively, with a smoothing factor α that depends on the period:

α = 2 / (period + 1)
EMAt = α · Pricet + (1 − α) · EMAt−1

MACD Line Variables

SymbolMeaningNotes
MACDThe MACD line valuePositive = bullish, negative = bearish
EMA12Fast exponential moving average12-period, α = 2/13 ≈ 0.154
EMA26Slow exponential moving average26-period, α = 2/27 ≈ 0.074
Signal9-period EMA of MACDTriggers crossover signals
HistogramMACD − SignalShows momentum acceleration
MACD%MACD / Price × 100Normalizes for cross-asset comparison

How Each Variable Affects the MACD

The MACD rises linearly with the fast EMA and falls linearly with the slow EMA. A 1-point rise in EMA12 raises MACD by 1 point; a 1-point rise in EMA26 lowers it by 1 point. This linearity makes MACD easy to reason about, but it also means the raw value scales with the price level of the asset — a MACD of 250 on a $100 stock and a MACD of 250 on a $42,000 BTC are completely different signals. To compare across assets, always normalize by dividing MACD by the current price.

What makes MACD interesting isn't the instantaneous value but its dynamics. The MACD line leads the price on turning points: it peaks and starts falling before the price peaks, because the fast EMA decelerates as the price's rate of change declines. This lead-lag relationship is what traders try to exploit — a falling MACD during a rising price is a warning of weakening momentum, and a rising MACD during a falling price is an early signal of a bottom. These divergences (price making a new high while MACD makes a lower high, or vice versa) are among the most watched patterns in technical analysis.

MACD Line Calculation Examples

Given: EMA12 = 42,350, EMA26 = 42,100 — solve for MACD
MACD = 42,350 − 42,100 = +250.00
Given: MACD = +250, EMA26 = 42,100 — solve for EMA12
EMA12 = 250 + 42,100 = 42,350.00
Given: MACD = +250, EMA12 = 42,350 — solve for EMA26
EMA26 = 42,350 − 250 = 42,100.00
Given: EMA12 = 41,950, EMA26 = 42,100 — solve for MACD
MACD = 41,950 − 42,100 = −150.00 (bearish)
Given: MACD = +250, price = 42,300 — solve for MACD%
MACD% = 250 / 42,300 × 100 = +0.591%
Given: MACD = +250, Signal = +180 — solve for histogram
Histogram = 250 − 180 = +70.00

Frequently Asked Questions

A positive MACD means the 12-period EMA is above the 26-period EMA, which is a sign that recent prices are higher on average than prices from 2 to 4 weeks ago. In practice, this signals an uptrend. But the raw sign is less informative than you might expect — the MACD is positive most of the time in any market that trends upward, including during healthy pullbacks in an ongoing bull run. What matters more is the trend of MACD itself: is it rising (accelerating uptrend), falling but still positive (decelerating uptrend), or crossing zero (trend change)? Traders use the combination of sign, slope and crossover position rather than any single reading.

The 12 and 26 periods were chosen by Gerald Appel for the original MACD in the late 1970s, and they have persisted because they work reasonably well across many markets. The numbers themselves are somewhat arbitrary — 12 corresponds roughly to two trading weeks, 26 to about a month (or one lunar cycle, which some traders find aesthetically appealing). The 9-period signal line was added later. Modern traders sometimes use alternatives (5-13, 8-21, 19-39) for different timeframes and asset classes, but the classic 12-26-9 remains the standard. Because it is so widely watched, it also has a self-fulfilling quality — enough traders use it that the crossovers it produces occasionally become real inflection points.

The EMA is a recursive average that gives more weight to recent prices. The formula is EMA_t = α · Price_t + (1 − α) · EMA_{t−1}, where α = 2 / (period + 1) is the smoothing factor. For the 12-period EMA, α = 2/13 ≈ 0.1538, so the newest price gets about 15% of the weight and the previous EMA carries 85%. For the 26-period EMA, α = 2/27 ≈ 0.0741. To start the recursion you need a seed value — usually a simple moving average of the first 12 or 26 prices. Because the smoothing is recursive, the EMA carries an "infinite memory" of past prices in principle, but the weight decays geometrically and prices more than ~3× the period ago have negligible influence.

The signal line is a 9-period EMA of the MACD line itself. It smooths out the raw MACD so that the crossover between MACD and the signal line becomes a cleaner, tradeable event. A bullish signal is when MACD crosses above the signal line; a bearish signal is when it crosses below. The histogram — the difference between MACD and the signal line — provides further granularity: a rising histogram means MACD is pulling away from the signal line (strengthening momentum), while a shrinking histogram means MACD is converging on the signal line (weakening momentum). Together, MACD + signal + histogram is the complete indicator.

Not directly — the raw MACD value is denominated in the asset's price, so a MACD of 250 on BTC and a MACD of 250 on AAPL are not comparable. To make them comparable, you need to normalize by dividing by the price: MACD% = MACD / Price × 100. This is often called the "PPO" (Percentage Price Oscillator) or "MACD Percentage" in trading platforms. With normalization, a MACD% of +0.59% means the same thing on every asset: the fast EMA is 0.59% above the slow EMA. This is the correct way to compare momentum intensity across different price levels. The calculator reports both raw MACD and MACD% in the companion metrics.

In principle, yes — MACD can be computed on any series of prices, from 1-minute bars to monthly closes. What changes is what the indicator means. On a 1-minute chart, MACD is measuring momentum over the last ~30 minutes and produces signals that last minutes. On a daily chart, it is measuring momentum over the last 2–6 weeks and signals last days to weeks. On a weekly chart, it identifies regime shifts that persist for months. The classic 12-26-9 periods are calibrated for daily charts and are the default on most platforms. For higher timeframes (monthly) you may want to increase the periods; for intraday, you may want to decrease them. The key is to be consistent — pick a timeframe and use MACD that matches it, and don't mix signals across timeframes without a clear framework.

Divergence occurs when price makes a new high (or low) but MACD does not, indicating that momentum is weakening even as price continues in its trend. Bullish divergence (price makes a lower low, MACD makes a higher low) is often cited as an early signal of an impending reversal higher; bearish divergence (price makes a higher high, MACD makes a lower high) as a signal of an impending reversal lower. Divergence is widely followed but notoriously unreliable in practice — it can persist for weeks or months before any reversal actually happens, and trends can continue through multiple divergences in a strong move. Treat divergence as a warning to pay attention, not a trade signal on its own.

Moderately, but with significant caveats. The basic crossover (MACD above signal line = buy, below = sell) works well in trending markets and produces many false signals in choppy or sideways markets. It is a lagging indicator by construction, so signals come after the price move has already begun, and the crossover that marks a reversal is often followed by another crossover that reverses it. Traders improve the reliability by (1) filtering signals with a trend indicator (only take long signals when price is above a 200-period MA, for example), (2) requiring the crossover to happen near the zero line or at a specific level, (3) using higher timeframes for direction and lower timeframes for entry, and (4) combining MACD with other indicators. No single indicator is a complete trading system, and MACD is no exception.

Calculating...

Variables

Symbol Quantity Unit
MACD MACD line value
EMA_12 12-period exponential moving average
EMA_26 26-period exponential moving average

What it means

The Moving Average Convergence Divergence (MACD) is a trend‑following momentum indicator. The MACD line is the difference between two EMAs. When the MACD crosses above the signal line, it is a bullish signal; below is bearish. It is used to identify changes in trend strength. Understanding MACD is essential for technical analysis and is widely used by traders in all markets.

Worked example

MACD Line – Two Detailed Examples

Real‑World
Scenario: A trader calculates the 12‑day EMA and 26‑day EMA for BTC. The 12‑day EMA is 61,200 and the 26‑day EMA is 60,500. MACD = 61,200 - 60,500 = 700. A positive MACD indicates bullish momentum. The trader uses this to confirm an uptrend.
ParameterValue
EMA_1261,200
EMA_2660,500
1MACD = 61,200 - 60,500 = 700
Result 700 ✓ Bullish MACD
Scenario: For ETH, EMA_12 = 3,050 and EMA_26 = 3,100. MACD = 3,050 - 3,100 = -50. A negative MACD suggests bearish momentum. The trader might consider this a sell signal or wait for a crossover.
ParameterValue
EMA_123,050
EMA_263,100
1MACD = 3050 - 3100 = -50
Result -50 ✓ Bearish MACD
Insight: The MACD line is the difference between the 12‑period and 26‑period EMAs. It is a trend‑following momentum indicator. Crossovers with the signal line generate buy/sell signals.

Common mistakes

  • MACD: Moving Average Convergence Divergence – difference between two EMAs.
  • EMA_12: 12‑period EMA; EMA_26: 26‑period EMA.
  • Signal line: Often a 9‑period EMA of the MACD line.
  • Crossovers: Bullish when MACD crosses above signal line.

Applications

MACD line is the difference between a fast EMA (typically 12‑period) and a slow EMA (26‑period). It is a key component of the MACD indicator, which also includes a signal line and histogram. Traders use MACD to identify trend direction, momentum, and buy/sell signals via crossovers. By understanding the MACD line, they can gauge the relationship between short‑term and long‑term moving averages. MACD is a standard tool in technical analysis.

  • Identifying trend direction and momentum
  • Generating crossover signals (MACD vs. signal line)
  • Divergence analysis for potential reversals
  • Assessing the strength of a trend
  • Entry and exit signals for trades

Related calculators · Technical & Market Analysis

Suggest an improvement

Found a mistake? Have a better example? Let us know.
You may send up to 3 suggestions per 24 hours.

Page details

1,083

Views
  • Published July 15, 2026
  • Last updated September 15, 2026