Skip to content
thecalculatorstudio

Impermanent Loss Calculator: Liquidity Pool Value vs Holding

Enter the value you deposited and how far each token’s price has moved. You will see the impermanent loss, what the tokens would be worth held and in the pool, and the fees needed to break even.

Last reviewed

$
%
%
% of deposit

The figures shown are examples. This is a formula for a plain constant-product pool, not advice to provide liquidity.

Impermanent loss

-5.72%

-$85.79 against simply holding; price ratio 2.0000

Value if held
$1,500.00
Value in the pool
$1,414.21
Fees earned
$30.00
Pool plus fees
$1,444.21
Result against holding
−$55.79 (-3.72%)
Fees needed to break even
8.58% of deposit

With these fees, holding the tokens would have been worth more. The loss is called impermanent because it shrinks if the prices move back, but it becomes real when you withdraw. Gas costs, taxes and fee changes are not included.

What impermanent loss is

When you put two tokens into a liquidity pool on an automated market maker such as Uniswap v2, the pool keeps the two reserves in a fixed relationship. As the price of one token moves against the other, traders buy from the pool and sell to it until its price matches the market, and the mix of tokens you own changes with it. After a price move you end up with more of the token that fell and less of the one that rose.

The result is that your share of the pool is worth less than if you had simply held the two tokens. That shortfall is impermanent loss. It is called impermanent because it shrinks if the prices return to where they started. It becomes permanent when you withdraw at a different ratio. Trading fees you earn as a liquidity provider can offset it, and this calculator shows the two side by side.

The calculation

Take a deposit of value V split equally between tokens A and B. Let a and b be the price changes since the deposit, so 100% means doubling, and let r = (1 + a) ÷ (1 + b) be the change in the price ratio.

  • Value if held = V ÷ 2 × ((1 + a) + (1 + b)).
  • Value in the pool = V × √((1 + a) × (1 + b)).
  • Impermanent loss = pool ÷ held − 1 = 2√r ÷ (1 + r) − 1.

The loss depends only on the ratio of the two prices, not on which way it moves. A doubling and a halving give the same loss, and when both tokens move together by the same percentage there is none. The formula applies to a constant-product pool, the Uniswap v2 type. Other pool designs behave differently.

Worked example

You deposit 1,000 and the price of token A doubles against token B.

  • Held: 500 × (2 + 1) = 1,500.00.
  • In the pool: 1,000 × √2 = 1,414.21.
  • Loss against holding: −85.79, which is −5.72%. A price ratio of 2 gives 2√2 ÷ 3 − 1 = −0.0572.
  • If you earned fees equal to 3% of the deposit, 30.00, the pool plus fees is 1,444.21, still 55.79 below holding. You would need fees of 8.58% of the deposit to break even.

A published guide to impermanent loss gives an illustration that agrees: a starting value of 500 is worth 750 if held after a doubling and about 707.11 in the pool, a loss of 5.72%.

Loss for a given price ratio

Price ratio Impermanent loss
1.25 -0.62%
1.5 -2.02%
2 -5.72%
3 -13.40%
4 -20.00%
5 -25.46%
10 -42.50%

A ratio of 0.5, a halving, gives the same loss as a ratio of 2.

Points to check

  • The loss is only against holding. If both tokens fall, a liquidity provider still loses money, and the impermanent loss figure is not the whole loss.
  • Fees are the offset. Whether providing liquidity pays depends on the volume traded in the pool, which you must estimate yourself. The calculator takes your fee figure as a percentage of the deposit.
  • Other costs. Gas fees to deposit and withdraw, taxes on each transaction and the risk of a bug or exploit in the pool are not included.
  • Prices can run far. A price ratio of 10 means a 42.5% loss against holding. Pools with a narrow price range behave differently and may lose more or less than this formula shows.
  • Not advice. This is a formula, not a recommendation to provide liquidity or to buy any token.

Related tools: the compound interest calculator, the percentage change calculator, the ROI calculator and the average return calculator.

Frequently asked questions

What is impermanent loss?

It is the shortfall between what your share of a liquidity pool is worth and what the same tokens would be worth if you had held them, after the price of one token moves against the other. It is called impermanent because it shrinks if prices move back toward the starting ratio.

What is the impermanent loss formula?

For a constant-product pool with a price ratio r, the loss is 2 times the square root of r, divided by one plus r, minus one. A doubling gives about 5.72%, a tripling 13.4% and a tenfold move 42.5%. The calculator uses this formula and shows the money amounts.

Does the direction of the price move matter?

No. The loss depends on the size of the change in the price ratio, not whether the token rose or fell. A price that doubles and one that halves produce the same impermanent loss. If both tokens move by the same percentage, there is none.

Can trading fees cover the loss?

They can. Liquidity providers earn a share of the fees on trades through the pool. If the fees you earn are larger than the loss, you come out ahead of holding. The calculator shows the fees, as a percentage of your deposit, needed to break even.

Does this work for every pool?

No. It is the model of a constant-product pool, the Uniswap v2 type, with equal value in each token at the start. Pools with concentrated ranges, weighted tokens or stable-asset curves behave differently, and some can lose more or less.

What does the calculator leave out?

Gas costs, taxes, changes in the fee rate, the effect of your own deposit on the pool, and the risk of a bug in the pool or the tokens. It is a formula for one case and not advice to provide liquidity or to buy any token.

Related calculators

Sources

This tool is for information only and is not financial advice. Figures are estimates, confirm anything you act on with your lender or a qualified adviser.