Impermanent Loss Calculator

Smart-Calcs
Crypto & Web3

Impermanent Loss Calculator

Calculate impermanent loss for DeFi liquidity pools. Compare HODL value versus LP pool value and see how price divergence affects your AMM position.

Asset A
Initial Price of Asset A
$
Future Price of Asset A
$
0.01 $1,000,000 $
Price change: +20.00%
Asset B
Initial Price of Asset B
$
Future Price of Asset B
$
0.01 $1,000,000 $
Price change: -20.00%
Total Initial Investment
$
100 $1,000,000 $
Impermanent Loss
-202.04

2.02% loss vs simply holding

HODL Value

$10,000.00

LP Pool Value

$9,797.96

Price Ratio Divergence

Ratio (r)1.5000
0.1x1x (no IL)10x

Token Holdings Comparison

HODL
LP Pool
Asset A
1.6667
1.3608
Asset B
2.5000
3.0619

The LP pool automatically holds more of the depreciated token and less of the appreciated token — this rebalancing is the source of impermanent loss.

Impermanent Loss Divergence Table — Asset A Price Scenarios

Price ScenarioHODL ValueLP Pool ValueIL ($)IL (%)
Asset A -90%$5,500.00$3,162.28-2,337.72-42.50%
Asset A -75%$6,250.00$5,000.00-1,250.00-20.00%
Asset A -50%$7,500.00$7,071.07-428.93-5.72%
Asset A -25%$8,750.00$8,660.25-89.75-1.03%
No change$10,000.00$10,000.00$0.000.00%
Asset A +25%$11,250.00$11,180.34-69.66-0.62%
Asset A +50%$12,500.00$12,247.45-252.55-2.02%
Asset A +100%$15,000.00$14,142.14-857.86-5.72%
Asset A +200%$20,000.00$17,320.51-2,679.49-13.40%
Asset A +300%$25,000.00$20,000.00-5,000.00-20.00%
Asset A +500%$35,000.00$24,494.90-10,505.10-30.01%

Advertisement

1. What Is Impermanent Loss in DeFi Liquidity Pools?

Impermanent loss (IL) is the hidden cost of providing liquidity to an automated market maker (AMM) like Uniswap, SushiSwap, or PancakeSwap. When you deposit two tokens into a liquidity pool, the AMM enforces a constant-product formula (x * y = k) that automatically rebalances the pool as prices move. If the two tokens' prices diverge from the ratio at which you deposited, the pool will have sold the appreciating asset and accumulated more of the depreciating one. The result: your pool position is worth less than if you had simply held both tokens in your wallet. This value gap is the impermanent loss. It is called "impermanent" because if prices revert to the original ratio before you withdraw, the loss disappears — but if you withdraw while prices are still diverged, the loss becomes permanent.

2. The Constant-Product Formula and IL Mathematics

The standard 50/50 AMM pool maintains the invariant x * y = k, where x and y are the reserves of token A and token B. When the market price of the two tokens changes, arbitrageurs trade against the pool until the pool's internal price matches the external market price. This rebalancing changes the quantities of each token in the pool. The impermanent loss as a function of the price ratio r is:

Price ratio:  k = (priceA1 / priceA0) / (priceB1 / priceB0)

Initial amounts:  assetA = (V0 / 2) / priceA0
                  assetB = (V0 / 2) / priceB0

HODL value:   V_hodl = (assetA * priceA1) + (assetB * priceB1)
LP pool value: V_lp = V_hodl * (1 + IL_decimal)

Impermanent Loss:
  IL_decimal = (2 * sqrt(k) / (1 + k)) - 1   (always <= 0)
  IL_usd = V_hodl - V_lp   (positive = loss)
  IL_pct = (IL_usd / V_hodl) * 100

  V0 = total initial investment

The key insight is that IL depends only on the price ratio r, not on the absolute prices. When r = 1 (no relative price change), IL is zero. A 2x price divergence (k = 2 or k = 0.5) produces approximately 5.72% IL. A 5x divergence produces about 25.46% IL. A 10x divergence produces about 46.06% IL. This non-linear relationship means IL grows slowly for small price movements but accelerates dramatically during extreme volatility.

3. Worked Example: ETH/WBTC Liquidity Position

Suppose you deposit $10,000 into an ETH/WBTC pool when ETH is $3,000 and WBTC is $2,000. Your deposit buys 1.667 ETH ($5,000 worth) and 2.5 WBTC ($5,000 worth). If ETH rises to $3,600 (+20%) while WBTC drops to $1,600 (-20%), the price ratio r = (3600/3000) / (1600/2000) = 1.2 / 0.8 = 1.5. The HODL value would be $10,000 * (1.2 + 0.8) / 2 = $10,000. The LP pool value is $10,000 * 2 * sqrt(1.5) / (1 + 1.5) = $10,000 * 2.449 / 2.5 = $9,798. Your impermanent loss is $10,000 - $9,798 = $202, or about 2.02%. This $202 would need to be recovered by trading fees for the LP position to outperform simply holding.

4. Impermanent Loss FAQ — Common Liquidity Provider Questions

Impermanent loss is the difference between the value of two tokens if you had simply held them in your wallet versus the value of those same tokens after providing them as liquidity to an automated market maker (AMM) pool. When the relative price of the two tokens changes from the ratio at which you deposited, the AMM constant-product formula (x * y = k) automatically sells the appreciating asset and buys the depreciating one. This rebalancing means the pool ends up with more of the cheaper token and less of the expensive one than you would have had by simply holding. The loss is called "impermanent" because it can be recovered if the prices return to their original ratio, but it becomes permanent if you withdraw when prices have diverged.
For a 50/50 constant-product AMM (Uniswap V2 style), first compute the price ratio k = (futurePriceA / initialPriceA) / (futurePriceB / initialPriceB). The impermanent loss as a decimal is: IL = (2 * sqrt(k) / (1 + k)) - 1. This value is always zero or negative (e.g., -0.0572 for a 5.72% loss). The HODL value is: V_hodl = (initialAssetA * futurePriceA) + (initialAssetB * futurePriceB), where initialAssetA = (totalInvestment / 2) / initialPriceA and initialAssetB = (totalInvestment / 2) / initialPriceB. The LP pool value is: V_lp = V_hodl * (1 + IL). The impermanent loss in USD is: IL_usd = V_hodl - V_lp. IL is always zero when k = 1 (prices unchanged) and grows as the ratio diverges in either direction. A 2x divergence (k = 2 or 0.5) produces about 5.72% IL.
Yes, but only when trading fees and any additional liquidity provider rewards (such as LP token incentives or yield farming emissions) exceed the impermanent loss. Every swap in the pool charges a fee (typically 0.3% on Uniswap V2, or tiered on V3), and those fees accrue to liquidity providers. If the cumulative fee revenue plus rewards are greater than the impermanent loss at the time of withdrawal, the LP position outperforms a simple hold strategy. In highly volatile pairs with low trading volume, impermanent loss often exceeds fee revenue, making simple holding the better strategy. In high-volume, low-volatility pairs (like stablecoin-to-stablecoin pools), fees can easily outweigh the minimal impermanent loss.
Stablecoin-to-stablecoin pools (e.g., USDC/USDT) have near-zero impermanent loss because the price ratio between the two assets rarely moves far from 1:1. Similarly, token pairs whose prices are highly correlated — like wstETH/ETH or wrapped versions of the same asset — experience minimal IL. The highest impermanent loss occurs in volatile, uncorrelated pairs like ETH/BTC or meme-token/ETH pairs, where the price ratio can swing dramatically. Concentrated liquidity (Uniswap V3) amplifies impermanent loss because capital is deployed within a narrow price range, so any movement outside that range causes the position to become 100% in one token, maximizing the divergence from a hold strategy.
Calculations based on official Google AdSense Terms and Revenue Documentation.Google AdSense Help
Impermanent Loss-202.04