Free Impermanent Loss (IL) Calculator for DeFi

Are you providing liquidity to a Decentralized Finance (DeFi) Automated Market Maker (AMM) pool? Use this calculator to estimate your potential Impermanent Loss (IL) based on price changes of the assets in the pool.

Note: This calculator provides an estimate of IL based on a hypothetical initial $100 deposit in each token (total $200). It does not account for trading fees earned from the pool, which can offset IL. Actual results may vary. The IL percentage is the key metric.

IL Calculator Inputs
Assume a 50/50 liquidity pool (e.g., ETH/USDC). You provide equal initial USD value of both assets.

How to Use the Impermanent Loss Calculator

  1. Enter the initial price of Token A (e.g., ETH) when you entered the liquidity pool.
  2. Enter the initial price of Token B (e.g., USDC) when you entered the pool. For stablecoins, this is usually $1.
  3. Enter the expected future price of Token A.
  4. Enter the expected future price of Token B. If Token B is a stablecoin that maintains its peg, you can leave this as its initial price (e.g., $1).
  5. Click "Calculate Impermanent Loss."
  6. The tool will estimate the value if you had just held the assets vs. their value in the LP (based on a $100 deposit in each token), and the resulting IL amount and percentage.

This calculator assumes you initially deposited an equal dollar value of both tokens (a common requirement for 50/50 pools).

What is Impermanent Loss (IL)?

Impermanent Loss is a potential risk associated with providing liquidity to Automated Market Maker (AMM) pools in DeFi. It occurs when the price of the deposited assets changes compared to when they were initially deposited. The "loss" refers to the difference in value between holding the assets in your wallet versus providing them as liquidity.

Key points about IL:

  • It's "Impermanent" because the loss is only realized if you withdraw your liquidity at a point where the prices have diverged. If prices return to their original ratio, the IL can disappear.
  • Caused by Price Divergence: The greater the price change between the two assets in the pool, the larger the potential IL.
  • Offset by Fees: Liquidity providers earn trading fees from the pool. In many cases, these fees can outweigh the IL, resulting in a net profit. This calculator *does not* include earned fees.
  • Risk vs. Reward: Understanding IL is crucial for assessing the risk/reward profile of being a liquidity provider.

Simplified IL Formula Insight

For a 50/50 pool, the impermanent loss can be calculated based on the price ratio change. A common formula for the IL percentage is:

IL_percentage = ((2 * sqrt(price_ratio_of_changes)) / (1 + price_ratio_of_changes)) - 1

Where price_ratio_of_changes (r) = (FuturePriceA / InitialPriceA) / (FuturePriceB / InitialPriceB). The result is a decimal, which is then multiplied by 100 for percentage.

Our calculator determines the initial quantities based on a hypothetical $100 investment in each token. It then calculates the value of these quantities if simply held (HODL Value). It also calculates the value of the LP position after the AMM rebalances due to price changes (LP Value). The IL is the difference: IL Amount = LP Value - HODL Value.

Example IL Calculation

Suppose you provide liquidity to an ETH/USDC pool with an initial total value of $200 ($100 of ETH and $100 of USDC):

  • Initial ETH Price (Token A): $2,000. You'd have $100 / $2000 = 0.05 ETH.
  • Initial USDC Price (Token B): $1. You'd have $100 / $1 = 100 USDC.

Scenario: ETH price increases to $4,000. USDC remains $1.

If you HODLed:

  • 0.05 ETH * $4,000/ETH = $200
  • 100 USDC * $1/USDC = $100
  • Total HODL Value = $300

In the LP (simplified, AMM rebalances):

  • The AMM maintains a constant product (quantity_A * quantity_B = k). As ETH price rises, the pool will have less ETH and more USDC.
  • Using the formulas, your share of the pool might now be worth approximately $282.84.

Impermanent Loss:

  • IL Amount = $282.84 (LP Value) - $300 (HODL Value) = -$17.16
  • IL Percentage = (-$17.16 / $300) * 100 = approx. -5.72%

This means your LP position is worth $17.16 less than if you had just held the assets (before considering any trading fees earned). Our calculator automates these rebalancing calculations.

Can You Mitigate Impermanent Loss?

  • Choose Stable Pairs: Pools with two stablecoins (e.g., USDC/DAI) have minimal IL because their prices don't diverge much.
  • Correlated Assets: Pools with highly correlated assets (e.g., wETH/stETH) tend to have lower IL.
  • Single-Sided Staking (Less Common in AMMs): Some platforms offer single-asset staking which avoids IL.
  • Trading Fees: The primary way LPs profit is if trading fees earned are greater than any IL incurred.
  • Concentrated Liquidity (e.g., Uniswap V3): Allows LPs to provide liquidity in specific price ranges, which can be more capital efficient but also carries different IL risks if the price moves out of range. (This simple calculator does not model concentrated liquidity.)