Crypto Impermanent Loss Calculator
Calculate the impermanent loss from providing liquidity to a constant product automated market maker pool when the prices of the two tokens change by different percentages.
Real-time Results
Disclaimer
The calculation results of this financial tool are for estimation and research reference only and do not constitute any investment advice or commitment. Actual rates and yields are subject to the final contract with the financial institution.
How it works
This calculator estimates the impermanent loss you would incur by providing liquidity to a two-token constant product automated market maker pool, compared to simply holding the tokens. You enter the initial investment amount and the percentage price changes for each token. The tool computes the impermanent loss percentage, the dollar loss versus holding, the value if you had held the tokens, and the value as a liquidity provider. It is useful for liquidity providers who want to understand the risk of providing liquidity when token prices diverge. The calculation assumes no trading fees, no yield farming rewards, and that the pool uses the standard constant product formula.
What happens when one token price doubles and the other stays the same?
If Token A increases by 100% and Token B stays at 0%, the relative price ratio becomes 2. The impermanent loss is about 5.72%. For a $10,000 initial investment, the value if held would be $15,000, but the value as a liquidity provider would be about $14,142, resulting in a loss of about $858.
This loss occurs because the pool automatically rebalances to maintain the constant product, selling the outperforming token and buying the underperforming one. The loss is called impermanent because if the prices return to their original ratio, the loss disappears.
How does a 50% drop in one token affect impermanent loss?
If Token A drops by 50% and Token B stays at 0%, the relative price ratio becomes 0.5. The impermanent loss is still about 5.72%, because the formula is symmetric with respect to the reciprocal of the price ratio. For a $5,000 initial investment, the value if held would be $3,750, and the value as LP would be about $3,535.5, a loss of about $214.5.
The symmetry means that a relative price ratio and its reciprocal produce the same impermanent loss percentage, but the dollar loss depends on the initial investment and the final value if held.
What is the impermanent loss when both tokens change by the same percentage?
If both tokens change by the same percentage, the relative price ratio remains 1, and the impermanent loss is 0%. For example, if both tokens increase by 50%, the value if held and the value as LP are equal, so there is no loss.
This is because the pool's rebalancing does not cause any divergence from the holding strategy when the price ratio is unchanged. The calculator will show 0.00% impermanent loss and $0 loss versus holding.
Examples and interpretation(5)
How do I calculate impermanent loss when Token A doubles and Token B is unchanged?
- Initial Investment
- 10000 $
- Token A Price Change
- 100 %
- Token B Price Change
- 0 %
- Set the initial investment to $10,000, the Token A price change to 100%, and the Token B price change to 0%.
- Convert the changes to price ratios: Token A becomes 1 + 100/100 = 2 and Token B becomes 1 + 0/100 = 1, so the relative price is 2/1 = 2.
- Apply the pool factor: 2 * sqrt(2) / (1 + 2) = 0.942809, so the impermanent loss percentage is |0.942809 - 1| * 100 = 5.72%.
- Value if held = 10000 * (0.5 * 2 + 0.5 * 1) = $15,000; value as a liquidity provider = 15000 * 0.942809 = $14,142.14; loss versus holding = 15000 - 14142.14 = $857.86.
- Impermanent Loss
- 5.72
- Loss vs Holding
- 857.86
The impermanent loss is 5.72% of the holding value, which amounts to $857.86 for a $10,000 initial investment. This assumes no fees or rewards.
How do I calculate impermanent loss when Token A drops by 50% and Token B is unchanged?
- Initial Investment
- 5000 $
- Token A Price Change
- -50 %
- Token B Price Change
- 0 %
- Set the initial investment to $5,000, the Token A price change to -50%, and the Token B price change to 0%.
- Convert the changes to price ratios: Token A becomes 1 + (-50)/100 = 0.5 and Token B becomes 1 + 0/100 = 1, so the relative price is 0.5/1 = 0.5.
- Apply the pool factor: 2 * sqrt(0.5) / (1 + 0.5) = 0.942809, so the impermanent loss percentage is |0.942809 - 1| * 100 = 5.72%.
- Value if held = 5000 * (0.5 * 0.5 + 0.5 * 1) = $3,750; value as a liquidity provider = 3750 * 0.942809 = $3,535.53; loss versus holding = 3750 - 3535.53 = $214.47.
- Impermanent Loss
- 5.72
- Loss vs Holding
- 214.47
The impermanent loss percentage is the same as when the price doubles, but the dollar loss is smaller because the initial investment and final holding value are lower.
How do I calculate impermanent loss when Token A increases by 50% and Token B drops by 25%?
- Initial Investment
- 2000 $
- Token A Price Change
- 50 %
- Token B Price Change
- -25 %
- Set the initial investment to $2,000, the Token A price change to 50%, and the Token B price change to -25%.
- Convert the changes to price ratios: Token A becomes 1 + 50/100 = 1.5 and Token B becomes 1 + (-25)/100 = 0.75, so the relative price is 1.5/0.75 = 2.
- Apply the pool factor: 2 * sqrt(2) / (1 + 2) = 0.942809, so the impermanent loss percentage is |0.942809 - 1| * 100 = 5.72%.
- Value if held = 2000 * (0.5 * 1.5 + 0.5 * 0.75) = $2,250; value as a liquidity provider = 2250 * 0.942809 = $2,121.32; loss versus holding = 2250 - 2121.32 = $128.68.
- Impermanent Loss
- 5.72
- Loss vs Holding
- 128.68
Even though both tokens changed, the relative price ratio is still 2, so the impermanent loss percentage is the same as in case 1. The dollar loss is proportional to the final holding value.
What is the impermanent loss when both token prices are unchanged?
- Initial Investment
- 1000 $
- Token A Price Change
- 0 %
- Token B Price Change
- 0 %
- Set the initial investment to $1,000, the Token A price change to 0%, and the Token B price change to 0%.
- Convert the changes to price ratios: both ratios are 1, so the relative price is 1.
- Apply the pool factor: 2 * sqrt(1) / (1 + 1) = 1, so the impermanent loss percentage is |1 - 1| * 100 = 0.00%.
- Value if held = 1000 * (0.5 * 1 + 0.5 * 1) = $1,000; value as a liquidity provider = 1000 * 1 = $1,000; loss versus holding = 1000 - 1000 = $0.00.
- Impermanent Loss
- 0.00
- Loss vs Holding
- 0.00
When prices do not change, there is no impermanent loss. The liquidity provider position is exactly equal to holding the tokens.
How do I calculate impermanent loss when Token A increases by 200% and Token B increases by 100%?
- Initial Investment
- 3000 $
- Token A Price Change
- 200 %
- Token B Price Change
- 100 %
- Set the initial investment to $3,000, the Token A price change to 200%, and the Token B price change to 100%.
- Convert the changes to price ratios: Token A becomes 1 + 200/100 = 3 and Token B becomes 1 + 100/100 = 2, so the relative price is 3/2 = 1.5.
- Apply the pool factor: 2 * sqrt(1.5) / (1 + 1.5) = 0.979796, so the impermanent loss percentage is |0.979796 - 1| * 100 = 2.02%.
- Value if held = 3000 * (0.5 * 3 + 0.5 * 2) = $7,500; value as a liquidity provider = 7500 * 0.979796 = $7,348.47; loss versus holding = 7500 - 7348.47 = $151.53.
- Impermanent Loss
- 2.02
- Loss vs Holding
- 151.53
When both tokens increase but at different rates, the impermanent loss is smaller than when one token is unchanged. The relative price ratio of 1.5 leads to a loss of about 2.02%.
Formula
Impermanent loss percentage = |2 * sqrt(relative price) / (1 + relative price) - 1| * 100, where relative price = (1 + Token A price change / 100) / (1 + Token B price change / 100). Value if held = initial investment * (0.5 * (1 + Token A price change / 100) + 0.5 * (1 + Token B price change / 100)); value as a liquidity provider = value if held * 2 * sqrt(relative price) / (1 + relative price); loss versus holding = value if held - value as a liquidity provider.
How to use
- Enter the total initial investment amount in dollars that you would put into the liquidity pool.
- Enter the percentage price change for Token A, using positive numbers for increases and negative numbers for decreases.
- Enter the percentage price change for Token B, using positive numbers for increases and negative numbers for decreases.
- Review the impermanent loss percentage, which shows how much value you lost compared to holding.
- Check the loss versus holding amount in dollars to see the actual monetary impact.
- Compare the value if held and the value as LP to understand the difference in outcomes.
Frequently asked questions
What is impermanent loss in a liquidity pool?
Impermanent loss is the difference in value between holding two tokens in a liquidity pool versus holding them in your wallet, caused by price divergence. It is called impermanent because it can be recovered if prices return to their original ratio.
How does the calculator handle negative price changes?
You can enter negative percentages for price decreases. The calculator converts them to ratios, for example -50% becomes 0.5. It validates that the ratio is greater than zero; if a price change would make the ratio zero or negative, it shows an error.
Does the calculator include trading fees or yield farming rewards?
No, the calculator only computes the raw impermanent loss based on price changes. It does not account for any fees earned from swaps or additional rewards from yield farming. Those would offset the loss in practice.
Why is the impermanent loss percentage the same for a price doubling and a price halving?
The formula depends on the relative price ratio. A ratio of 2 and a ratio of 0.5 produce the same LP factor because the function is symmetric under taking the reciprocal. Thus the loss percentage is identical.
What is the maximum impermanent loss?
As the relative price ratio approaches infinity or zero, the impermanent loss approaches 100%. For example, if one token becomes worthless relative to the other, the LP position loses nearly all value compared to holding.
Can I use this calculator for any liquidity pool?
This calculator assumes a standard constant product automated market maker, like Uniswap V2. Pools with different formulas, such as concentrated liquidity or stablecoin pools, may have different impermanent loss characteristics.
Related Calculators
More calculators selected by category and topic.
