This calculator gives estimates for education and planning. It is not investment, tax or legal advice; for decisions about your own situation, talk to a qualified financial professional.
When you provide liquidity to an automated market maker (AMM) such as Uniswap, you deposit two tokens in a pool, and the pool keeps them in balance as traders buy and sell. If the price of one token moves compared with the other, the pool sells the token that is rising and buys the one that is falling. After the move, your share is worth less than if you had simply kept both tokens in your wallet. That gap is called impermanent loss, and it is the main risk of liquidity providing. This calculator measures it and compares it with the trading fees you earn.
How the calculation works
For a standard 50/50 constant-product pool:
- Price ratio r = (price change of token A) ÷ (price change of token B)
- Impermanent loss = 2 × √r ÷ (1 + r) − 1
- Value held = deposit × (change of A + change of B) ÷ 2
- Value in the pool = deposit × √(change of A × change of B)
- Fees = deposit × annual rate × days ÷ 365 (a simple estimate that ignores compounding and changes in pool volume)
Example
You deposit $10,000 in an A/stablecoin pool when A is worth $2,000, and A rises to $4,000. The price ratio is 2, the impermanent loss is −5.72%, and the pool is worth about $14,142 while holding would have given $15,000: a gap of about $858. With a 12% annual fee rate over 90 days, you earn about $296, so the position is still about $562 behind holding. At that fee rate, it would take about 261 days to cover the loss.
The loss grows with the move, in both directions
A price ratio of 1.25 costs about 0.6%, a ratio of 2 about 5.7%, a ratio of 4 about 20% and a ratio of 10 about 42%. The curve is symmetrical: a token that halves costs the same as one that doubles. That is why stable pairs, where the ratio barely moves, suffer little impermanent loss, while volatile pairs need high fees to be worth it.
What the calculator does not include
Gas fees for depositing and withdrawing, taxes on each swap or withdrawal, smart contract risk, token risk and the concentrated liquidity ranges of newer pools are not modeled. Concentrated liquidity amplifies both the fees and the loss. In the United States, withdrawing liquidity is generally a taxable event. This calculator is an educational estimate, not a recommendation to provide liquidity.