Skip to content
Crypto

Impermanent Loss Calculator

Calculate impermanent loss when providing liquidity to AMM pools like Uniswap and Balancer. Compare LP returns vs HODL strategy with real-time analysis.

$
Quick investment amounts:
%
Common price changes:
%
%
days
Duration presets:

Impermanent Loss

5.7%

Divergence Cost vs HODL

-$85.79

Trading Fees Earned

$52.31

Total LP Position (with Fees)

$1,466.52

HODL Strategy Value

$1,500.00

Net Advantage vs HODL

-$33.48

Total Portfolio ROI

+46.7%

Final LP position composition

  • Token A in Pool$707.1148.2%
  • Token B in Pool$707.1148.2%
  • Trading Fees Earned$52.313.6%

Constant Product Benchmark Table

Theoretical impermanent loss for 50/50 AMMs (e.g., Uniswap v2, Sushiswap).

Price RatioPrice MultiplierImpermanent Loss
+25%1.25x-0.62%
+50%1.50x-2.02%
+75%1.75x-3.79%
+100% (2x)2.00x-5.72%
+200% (3x)3.00x-13.40%
+300% (4x)4.00x-20.00%
+400% (5x)5.00x-25.46%

How we calculated this

Open to see each step from your inputs to the result.

  1. Initial 50/50 Pool Allocation

    V0=VA+VB=10002+10002=1000V_0 = V_A + V_B = \frac{1000}{2} + \frac{1000}{2} = 1000

    Your $1,000 deposit is split evenly into $500 of Token A and $500 of Token B upon entering the liquidity pool.

  2. Relative Price Divergence Ratio

    k=PA1/PB1PA0/PB0=2.0000k = \frac{P_{A1} / P_{B1}}{P_{A0} / P_{B0}} = 2.0000

    Token A changed by 2.00x and Token B changed by 1.00x, yielding a relative price ratio k of 2.0000.

  3. Constant Product Impermanent Loss Formula

    IL=12k1+k=122.00001+2.0000=5.7IL = 1 - \frac{2\sqrt{k}}{1 + k} = 1 - \frac{2\sqrt{2.0000}}{1 + 2.0000} = 5.7%

    Using the Uniswap constant product (x * y = k) equation, impermanent loss measures the percentage difference between holding and pool liquidity.

  4. Comparing LP Position vs HODL Strategy

    VLP=V0rArB=$1,414.21V_{\text{LP}} = V_0 \sqrt{r_A r_B} = \$1,414.21

    Holding outside the pool would be worth $1,500.00, while pool assets without fees equal $1,414.21 (a divergence cost of $85.79). Adding $52.31 in trading fees yields a final LP position of $1,466.52.

Report tool

Understanding Impermanent Loss in Automated Market Makers (AMMs)

Impermanent loss is one of the most critical risk factors in decentralized finance (DeFi). It represents the difference in total dollar value between depositing tokens into an Automated Market Maker (AMM) liquidity pool versus simply holding (HODLing) those same tokens in a personal wallet. Whenever the market price ratio between two pooled assets diverges from their initial ratio at deposit, liquidity providers experience impermanent loss.

While traders use tools like the crypto profit calculator to estimate directional gains on spot holdings, liquidity providers on decentralized exchanges like Uniswap, Balancer, and SushiSwap act as passive counterparties. As token prices drift on external centralized exchanges, automated arbitrageurs trade against the liquidity pool to rebalance it, leaving liquidity providers with more of the depreciating asset and less of the appreciating asset.

How Constant Product Market Makers Work

Most classic 50/50 liquidity pools run on the constant product formula established by Uniswap v2:

xy=kx \cdot y = k

Here, xx and yy represent the reserve balances of the two deposited tokens, and kk is a fixed invariant that must remain constant throughout individual trades (excluding trading fees). Because the pool enforces an exact 50/50 value balance between Token A and Token B, changes in the relative price force the pool to change its internal asset composition.

When external traders take advantage of price discrepancies across decentralized and centralized platforms (a strategy modeled in our crypto arbitrage calculator), they drain the surging token from the pool while depositing more of the lagging token. This automatic rebalancing mechanic is the mathematical engine that generates impermanent loss.

The Mathematical Formula for Impermanent Loss

The percentage impermanent loss depends exclusively on the relative price ratio change between the two tokens, designated as k=P1P0k = \frac{P_{1}}{P_{0}}, where P0P_0 is the initial price ratio and P1P_1 is the future price ratio:

Impermanent Loss=2k1+k1\text{Impermanent Loss} = \frac{2 \sqrt{k}}{1 + k} - 1

Because the geometric mean of two numbers is mathematically always less than or equal to their arithmetic mean (the classic AM-GM inequality), the term 2k1+k\frac{2 \sqrt{k}}{1 + k} is always less than or equal to 1. Consequently, impermanent loss is always non-positive:

  • If k=1k = 1 (the relative prices are unchanged), impermanent loss is exactly 0%.
  • If Token A doubles relative to Token B (k=2k = 2), impermanent loss is 5.72%.
  • If Token A triples relative to Token B (k=3k = 3), impermanent loss is 13.40%.
  • If Token A quadruples relative to Token B (k=4k = 4), impermanent loss is 20.00%.
  • If Token A falls by 50% relative to Token B (k=0.5k = 0.5), impermanent loss is also exactly 5.72%, demonstrating symmetry around reciprocal price swings.

Worked Example: ETH / USDC Liquidity Pool

Consider a real-world scenario where a liquidity provider enters a 50/50 ETH/USDC pool:

  1. Initial Deposit: You deposit $2,000 total. At an initial ETH price of $2,000, you deposit 0.5 ETH ($1,000) and 1,000 USDC ($1,000). The pool invariant is k=0.5×1,000=500k = 0.5 \times 1{,}000 = 500.
  2. Market Rally: ETH doubles on external exchanges to $4,000 per token, while USDC remains pegged at $1.00.
  3. Arbitrage Rebalancing: Arbitrageurs buy ETH from the pool at the old price until the pool price matches $4,000. The new pool reserves become:
    ETH Reserves=5004,0000.3536ETH\text{ETH Reserves} = \sqrt{\frac{500}{4{,}000}} \approx 0.3536 \, \text{ETH}
    USDC Reserves=500×4,0001,414.21USDC\text{USDC Reserves} = \sqrt{500 \times 4{,}000} \approx 1{,}414.21 \, \text{USDC}
  4. HODL Strategy Comparison: If you had simply held your original 0.5 ETH and 1,000 USDC in a private wallet, your holdings would be worth:
    VHODL=(0.5×$4,000)+1,000=$2,000+$1,000=$3,000.00V_{\text{HODL}} = (0.5 \times \$4{,}000) + 1{,}000 = \$2{,}000 + \$1{,}000 = \$3{,}000.00
  5. LP Value (Before Fees): Your assets in the pool are worth:
    VLP=(0.3536×$4,000)+1,414.21=$1,414.21+$1,414.21=$2,828.43V_{\text{LP}} = (0.3536 \times \$4{,}000) + 1{,}414.21 = \$1{,}414.21 + \$1{,}414.21 = \$2{,}828.43
  6. Divergence Cost: Your impermanent loss in dollar terms is $2,828.43$3,000.00=$171.57\$2{,}828.43 - \$3{,}000.00 = -\$171.57. As a percentage of the HODL value, this is $171.57$3,000.00=5.72%\frac{-\$171.57}{\$3{,}000.00} = -5.72\%.

Although your total dollar portfolio grew from $2,000 to $2,828.43 (a 41.42% net gain), you made $171.57 less than if you had simply held the underlying tokens without providing liquidity.

When Does Providing Liquidity Beat HODLing?

Impermanent loss is only half of the equation. In exchange for supplying liquidity, AMMs distribute swap fees (typically 0.05% to 1.00% per trade) directly to liquidity providers. If accumulated swap fees exceed the impermanent loss over your holding period, supplying liquidity is more profitable than holding.

In our example above, if the pool generated an annualized fee APR of 25% and you provided liquidity for 180 days, you would earn approximately $348 in accumulated trading fees. Adding those fees to the pool value yields $2,828.43+$348.00=$3,176.43\$2{,}828.43 + \$348.00 = \$3{,}176.43, outperforming the HODL strategy by $176.43.

Investors who utilize debt or margin in their strategies, such as those evaluated on our crypto leverage calculator, must be especially cautious when pairing borrowed assets with liquidity pools, as sudden divergence can trigger both liquidation and unexpected divergence drag.

Strategies to Minimize Impermanent Loss

  • Pair Correlated Assets: Providing liquidity to pegged pairs like USDC/USDT, DAI/USDC, or stETH/ETH virtually eliminates impermanent loss because their price ratio remains close to 1:1.
  • Focus on High-Volume Pools: High transaction volume translates to massive fee generation that can quickly eclipse moderate impermanent loss.
  • Time Your Exit: Because the loss is termed impermanent, if token prices return to their initial ratio before you withdraw your liquidity, the impermanent loss disappears entirely.
  • Use Concentrated Liquidity Wisely: In Uniswap v3 and v4, providing liquidity within narrow price bands boosts fee yield significantly, but intensifies the rate of impermanent loss when the price crosses the boundaries of your active tick range.

Frequently asked questions

Why is it called "impermanent" loss?
The loss is called impermanent because it is unrealized as long as your assets stay in the pool. If the relative price of the two tokens returns to the exact ratio at which you deposited them, the loss reverts to zero. However, once you withdraw your liquidity from the pool, the loss becomes permanent.
Does impermanent loss happen when token prices fall?
Yes. Impermanent loss occurs whenever the price ratio between the two tokens diverges in either direction. If Token A drops by 50% while Token B remains stable, the pool automatically converts your stable assets into more of the falling token, resulting in the exact same 5.72% divergence loss as a 100% rally.
Can you lose money overall if impermanent loss is high?
Yes. If one token suffers a severe crash (such as an algorithmic stablecoin de-pegging or a project collapse), the pool will continuously buy the collapsing token until your position is virtually 100% worthless tokens, leaving you with catastrophic dollar losses.
What is the difference between APR and APY in liquidity pools?
APR (Annual Percentage Rate) reflects the simple annualized fee yield without compounding. APY (Annual Percentage Yield) accounts for the effects of auto-compounding fee earnings back into the liquidity pool over time, which increases the effective return.
How does Uniswap v3 concentrated liquidity affect impermanent loss?
Uniswap v3 allows liquidity providers to allocate capital within customized price ranges. This concentrates capital efficiency and dramatically increases fee earnings, but also magnifies impermanent loss within that specific range. If the price moves completely outside your selected range, your position converts entirely into the lesser-valued asset and stops earning fees.

Resources and references

The formulas and methods in this calculator were checked against these independent sources.