Calculate impermanent loss for a 50/50 constant-product pool from token price changes—or solve for a target loss—with LP vs HODL values, fees, and costs.
Impermanent Loss Formula
The following signed formula compares pool value with holding the initial token quantities. The calculator uses the full-range 50/50 constant-product case and displays the positive loss magnitude, the negative of signed IL. Unequal-weight models are shown only for context and are not supported by this calculator:
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.
Use prices in the same currency to compute r. For this calculator use w = 0.5 and positive loss magnitude L = 1 − 2√r/(1+r). The Uniswap return model neglects fees. This tool adds separately entered fee/reward value and LP-specific costs to its approximate monetary comparison, with zero holding costs; it does not simulate reserve changes caused by fees.
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. In the ideal model, the relative shortfall returns to zero if the relative A/B price ratio returns to its initial value; both absolute prices need not return. This does not guarantee recovery of the original dollar investment or cover protocol risks and costs. 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.
- First, determine the initial price of Asset A and Asset B.
- Next, determine the current price of Asset A and Asset B.
- Compute the initial price ratio
(PA/PB)initialand the current price ratio(PA/PB)current. - Compute
r = (PA/PB)current ÷ (PA/PB)initial. - Use w = 0.5 for this calculator. Enter a starting position value allocated equally to the two assets; optional fees/rewards and costs default to zero when blank.
- Select Calculate to compare LP and holding values. Reverse mode accepts 0% ≤ loss < 100% and returns reciprocal relative-price scenarios; at zero loss both coincide at1×. It cannot determine unique token prices. Reset clears this calculator’s saved state.
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. Signed IL = 2√3/(1+3) − 1 ≈ −0.1339746. The calculator displays the positive loss magnitude, approximately13.3975%, relative to holding. This is distinct from the portfolio’s return versus the initial deposit.
