Calculate impermanent loss for AMMs from token price changes or balances, including fees, rewards, and APY yearly return breakdown.

Impermanent Loss Calculator

Estimate impermanent loss for a 50/50 constant-product AMM pool, compare LPing against simply holding both tokens, and see how trading fees, incentive rewards, gas costs, and price movement affect the final result.

1. Initial LP Deposit

Your starting amount of Token A.
Your starting amount of Token B.
For a standard 50/50 pool, deposits should be equal value. If your amounts are imbalanced, this calculator treats the extra amount as left outside the LP position and includes it in the HODL comparison.

2. Final Prices

Annualized trading fee yield, before incentives.
Optional liquidity mining rewards, points value, incentives, etc.
Pure Pool IL
Formula-only impermanent loss based on the Token A / Token B price ratio.
LP vs HODL
After fees, rewards, and costs.
Final LP Value
LP position value plus extra tokens left outside the pool.
Break-Even Fees Needed
Additional value needed for LPing to match HODL.

Result Summary

Position After Rebalancing

Metric Value
Token A in LP at end
Token B in LP at end
Relative price ratio change
Trading fees included
Rewards minus costs
Fee APR required to offset current gap

LP vs HODL Comparison

Scenario Final Value Profit / Loss vs Initial Difference vs HODL Notes

Impermanent Loss Curve

This chart shows pure 50/50 pool impermanent loss as the Token A / Token B price ratio changes. It excludes trading fees and incentives.

Interpretation

Formula Notes

This calculator models a standard 50/50 constant-product AMM pool, such as the classic x × y = k structure. It assumes the LP position is rebalanced by arbitrage as external market prices move.

Price Ratio Change = (Final A Price / Final B Price) / (Initial A Price / Initial B Price)
Pure Impermanent Loss = 2 × sqrt(Price Ratio Change) / (1 + Price Ratio Change) – 1

A negative impermanent loss percentage means the LP position underperformed a simple HODL strategy. Trading fees and incentives can offset that underperformance. This is an estimate only and does not include slippage, variable liquidity, token emissions changing in value, concentrated liquidity ranges, active rebalancing, taxes, smart contract risk, MEV, oracle issues, or protocol-specific mechanics.


Related Calculators

Impermanent Loss Formula

The following formula is used to calculate impermanent loss (relative to holding), based on the change in the price ratio between the two assets and the pool weights:

\begin{aligned}
r &= \frac{(P_A/P_B)_{\text{current}}}{(P_A/P_B)_{\text{initial}}} = \frac{(P_{A,1}/P_{A,0})}{(P_{B,1}/P_{B,0})} \\
IL &= \frac{r^{w}}{w\cdot r + (1-w)} - 1 \\
\text{For } w=0.5: \quad IL &= \frac{2\sqrt{r}}{1+r}-1
\end{aligned}

Variables:

  • IL is the impermanent loss as a decimal (e.g., −0.134 = −13.4%). Multiply by 100 to express it as a percentage.
  • r is the relative price change, defined as (A/B)current ÷ (A/B)initial.
  • w is the pool weight of Asset A (as a fraction from 0 to 1). For a 50/50 pool, w = 0.5.

To calculate impermanent loss, compute the initial and current price ratio PA/PB, take their ratio to get r, and then apply the formula above (using your pool weight).

What is an Impermanent Loss?

Impermanent loss occurs when the price of assets in a liquidity pool changes after a liquidity provider has deposited them into the pool. The loss is 'impermanent' because it can be recovered if the prices return to their original state at the time of deposit. It is a risk associated with providing liquidity in automated market maker (AMM) platforms.

How to Calculate Impermanent Loss?

The following steps outline how to calculate the Impermanent Loss.


  1. First, determine the initial price of Asset A and Asset B.
  2. Next, determine the current price of Asset A and Asset B.
  3. Compute the initial price ratio (PA/PB)initial and the current price ratio (PA/PB)current.
  4. Compute r = (PA/PB)current ÷ (PA/PB)initial.
  5. Choose the pool weight w for Asset A (for a 50/50 pool, use w = 0.5) and apply the impermanent loss formula.
  6. Use the calculator above to verify your results.

Example Problem:

Use the following variables as an example problem to test your knowledge.

Initial Price of Asset A = $100

Initial Price of Asset B = $200

Current Price of Asset A = $150

Current Price of Asset B = $100

For a 50/50 pool: r = (150/100) ÷ (100/200) = 3, so IL = 2√3/(1+3) − 1 ≈ −0.13397 (≈ −13.40%).