Impermanent Loss Calculator — DeFi Liquidity Pool Risk
Calculate impermanent loss for any AMM liquidity pool. Enter the initial and current prices of both tokens plus your deposit size to instantly see your IL percentage, HODL value vs LP value, and the exact dollar loss.
How to Use the Impermanent Loss Calculator
Enter the initial prices of Token A and Token B at the time you deposited into the liquidity pool, along with their current prices. Then enter your initial deposit in USD. The calculator assumes a 50/50 deposit split, which is the standard for Uniswap V2-style constant-product AMMs.
The tool computes the price ratio — how much Token A has moved relative to Token B — and applies the standard impermanent loss formula to give you the IL percentage. It then shows your estimated HODL value (what your tokens would be worth if you had simply held them) versus your LP value (what you actually have in the pool), along with the dollar difference.
Note: this calculator does not include trading fees earned by the pool. In practice, fee income can offset or even exceed impermanent loss for high-volume pools. Always factor in the pool APY from fees before deciding whether to provide liquidity.
The Formula
Impermanent loss in a constant-product AMM (x · y = k) is determined entirely by the relative price change between the two tokens:
- Price Ratio (k) = (currentPriceA / initialPriceA) ÷ (currentPriceB / initialPriceB)
- IL% = (2 × √k / (1 + k) − 1) × 100
- HODL Value = (deposit / 2) / initialPriceA × currentPriceA + (deposit / 2) / initialPriceB × currentPriceB
- LP Value = HODL Value × (1 + IL% / 100)
- Dollar Loss = LP Value − HODL Value
The formula shows that IL is symmetric: a 2× price increase produces the same IL as a 2× price decrease. A price ratio of 1.0 (no relative change) produces zero impermanent loss. At a 4× price ratio, IL is approximately 20%; at 9× it reaches ~25%.
Practical Examples
Example 1 — ETH/USDC Pool (ETH doubles)
- Initial ETH price: $1,000 | Initial USDC price: $1
- Current ETH price: $2,000 | Current USDC price: $1
- Deposit: $10,000 (50/50 split)
- Price ratio: 2.0×
- IL: ~5.72%
- HODL value: ~$15,000 | LP value: ~$14,142
- Dollar loss vs HODL: ~$858
In this scenario, simply holding ETH and USDC would have returned $15,000, while providing liquidity returns only ~$14,142 before fees. The pool auto-rebalances, selling ETH as it rises, which is why LP underperforms a pure hold in a bull market.
Example 2 — BTC/ETH Pool (BTC outperforms ETH 4×)
- Initial BTC: $30,000 | Initial ETH: $2,000
- Current BTC: $60,000 | Current ETH: $2,500
- Price ratio: (2× BTC gain) / (1.25× ETH gain) = 1.6×
- IL: ~3.08%
When both tokens appreciate but at different rates, the IL is lower than when one token is stablecoins. Providing liquidity in two correlated assets (like BTC/ETH) generally results in lower impermanent loss than token/stablecoin pairs.
When Is Providing Liquidity Still Profitable?
Impermanent loss only matters if it exceeds the trading fees earned. A Uniswap V2 pool with 0.3% fees and $10M daily volume on $1M TVL generates ~110% APY in fees alone. Even a 10% IL is easily offset. Evaluate the net APY = fee APY − IL rate before providing liquidity.
Frequently Asked Questions
Embed This Calculator on Your Website
Related Guides
Related Calculators
Yield Farming Calculator
Calculate your DeFi yield farming returns, including APY, daily earnings, and projected gains over any time period.
Liquidation Price Calculator
Calculate the liquidation price for leveraged crypto positions. Know your risk before you open a perpetual futures position.
Ethereum Gas Fee Calculator
Calculate Ethereum gas fees in USD instantly. Enter base fee, priority fee, and transaction type to see the exact cost of any ETH, ERC-20, or DeFi transaction.
Wei to ETH Converter
Convert between Wei, Gwei, and ETH instantly. The essential Ethereum unit converter for DeFi users, developers, and gas fee calculations.