Impermanent Loss Calculator: DeFi Liquidity Pool Risk Analysis
Calculate impermanent loss for DeFi liquidity pools. Enter token prices to see potential losses from providing liquidity on Uniswap, SushiSwap, and other AMMs.
| Price Change | IL % |
|---|---|
| 1.25x (+25%) | -0.62% |
| 1.50x (+50%) | -2.02% |
| 2.00x (+100%) | -5.72% |
| 3.00x (+200%) | -13.40% |
| 5.00x (+400%) | -25.46% |
| 0.50x (-50%) | -5.72% |
| 0.25x (-75%) | -20.00% |
All calculations are performed locally in your browser. This assumes a standard 50/50 constant-product AMM pool. Token B is assumed to be a stablecoin (price = $1). Trading fee income is not included.
What Is Impermanent Loss?
Impermanent loss (IL) is the difference in value between holding tokens in a liquidity pool versus simply holding them in your wallet. It occurs whenever the price ratio of pooled tokens changes from the ratio at the time you deposited. The greater the price divergence, the larger the loss. The term "impermanent" reflects the fact that the loss only becomes realized (permanent) when you withdraw your liquidity. If prices return to their original ratio before withdrawal, the loss disappears entirely.
Impermanent loss is the single most important risk factor for DeFi liquidity providers. Understanding it is essential before depositing tokens into any automated market maker (AMM) pool. Many liquidity providers have been surprised to find that their pool position is worth less than if they had simply held the tokens, despite earning trading fees the entire time.
How AMM Liquidity Pools Work
Automated market makers like Uniswap, SushiSwap, and PancakeSwap use a constant product formula to facilitate trades without an order book. The formula is:
x * y = k
Here, x is the quantity of Token A in the pool, y is the quantity of Token B, and k is a constant. When someone buys Token A, they add Token B to the pool and remove Token A, changing the quantities but maintaining the constant product. This mechanism automatically adjusts the price ratio based on supply and demand within the pool.
When you provide liquidity, you deposit equal dollar values of two tokens. In return, you receive LP (liquidity provider) tokens representing your share of the pool. As trades occur, the pool rebalances continuously. If Token A's market price increases, arbitrageurs buy Token A from the pool (adding Token B) until the pool's price matches the external market. This rebalancing is what causes impermanent loss: your position gradually shifts toward holding more of the cheaper token and less of the appreciating one.
The Impermanent Loss Formula
Impermanent loss can be calculated precisely using the price ratio between the two tokens at deposit versus at withdrawal. The formula is:
IL = 2 * sqrt(r) / (1 + r) - 1
Where r is the price ratio, defined as the current price of Token A divided by the initial price of Token A (assuming Token B is a stablecoin with constant price). This formula assumes a standard constant-product AMM (like Uniswap v2) with 50/50 pool weighting.
The formula shows that impermanent loss depends only on the magnitude of the price change, not on the direction. A token that doubles in price (2x) produces the same IL as a token that halves (0.5x): both yield approximately 5.7% loss. This symmetry is a direct consequence of the constant product formula.
Impermanent Loss at Various Price Changes
The table below shows the impermanent loss percentage for a range of price changes. These figures assume a standard 50/50 constant-product pool with no trading fee income:
| Price Change | Price Ratio (r) | Impermanent Loss |
|---|---|---|
| +25% (1.25x) | 1.25 | -0.6% |
| +50% (1.5x) | 1.50 | -2.0% |
| +100% (2x) | 2.00 | -5.7% |
| +200% (3x) | 3.00 | -13.4% |
| +400% (5x) | 5.00 | -25.5% |
| -50% (0.5x) | 0.50 | -5.7% |
| -75% (0.25x) | 0.25 | -20.0% |
As the table illustrates, moderate price changes produce relatively small IL. A 25% price increase costs only 0.6%, which trading fees can easily offset. But extreme moves are devastating: a 5x price increase means your pool position is worth 25.5% less than if you had just held. This is why IL is most dangerous in volatile token pairs.
When Impermanent Loss Becomes Permanent
Impermanent loss becomes permanent under two conditions. First, when you withdraw your liquidity at a different price ratio than when you deposited. At that point, the loss is locked in: you receive fewer of the appreciated token and more of the depreciated token compared to your original deposit. Second, if the token price never returns to the original ratio, the unrealized IL remains indefinitely. In practice, many volatile token pairs never revert to their original price ratio, making the "impermanent" label misleading.
This is why IL is sometimes called "divergence loss": a name that more accurately describes the mechanics. It is a direct function of how far the price has diverged from the deposit-time ratio, regardless of the path the price took to get there.
Fee Income vs Impermanent Loss
Liquidity providers earn a percentage of every trade that passes through their pool. On Uniswap v2, LPs earn 0.3% of each swap's value. On Uniswap v3, concentrated liquidity positions can earn higher effective fees by providing liquidity in a narrower price range. The key question for profitability is whether cumulative fee income exceeds impermanent loss over the duration of your position.
High-volume, low-volatility pairs (like USDC/USDT stablecoin pools) tend to generate healthy fee income with minimal IL, since the price ratio stays close to 1:1. Volatile pairs (like ETH/small-cap tokens) can generate high fee income during periods of intense trading, but they also carry much higher IL risk. The net result depends on the specific pool, time period, and price trajectory.
A useful rule of thumb: if you expect a token to move significantly in one direction (either up or down), providing liquidity is likely to underperform simply holding. Liquidity provision works best when you expect the price to oscillate within a range, generating fees without large directional moves.
Mitigating Impermanent Loss
Several strategies can reduce exposure to impermanent loss:
- Choose stablecoin pairs: pools with two correlated or stable assets (USDC/DAI, WBTC/renBTC) experience minimal IL because the price ratio stays near 1:1.
- Use concentrated liquidity wisely: on Uniswap v3, narrower ranges earn more fees but amplify IL. Set ranges that match your price expectations to balance risk and reward.
- Target high-volume pools: pools with substantial trading volume generate more fees to offset IL. Check the pool's APR from fees before depositing.
- Monitor and rebalance: regularly assess whether your fee income is exceeding your IL. If the token price has moved significantly, it may be worth withdrawing and re-entering at the new ratio.
- Consider IL protection protocols: some DeFi protocols offer impermanent loss insurance or compensation mechanisms, though these come with their own costs and risks.
Frequently Asked Questions
What is impermanent loss in simple terms?
Impermanent loss is the cost of providing liquidity to a DeFi pool instead of simply holding your tokens. When the price of your deposited tokens changes, the pool automatically rebalances your position, leaving you with more of the cheaper token and less of the expensive one. The result is that your pool position is worth less than if you had just held both tokens in your wallet without providing liquidity.
Can impermanent loss be greater than 100%?
No. Impermanent loss approaches 100% as the price ratio approaches infinity or zero, but it never actually reaches 100%. In practice, if one token in the pair goes to near zero, you would be left holding almost entirely the worthless token, but your position would still have some residual value. The maximum theoretical IL in a 50/50 pool is 100%, approached only in the extreme case where one token becomes infinitely more valuable than the other.
Does impermanent loss apply to stablecoin pools?
Technically yes, but the effect is negligible. In a USDC/USDT pool, for example, both tokens are pegged to $1. The price ratio stays extremely close to 1:1, so impermanent loss is effectively zero. This is why stablecoin pools are popular among conservative liquidity providers: they earn trading fees with virtually no IL risk. The only scenario where significant IL would occur is if one stablecoin lost its peg.
How do trading fees offset impermanent loss?
Every time a trade executes in the pool, liquidity providers earn a share of the swap fee (commonly 0.3% on Uniswap v2). Over time, these fees accumulate and add to your pool position value. If the total fees earned exceed the impermanent loss incurred, you end up profitable overall. This is why high-volume pools can still be attractive despite moderate IL: the fee income more than compensates for the rebalancing cost.
Is impermanent loss the same whether the price goes up or down?
Yes. The IL formula depends on the price ratio, not the direction of change. A 2x price increase and a 0.5x price decrease both produce the same impermanent loss of approximately 5.7%. This symmetry arises from the constant product formula: any deviation from the original price ratio, in either direction, produces IL. What matters is the magnitude of divergence, not whether the token appreciated or depreciated.
What is the difference between Uniswap v2 and v3 for impermanent loss?
Uniswap v2 uses full-range liquidity: your tokens are spread across all possible prices, from zero to infinity. Uniswap v3 introduced concentrated liquidity, allowing you to provide liquidity within a specific price range. Concentrated positions earn more fees per dollar of capital but experience amplified impermanent loss if the price moves outside your range. In v3, a tighter range means higher capital efficiency but higher IL sensitivity.
Should I provide liquidity if I expect the token price to rise?
Generally, no. If you are confident a token will appreciate significantly, simply holding it will outperform providing liquidity. The pool automatically sells your appreciating token as the price rises, giving you less upside than a pure hold strategy. Liquidity provision is most profitable when you expect range-bound, choppy price action with high trading volume: conditions that generate fees without large directional IL.
How do I calculate impermanent loss for my actual position?
Use the calculator above. Enter the initial price of Token A at the time you deposited, the current price of Token A, and your initial investment amount. The calculator assumes Token B is a stablecoin (price = $1). It computes the IL percentage, the dollar amount lost to IL, and compares your pool value against what you would have if you had simply held. For non-stablecoin Token B pairs, you can still use the calculator by entering the price of Token A denominated in Token B.
This calculator is for informational purposes only and does not constitute financial advice. Impermanent loss calculations are theoretical estimates based on the constant product formula. Actual results depend on pool type, fee tier, trading volume, and market conditions. Always do your own research before providing liquidity to any DeFi protocol.
Build with Spark
Integrate bitcoin, Lightning, and stablecoins into your app with a few lines of code.
Read the docs →
