Impermanent Loss Calculator
Calculate the impermanent loss (IL) when providing liquidity to a DeFi AMM pool after a price change.
How to use this tool
- Determine the price ratio: divide the token's current price by its price when you deposited.
- Enter the price ratio (e.g. 2 if the token doubled, 0.5 if it halved).
- Read your impermanent loss percentage and how your LP position value compares to simply holding.
Impermanent loss is the difference between holding tokens and providing them as liquidity in an AMM pool. It only becomes permanent when you withdraw. Not financial advice.
Formula
Given price ratio r = new price ÷ old price:
IL factor = 2 × √r ÷ (1 + r) − 1
Impermanent loss (%) = IL factor × 100
Pool value vs holding (%) = (1 + IL factor) × 100
How it works
Impermanent loss arises in constant-product AMM pools (like Uniswap v2) because the pool automatically rebalances token weights as prices change, causing liquidity providers to hold proportionally less of the appreciating asset than a simple buy-and-hold strategy would. The formula 2√r/(1+r) − 1 is derived directly from the x×y=k invariant.
A price ratio of 1 (no change) produces zero IL, while larger price swings in either direction increase the loss. The result is called "impermanent" because the loss is only realised if you withdraw liquidity at the new price; if prices revert, IL disappears.
Worked example
Worked example: price ratio = 1 (no price change)
- Price ratio r = 1 (the asset price is unchanged).
- IL factor = 2 × √1 ÷ (1 + 1) − 1 = 2 × 1 ÷ 2 − 1 = 0.
- Impermanent loss = 0 × 100 = 0%.
- Pool value vs holding = (1 + 0) × 100 = 100%.
Impermanent loss: 0%; pool value equals holding value at 100%.
Key terms
- Impermanent loss (IL)
- The difference in value between holding tokens outright and providing them as liquidity in an AMM pool when the price ratio changes.
- AMM (Automated Market Maker)
- A decentralised exchange mechanism that uses mathematical formulas rather than order books to price and trade assets.
- Constant-product formula (x·y=k)
- The rule used by Uniswap-style pools ensuring the product of both token reserves stays constant, which drives automatic rebalancing.
- Price ratio (r)
- The ratio of the new token price to the original token price at the time liquidity was deposited.
- Liquidity provider (LP)
- A user who deposits token pairs into an AMM pool and earns trading fees in exchange for accepting impermanent loss risk.
Frequently asked questions
- What causes impermanent loss?
- AMM pools (like Uniswap) rebalance automatically via arbitrage. When a token's price changes, the pool sells the appreciating token and buys the depreciating one, leaving you with fewer of the winner compared to just holding.
- Is impermanent loss permanent?
- Only when you withdraw. If the price returns to your deposit price, IL disappears. Trading fees earned while providing liquidity can offset IL, depending on pool volume.
- Why is the formula symmetric for 2x and 0.5x?
- IL depends only on the magnitude of the price ratio change. A 4x increase and a 0.25x decrease (both a factor of 4) produce the same 20% impermanent loss.