Home / Crypto & Blockchain / DeFi & Yield Farming / Impermanent Loss (Liquidity Pool)

Formula & Calculator

Impermanent Loss (Liquidity Pool)

When you provide liquidity to an automated market maker (AMM) like Uniswap, you deposit two tokens in a pool. If their prices move apart, you can end up with less value than if you had just held the tokens. This is called impermanent loss. The formula shows the loss grows as the price ratio deviates from 1. For example, if one token doubles in price relative to the other, you lose about 5.7% compared to holding. It is a key risk in DeFi liquidity provision.

Crypto DeFi Liquidity Pools
VORZEP · DEFI & LIQUIDITY POOL TOOLS

Impermanent Loss Calculator

Quantify the divergence loss a constant-product liquidity provider suffers when the pool price moves away from the deposit price — solve forwards from two prices or backwards from a target loss, with step-by-step algebra, a live IL curve, the LP-versus-HODL value split, and break-even fee analysis.

IL = ( 2·√r / (1 + r) − 1 ) × 100 · r = P₁ / P₀ · VLP = √r · VHODL = (1 + r) / 2
Solve for
Deposit price (P₀) The pool price of token A at the moment you deposited. Only the ratio P₁/P₀ matters for impermanent loss, so any consistent price unit works — USD, ETH, or even an arbitrary number. The price level itself only affects the dollar figures.
P₀
Deposit price must be greater than zero.
Withdrawal price (P₁) The pool price of token A at the moment you withdraw. Arbitrageurs rebalance the pool every time the external market price moves, so this is effectively the current market price. A move in either direction causes loss — up 2× and down 50% both give −5.72%.
P₁
Withdrawal price must be greater than zero.
Price ratio (r = P₁/P₀) The ratio of the new price to the old price. r = 2 means the price doubled; r = 0.5 means it halved. Impermanent loss depends only on this ratio, and is perfectly symmetric: r and 1/r produce exactly the same loss.
r
Price ratio must be greater than zero.
Impermanent loss (%) The percentage by which the LP position underperforms simply holding the two tokens. It is always zero or negative — never a gain — and it approaches −100% only as the price ratio approaches 0 or infinity. Enter a positive number and the tool treats it as the loss magnitude.
%
Impermanent loss must be between −99.9999% and 0%.
USD
% / yr
IMPERMANENT LOSS
−5.7191%
price 2.0000× → LP $14,142.14 vs HODL $15,000.00
MODERATE DIVERGENCE
IL = ( 2·√r / (1 + r) − 1 ) × 100
Step-by-step solution
Impermanent loss vs price ratio
IL curve — 2·√r/(1+r) − 1 Your position
LP value vs HODL value
LP position value (√r) HODL value ((1+r)/2) Your position
Sensitivity — IL at nearby price ratios
Companion pool metrics
LP position vs HODL — where the divergence comes from
Token A value Token B value Divergence gap — the impermanent loss
What impermanent loss really measures
ILimpermanent loss
=
VLPvalue in the pool
÷
VHODLvalue of just holding
−
1baseline

It is symmetric — up and down hurt equally

Because the formula contains √r in the numerator and (1 + r) in the denominator, swapping r for 1/r leaves the result unchanged. A token that doubles produces exactly the same −5.72% loss as a token that halves. This is the single most counter-intuitive fact about impermanent loss, and it follows directly from the constant-product invariant x·y = k: the pool is forced to sell the appreciating asset and buy the depreciating one, in both directions.

The pool is a constant seller of winners

A constant-product AMM has no way to know which way the price is going. When token A appreciates, arbitrageurs buy it out of the pool at the stale price until the pool price matches the market — leaving the LP with less A and more B. When token A depreciates, the reverse happens. Either way the LP ends up holding relatively more of the worse-performing asset. The loss is the cost of providing liquidity to a market maker that is always a passive contrarian.

"Impermanent" means it can reverse

If the price returns to the deposit ratio, the loss vanishes entirely — the pool composition is restored and the LP holds exactly what they started with, plus whatever fees were earned. The loss only becomes permanent when you withdraw at a different price. This is why the loss is called impermanent even though it is measured in real value: it is contingent on the price never returning, which for a volatile pair may or may not happen over the holding period.

Fees are the compensation — and must beat it

LPs earn trading fees precisely because they accept divergence risk. The strategy only works if fee income exceeds the impermanent loss over the holding period. At a 20% fee APR, a −5.72% loss is recovered in about 104 days; a −20% loss takes around 365 days. This is why high-yield pools on volatile pairs can still be unprofitable, and why stable-pair pools with modest APRs are often the better risk-adjusted choice despite their lower headline returns.

How to Use This Calculator

The impermanent loss formula takes one dimensionless input — the price ratio r — and returns one output. Choose which direction you want to solve in, and fill in the rest.

1. Choose the direction

Solve forwards from two prices to get the loss, or backwards from a target loss to find the price ratios that produce it. The inverse always has two solutions, because the IL curve is symmetric.

2. Enter real prices or a ratio

Only the ratio matters for the percentage loss, so you can use any consistent price unit. Presets cover a 2× move and common loss targets from −0.5% to −75%.

3. Set your position size

The deposit value converts the percentage loss into dollars and shows the LP versus HODL split. The fee APR drives the break-even calculation in the companion metrics.

4. Read the result and verdict

The result card shows the loss with a colour-coded severity badge, alongside the absolute LP value, HODL value and dollar gap. Anything beyond −10% is classified as significant.

5. Check the curves and the split

The IL curve shows the full shape of the loss across a 0.1× to 10× price range with your position marked. The bar diagram breaks both positions into their two token components so you can see exactly which side grew and which shrank.

6. Switch to Advanced for the full picture

Advanced mode adds the LP-versus-HODL value chart, a sensitivity panel showing IL at nearby ratios, and a companion table with token amounts, break-even days at four different fee APRs, and the concentration of your final position.

What This Tool Offers

Built around the constant-product divergence formula IL = 2·√r/(1+r) − 1, the standard measure of liquidity provision risk.

Forward and inverse solving

Compute the loss from two prices, or invert the formula to find the exact price ratios that produce a given loss — with both symmetric solutions reported.

Live IL curve

The full divergence curve across a 0.1× to 10× price range on a log axis, with the shaded loss region and your current position marked.

LP vs HODL breakdown

Segmented bars showing exactly how much of each token the LP holds versus a simple holder, with the divergence gap called out in dollars.

Severity verdict

Each result is classified from negligible through minor, moderate, significant, severe, extreme and up to catastrophic divergence.

Break-even fee analysis

Given an estimated fee APR, the tool reports how many days of fee income are needed to offset the divergence loss, at four APR levels.

Reference tables

A live IL lookup grid across price ratios and price changes, a loss-magnitude reference, and a table of worked examples from stablecoin pairs to 10× moves.

Reference Tables & Conversions

A live lookup across the full divergence curve, and a table of the loss at every price move you are likely to encounter.

Quick IL lookup — enter a price ratio

r
%
%
USD
USD
= r 2.0000 (price +100.00%) → IL −5.7191% · LP $1,414.21 vs HODL $1,500.00 per $1,000 · gap −$85.79

Impermanent Loss by Price Move

Computed from IL = 2·√r/(1+r) − 1. Because the curve is symmetric, a price move of +X% and −Y% produce the same loss whenever the ratios are reciprocal.

Price changePrice ratio rImpermanent lossLP per $1,000HODL per $1,000Gap

Loss Magnitude Reference

What each loss level means in practice, and roughly how much fee income is needed to overcome it.

LossPrice ratio rangeTypical situationBreak-even at 20% APR
−0.5%0.90× – 1.11×Minor drift in a stable pair≈ 9 days
−1%0.85× – 1.18×Small move in a correlated pair≈ 18 days
−2%0.78× – 1.28×Meaningful move, still recoverable≈ 37 days
−5%0.65× – 1.55×A 50–65% move — needs real fees≈ 91 days
−10%0.50× – 2×A doubling or halving≈ 183 days
−20%0.34× – 3×A 3× move — hard to overcome≈ 365 days
−30%0.23× – 4.4×A 4× move≈ 548 days
−50%0.11× – 9.2×A 9× move — fees rarely save it≈ 913 days
−75%0.02× – 50×A 50× move — catastrophic≈ 1,369 days

Variable Reference

SymbolMeaningDomainTypical range
P₀Pool price of token A at deposit> 0Any consistent unit
P₁Pool price of token A at withdrawal> 0Any consistent unit
rPrice ratio P₁/P₀> 00.01 – 100 in practice
ILImpermanent loss as a fraction of HODL value−100% < IL ≤ 00% – −50% in practice
VLPLP position value divided by deposit value= √r0.1 – 3.2 for r ∈ [0.01, 10]
VHODLHODL value divided by deposit value= (1 + r)/20.5 – 5.5 for r ∈ [0.01, 10]
kConstant-product invariant x·y> 0, invariantSet at deposit, never changes

What Does IL = 2·√r/(1+r) − 1 Measure?

Impermanent loss is the difference between the value of a liquidity provider's position and the value of simply holding the two tokens they deposited. It is not a fee, a tax or a hack — it is a structural consequence of how an automated market maker prices trades. The number is always zero or negative, it depends only on the ratio of the new price to the old price, and it is exactly symmetric: a token that doubles and a token that halves cause the same loss.

The Impermanent Loss Formula

The standard constant-product form:

IL = ( 2·√r / (1 + r) − 1 ) × 100    where r = P₁ / P₀

Written as a ratio of values rather than a loss percentage:

VLP / V0 = √r
VHODL / V0 = (1 + r) / 2
IL = VLP / VHODL − 1

Rearranged to solve for the price ratio given a target loss L (expressed as a fraction, L ∈ (−1, 0]). Setting L = 1 + IL and solving L(1 + r) = 2√r for r gives a quadratic in s = √r:

L·s² − 2·s + L = 0   ⟹   s = ( 1 ± √(1 − L²) ) / L
r = s²   — two solutions, exact reciprocals of each other

The reciprocal pair is the algebraic statement of the symmetry: if r produces a given loss, so does 1/r.

Why the Formula Works

Start with a constant-product pool holding reserves x of token A and y of token B, governed by the invariant x·y = k. The pool price of A in terms of B is P = y/x. Deposit equal value in both tokens, so that x₀·P₀ = y₀ at the deposit price P₀.

When the external market price moves to P₁ = r·P₀, arbitrageurs trade against the pool until its internal price matches. Because x·y = k must hold at all times, the new reserves are forced to satisfy x₁·y₁ = x₀·y₀ and y₁/x₁ = P₁. Solving those two equations gives the rebalanced reserves:

x₁ = x₀ / √r     y₁ = y₀ · √r

The LP's position is worth x₁·P₁ + y₁ at the new price. Substituting and simplifying:

VLP = (x₀/√r)·(r·P₀) + y₀·√r = x₀·P₀·√r + y₀·√r = (x₀·P₀ + y₀)·√r = V₀·√r

A simple holder keeps the original amounts and is worth x₀·P₁ + y₀ = x₀·r·P₀ + y₀ = V₀·(1 + r)/2. Dividing the two gives the IL formula directly. Every step is either the invariant, the price definition, or the deposit condition — nothing else is assumed.

Key Properties of Impermanent Loss

Six facts cover almost every practical question. Always non-positive: by the AM–GM inequality, 2√r ≤ 1 + r for all r > 0, with equality only at r = 1, so the loss is zero only when the price does not move. Perfectly symmetric: IL(r) = IL(1/r), so up and down moves of reciprocal magnitude cost the same. Bounded loss: as r → 0 or r → ∞, IL → −100%, but it is never reached for any finite price change. Worst practical cases: a 2× move gives −5.72%, a 4× move gives −20%, a 10× move gives −42.5%, and a 100× move gives −81%. Concave in r near 1: the loss grows quadratically for small moves, so a 10% price change costs only about −0.2% — small moves are nearly free. Independent of price level: only the ratio matters, so a token going from $1 to $2 and a token going from $30,000 to $60,000 produce the identical percentage loss.

That last property is what makes the calculator usable with any price units. You can enter prices in USD, in ETH, in satoshis, or as arbitrary index values — the loss percentage is the same. Only the deposit value field needs a real currency, and that is purely for converting the percentage into dollars.

Worked Examples

Given: P₀ = $2,000, P₁ = $4,000 — solve for IL
r = 4000 / 2000 = 2.0000
IL = ( 2·√2.0000 / (1 + 2.0000) − 1 ) × 100
   = ( 2.8284271 / 3.0000 − 1 ) × 100
   = ( 0.9428090 − 1 ) × 100 = −5.7191%
Given: P₀ = $2,000, P₁ = $1,000 — solve for IL
r = 0.5000 → IL = −5.7191%  (identical to the doubling case)
Given: r = 4 (a 4× price move) — solve for IL
IL = ( 2·2 / 5 − 1 ) × 100 = ( 0.8 − 1 ) × 100 = −20.00%
Given: r = 1.10 (a 10% price move) — solve for IL
IL = ( 2·1.0488088 / 2.10 − 1 ) × 100 = ( 0.9988655 − 1 ) × 100 = −0.1134%
Given: r = 0.95 (a 5% price drop) — solve for IL
IL = ( 2·0.9746794 / 1.95 − 1 ) × 100 = ( 0.9996712 − 1 ) × 100 = −0.0329%
Given: a target loss of −20% — solve for the price ratios
L = 1 − 0.20 = 0.8000 ; √(1 − L²) = 0.6000
s₁ = 0.8000 / 1.6000 = 0.5000 → r₁ = 0.2500
s₂ = 1.6000 / 0.8000 = 2.0000 → r₂ = 4.0000
So IL = −20% at r = 0.25 (price −75%) or r = 4 (price +300%)
Given: $10,000 deposited, r = 2 — solve for the dollar figures
VLP = 10000 × √2 = $14,142.14
VHODL = 10000 × 1.5 = $15,000.00
Loss = −$857.86 (−5.7191%)
Given: a −5.7191% loss at a 20% fee APR — solve for break-even
T = 365 × 5.7191 / (100 × 0.20) = ≈ 104 days

Frequently Asked Questions

Because the formula contains √r in the numerator and (1 + r) in the denominator, and replacing r with 1/r leaves the value unchanged: 2√(1/r)/(1 + 1/r) = 2/√r ÷ ((r+1)/r) = 2√r/(1+r). The economics behind the algebra is that a constant-product pool is forced to sell whichever asset is appreciating and buy whichever is depreciating, in both directions. When A doubles, arbitrageurs drain A from the pool until the pool holds less A. When A halves, arbitrageurs flood A into the pool until it holds more A. Either way the LP ends up holding relatively more of the underperforming asset, and the magnitude of the penalty depends only on how far the ratio moved, not on which way.

Only when you withdraw at a price different from your deposit price. If the price returns to exactly r = 1 before you exit, the pool composition is restored to what it was, the loss disappears entirely, and you keep all the fees earned in the meantime. That is the origin of the word "impermanent". In practice, though, the loss is usually realised: you withdraw when you want your capital back, and by then the price has generally moved. The practical way to think about it is that the loss is impermanent in principle but permanent in expectation, because you cannot control the price at the moment you exit.

It depends on how long you hold. Fees accrue linearly with time while the divergence loss is fixed the moment the price moves, so the comparison is a race. The break-even holding period is T = 365 × |IL%| / (100 × feeAPR). At a 20% fee APR, a −5.72% loss needs about 104 days; a −20% loss needs about 365 days. At a 100% APR those fall to roughly 21 and 73 days respectively. This is why high-yield farms on volatile pairs can be profitable over short horizons but often underperform over a full year, and why low-yield stablecoin pools with almost no divergence risk are frequently the better risk-adjusted position.

No, the percentage is entirely independent of position size. A $100 deposit and a $10,000,000 deposit in the same pool, held through the same price move, suffer exactly the same percentage loss. Only the dollar figure scales. This is also why the calculator treats the deposit value as a separate input rather than part of the core formula — it is there purely to translate the percentage into an absolute number you can compare against your fee income. The pool's total size and your share of it do not affect the loss either, since every LP holds a proportional claim on the same reserves.

Not directly. The formula on this page is exact for a full-range constant-product position — the classic x·y = k pool on Uniswap v2, SushiSwap, PancakeSwap and their equivalents. Concentrated liquidity (Uniswap v3 and its forks) amplifies both fees and divergence within the chosen range, because the position behaves like a much larger full-range position while the price is inside the band and converts entirely to one asset once it leaves. The divergence loss for a concentrated position is a multiple of the full-range figure, roughly 1/(1 − √(P_lower/P_upper)) before fees, and it becomes total once the price exits the range. Treat the number here as a lower bound for a concentrated position.

Because of the arithmetic mean–geometric mean inequality, which states that for any two positive numbers a and b, √(ab) ≤ (a + b)/2 with equality only when a = b. Setting a = 1 and b = r gives √r ≤ (1 + r)/2, so VLP ≤ VHODL for every positive r, with equality exactly at r = 1. There is no price move, in either direction, that lets a passive constant-product LP outperform a simple holder on the token side alone. The only way an LP comes out ahead is through fee income, which is not part of the IL formula at all — it is the compensation for accepting the structural disadvantage the inequality describes.

In the limit, −100%. As r → 0 or r → ∞, the term 2√r/(1+r) → 0, so IL → −100%. But no finite price change ever reaches it: a 100× move gives −81.9%, a 1,000× move gives −93.7%, and a 10,000× move gives −98.0%. The approach is slow because the loss scales roughly as 2/√r for large r. In practice, losses beyond about −50% (a 9.2× move) are rare in any pool that still has meaningful liquidity, because such an extreme move usually means one of the two assets has effectively failed as a paired asset.

Compare the fee income you expect over your intended holding period against the divergence loss the pair is likely to suffer. If the assets are tightly correlated — two stablecoins, two liquid staking derivatives, two wrapped versions of the same asset — divergence will be small and modest fees easily cover it. If the assets are volatile and uncorrelated, expect a loss in the −10% to −30% range over a typical holding period, and require a correspondingly high fee APR to justify it. Two other factors matter: the depth of the pool, since thin pools suffer more slippage-driven divergence, and the direction of the pair, since a pool pairing a volatile asset against a stablecoin will always end up concentrated in whichever asset performed worse. There is no single answer, but the calculator gives you the loss side of the equation precisely.

Calculating...

Variables

Symbol Quantity Unit
IL Impermanent loss %
price_ratio Ratio of new price to original price of one token relative to the other

What it means

Impermanent loss occurs when the relative price of assets in a liquidity pool changes compared to when they were deposited. The formula shows that the loss is a function of the price ratio change. If the ratio returns to the original, the loss disappears (hence "impermanent"). This is a key risk for liquidity providers in automated market makers (AMMs). Understanding this helps LPs assess whether fee income compensates for potential losses. It is essential for making informed decisions about providing liquidity. The formula is derived from the constant product market maker model (x*y=k).

Worked example

Impermanent Loss – Two Detailed Examples

Real‑World
Scenario: A liquidity provider adds funds to a constant product pool (e.g., ETH/USDC). If the price ratio changes from 1:1 to 1.25:1, they will experience an impermanent loss. Using the formula IL(%) = (2×√(price_ratio) / (1+price_ratio) - 1) × 100, for a price ratio of 1.25, IL = (2×√1.25/(1+1.25) - 1) × 100 = (2×1.118/2.25 - 1) × 100 = (0.994 - 1) × 100 = -0.6%. This loss is "impermanent" because it disappears if prices return to their original ratio, but it can become permanent if the LP withdraws.
ParameterValue
Price Ratio (new/old)1.25
1IL = (2×√1.25/(1+1.25) - 1) × 100
2√1.25 = 1.118, 2×1.118 = 2.236, denominator = 2.25, fraction = 0.9938, minus 1 = -0.0062, ×100 = -0.62%
Result -0.62% ✓ Impermanent loss
Scenario: In another pool, the price ratio jumps to 2.0. The IL becomes (2×√2/(1+2) - 1) × 100 = (2×1.414/3 - 1) × 100 = (0.943 - 1) × 100 = -5.72%. This means the LP would have been better off just holding the assets rather than providing liquidity, assuming no trading fees. This helps the LP decide whether the earned fees compensate for the impermanent loss risk.
ParameterValue
Price Ratio2.0
1IL = (2×√2/(1+2) - 1) × 100 = (2.828/3 - 1) × 100 = (0.9428 - 1) × 100 = -5.72%
Result -5.72% ✓ Larger divergence
Insight: Impermanent loss occurs when the price ratio of the two assets in a pool changes. The loss is realised only when the LP withdraws; if prices return, the loss disappears. Traders must weigh this against trading fee earnings.

Common mistakes

  • Price ratio: The ratio of the two token prices after the price change – must be >0.
  • IL formula: Assumes a constant product AMM (Uniswap v2 style).
  • Sign: IL is always negative (a loss relative to simply holding).
  • Fees offset: This formula ignores trading fees earned; net IL may be reduced.

Applications

Impermanent loss (IL) in a liquidity pool measures the temporary loss experienced by liquidity providers when the price ratio between pooled assets changes. The formula calculates IL as a percentage based on the price change. Liquidity providers use this to assess the risk of providing liquidity on decentralised exchanges (DEXs) and to compare it with simply holding the assets. IL is a critical concept in automated market maker (AMM) protocols like Uniswap and PancakeSwap. By quantifying the potential loss, providers can decide whether the trading fees and potential rewards compensate for the IL risk. Understanding IL helps in optimising pool selection and in managing liquidity provision strategies.

  • Risk assessment for liquidity providers in AMM pools
  • Comparing IL vs. earned fees to evaluate profitability
  • Optimising pool selection based on volatility and price trends
  • Hedging strategies to mitigate IL exposure
  • Education for DeFi liquidity providers

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,892

Views
  • Published July 14, 2026
  • Last updated October 8, 2026