An impermanent loss calculator shows how much less a liquidity position is worth than simply holding the same two tokens after their price ratio changes. Enter the price move, as a ratio or as the old and new prices, and it gives the loss for a 50/50 constant-product pool, using the formula in Uniswap's documentation [1].
How to use the impermanent loss calculator
- Choose whether to enter a price ratio or the old and new prices.
- Fill in the numbers. The ratio is the new price of token A divided by its old price, measured in token B.
- Optionally enter the value of the held tokens at the new price.
- Press Calculate.
What impermanent loss is
When you put two tokens into a constant-product liquidity pool, the pool keeps the product of its two reserves fixed as traders swap against it. If the price of one token moves, the pool ends up holding more of the cheaper token and less of the dearer one. The difference between what your share is worth and what the same tokens would have been worth if you had just held them is the impermanent loss [1]. By the formula, the loss falls back to zero if the price ratio returns to 1, which is our own reading of it.
The formula
The Uniswap documentation gives the impermanent loss for a price ratio r as 2 × √r ÷ (1 + r) − 1, and says that the result is a negative number, a loss against holding [1]. The same expression, without the minus one, is the value in the pool as a fraction of the value held. That rearrangement is our own working, and we show it because it is easier to picture: a result of 0.9959 means that the pool share is worth 99.59 percent of the held tokens.
A worked example
The documentation's example is a pool of 100 ETH and 10,000 DAI, where one ETH costs 100 DAI, and a share of one ETH and 100 DAI. The price rises to 120 DAI, so r is 1.2. The pool then holds about 91.29 ETH and 10,954.45 DAI. The share is worth 219.09 DAI, while holding would give 1 × 120 plus 100, which is 220 DAI [1]. The formula gives 2 × 1.0954 ÷ 2.2 − 1, which is −0.4141 percent, the same as 219.09 ÷ 220 − 1.
The table to check against
The same page lists the loss for a number of price changes: a ratio of 1.25 loses about 0.6 percent, 1.5 about 2.0, 1.75 about 3.8, 2 about 5.7, 3 about 13.4, 4 about 20.0 and 5 about 25.5 percent [1]. The calculator gives −0.6192, −2.02, −3.791, −5.719, −13.4, −20 and −25.46 percent for those ratios, so it agrees with the table to the rounding shown there.
Which way the price moves
The page says that the loss is the same whichever direction the price moves [1]. A ratio of 2, where the price doubles, and a ratio of 0.5, where it halves, give the same loss of 5.72 percent. The calculator shows the matching ratio for the move in the opposite direction, so you can see this for any number. The loss is zero only when the ratio is exactly 1, which means that the price has not changed.
Held against pool
If you enter the value of your tokens if you had held them at the new price, the calculator shows that amount, the value of the pool share, and the difference. In the example, 220 becomes 219.09 and the difference is −0.91. Write the amounts in any currency, since the calculation only uses the ratio. We chose to take the held value at the new price because that is how the documentation states its own example.
Fees and the trade-off
The documentation says that 0.3 percent of all trade volume goes to the liquidity providers in proportion to their share, and that by default the fees are put back into the pool [1]. It also says it is difficult to know the trade-off between fee revenue and the losses from price moves without knowing the amount of trading in between [1]. For that reason this tool shows the loss alone. The documentation covers equal-weight pools, so we found no formula for weighted pools such as 80/20 and do not offer one.
What the tool leaves out
Trading fees, rewards, gas costs and taxes are not part of the calculation. Fees can offset some or all of the loss, so a pool can be better than holding even with a loss shown here. Concentrated liquidity in newer versions of such pools works differently, and is not covered. A price ratio that is unknown in advance is also a limit: the tool shows what a given move would cost, not a forecast.
Reading the result
A small move costs little: a ratio of 1.25 loses only about 0.6 percent. Large moves matter more, since the loss grows faster than the price move, and at a ratio of 4 it reaches 20 percent. Use the calculator to compare several scenarios, then set the result against the fees you expect to earn. That comparison, not the loss alone, tells you whether a pool is worth entering.
Privacy
Everything is worked out in your browser, and the numbers you enter are not sent anywhere. You can try as many price moves as you like, in any order, and nothing is stored on the page beyond what your browser keeps for convenience. As with any tool about crypto assets, treat the result as an illustration and make your own decisions.
Common mistakes
- Using the percentage change as the ratio. A price rise of 20 percent is a ratio of 1.2, not 20.
- Forgetting the direction of the pair. The ratio is the price of token A in token B.
- Expecting fees to be included. They are not part of the loss shown.
- Using it for pools that are not 50/50. The formula is for equal weights.
What next
Use this often? Add Impermanent to your Home screen.
Frequently asked questions
What is an impermanent loss calculator?
A tool that compares the value of a liquidity pool share with simply holding the two tokens after the price ratio has changed.
What is the impermanent loss formula?
For a 50/50 constant-product pool it is 2 times the square root of r, divided by 1 plus r, minus 1, where r is the new price divided by the old price.
How big is the loss if the price doubles?
About 5.72 percent. A halving of the price gives the same loss.
Does the impermanent loss calculator include fees?
No. Trading fees, rewards and gas costs are not included, and they can change the real outcome.
Is impermanent loss permanent?
By the formula, the loss depends only on the current price ratio and is zero when the ratio returns to 1. That is our own reading of the formula.
Was this tool helpful?
What went wrong?
We only receive the reason you pick, never what you typed into the tool.
Thanks for your feedback.