Enter the initial and current prices of two assets in a liquidity pool to calculate the impermanent loss. The calculator will provide the impermanent loss as a percentage.

Impermanent Loss Formula

The following formula is used to calculate the impermanent loss:

IL = left(frac{2 cdot sqrt{PRA cdot PRB}}{PRA + PRB + 2}right) - 1

Variables:

  • IL is the impermanent loss (expressed as a percentage)
  • PRA is the price ratio of Asset A (Current Price A / Initial Price A)
  • PRB is the price ratio of Asset B (Current Price B / Initial Price B)

To calculate the impermanent loss, determine the price ratio for each asset, calculate the square root of the product of the price ratios, and then apply the formula above.

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. Calculate the price ratio for each asset (Current Price / Initial Price).
  4. Calculate the square root of the product of the price ratios.
  5. Apply the impermanent loss formula to find the loss percentage.
  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