An impermanent loss calculator measures one specific thing: the gap between what a liquidity position in an automated market maker is worth after prices move and what the same tokens would have been worth sitting untouched in a wallet. The name is unhelpful, because the loss is only impermanent in the sense that it reverses if prices return to where they started. It becomes entirely permanent the moment you withdraw, and most positions are withdrawn at prices that are not the entry prices. Several people prefer the term divergence loss, which describes the mechanism honestly, and this page uses both.
Arb Digital publishes this in the free tools library beside the crypto staking calculator, which projects a yield on a single asset with no pool mechanics in it, and the crypto profit calculator, which works a simple buy-and-sell in money terms. This page exists because the arithmetic behind an AMM position is not obvious from either of those, and because the number it produces is routinely quoted without the fee side or the risks that sit outside the formula.
What This Impermanent Loss Calculator Does
It takes the price of each token when you deposited and the price of each token now, works out the ratio between those two price changes, and applies the constant-product formula to give the percentage gap against holding. It then converts that percentage into money for the deposit size you entered, shows both the hold value and the pool value side by side, and subtracts the fee income you supply to give a net position against having done nothing.
The fee figure is deliberately an input rather than a projection. Pool fee income depends on trading volume, on the fee tier, on how much other liquidity is in the pool, and on the range your liquidity is concentrated into. None of that is knowable in advance, and a page that offered you a fee estimate would be manufacturing the one number that determines whether the position was worthwhile.
This page recommends nothing. It does not say whether providing liquidity is worth doing, does not describe any pool or protocol, and makes no claim about future fee income or future prices.
How to Use It
- Use your actual entry prices. The formula depends on the ratio between the two price changes, so both entry prices must come from the same moment — the moment you deposited, not the day's open or close.
- Enter both tokens even when one is a stablecoin. Leaving the stable side at 1.00 at both ends is correct, and it makes the point visible that a stable pairing puts the entire divergence on one asset.
- Look up your real accrued fees. Most interfaces show unclaimed fees for a position. Use that number, not an advertised annual percentage rate, which describes a moment in time and not what your position actually collected.
- Re-run it at the price you might exit at. The loss is a function of the exit price ratio, so putting in a hypothetical exit price shows you what withdrawing there would crystallise.
- Compare the net figure against holding, not against zero. A position can be up in dollars and still have done worse than doing nothing, which is precisely the comparison this measure exists to make. The percentage change calculator is useful for sanity-checking the underlying price moves.
The Formula and How It Is Calculated
For a standard constant-product pool holding two tokens in a fifty-fifty value split, let k be the ratio of the two price changes:
k = (Aend ÷ Astart) ÷ (Bend ÷ Bstart)
Then the divergence loss as a proportion of the hold value is:
IL = 2√k ÷ (1 + k) − 1
This is always zero or negative, and it is symmetric: a ratio of 2 and a ratio of 0.5 produce exactly the same loss, because a pool does not care which of the two tokens outperformed.
Underneath, the pool maintains x × y = K, where x and y are the reserves of the two tokens. When the external price of A relative to B moves to P, arbitrage rebalances the reserves to x = √(K ÷ P) and y = √(K × P). Uniswap's documentation on how the protocol works sets out that constant-product invariant directly. The loss arises because that rebalancing systematically sells the token that is rising and buys the one that is falling.
Worked example, matching the values the page loads with. A $10,000 deposit splits into $5,000 of token A at $2,000, giving 2.5 units, and $5,000 of token B at $1.00, giving 5,000 units. The invariant K is 2.5 × 5,000 = 12,500. Token A rises to $3,000 while token B is unchanged, so k = 1.5 ÷ 1.0 = 1.5.
Held outside the pool, the position would be worth 2.5 × 3,000 + 5,000 × 1.00 = $12,500. Inside the pool, the reserves rebalance to x = √(12,500 ÷ 3,000) = 2.041241 units of A and y = √(12,500 × 3,000) = 6,123.7244 units of B, worth 2.041241 × 3,000 + 6,123.7244 × 1.00 = $12,247.45. The gap is −$252.55, which is −2.0204% of the hold value — exactly what the formula gives: 2√1.5 ÷ 2.5 − 1 = 2.449490 ÷ 2.5 − 1 = −0.020204. With $300 of accrued fees, the position is $47.45 ahead of having simply held.
Why It Is Not Impermanent
The word survives from early descriptions of the mechanism and it misleads in a specific, expensive way.
The loss is unrealised while you remain in the pool, and it does shrink if the price ratio returns toward its starting point. That is the entire basis for the name. But withdrawing converts the position into whatever the reserves are at that moment, and at that moment the gap against holding is fixed and permanent. The only path where it genuinely disappears is one where the price ratio at withdrawal equals the price ratio at deposit — and you cannot know at deposit whether that path is the one you will get.
Worse, the incentive structure runs against waiting it out. The scenarios where divergence loss is largest are exactly the scenarios where one token has moved dramatically, and those are the scenarios where a position holder is most likely to want out. A token that has fallen 80% relative to its pair produces a divergence loss of roughly 26%, and waiting for it to recover is a decision about that token, not about the pool.
The loss also grows non-linearly and in a way that is easy to underestimate from small examples. A price ratio of 1.25 costs about 0.62%; a ratio of 2 costs 5.72%; a ratio of 4 costs 20.0%; a ratio of 10 costs 42.5%. The first few are small enough that fee income routinely covers them, which is why the risk is understated by anyone whose experience has been confined to quiet markets.
What This Page Does Not Model
The formula above describes one risk precisely and is silent on several others that have historically cost liquidity providers far more than divergence ever did. Stating them is not a caveat; it is the substance.
Smart-contract failure. Pool funds sit in code. Bugs, upgrade errors and exploits have resulted in total loss of deposited funds in real incidents, and no arithmetic on this page reflects any of that. Audits reduce but do not eliminate the risk, and an audited contract has still failed.
Token collapse. If one side of the pair goes to zero or near zero, the constant-product mechanism means the pool will have been steadily buying it on the way down. The position ends up holding almost entirely the worthless asset. The divergence formula technically describes part of this, but the dominant loss is simply that the token failed, and that is not a pool risk — it is an asset risk that being in a pool amplifies.
Depegging. Stable pairs are often described as free of divergence loss. That is true only while both sides hold their peg. A stablecoin that loses its peg produces a large price ratio between two assets that were assumed to move together, and the pool will have absorbed the falling one.
Concentrated liquidity ranges. Positions with liquidity concentrated into a price band behave differently from the plain constant-product case this page models. Once price leaves the band the position sits entirely in one token and stops earning fees, and the realised loss can be materially larger than the formula here suggests.
Costs and tax. Gas, deposit and withdrawal transactions, and the tax treatment of pool entry, exit and fee income in your jurisdiction are all outside this calculation. Ethereum's own overview of decentralised finance notes that products built on it are software and can suffer from bugs and exploits, which is the plainest statement of the underlying position.
Arb Digital builds the content and search visibility that make technical subjects clear to the people who need to make decisions about them.
See Content Marketing Services Talk to Arb DigitalCommon Mistakes to Avoid
- Reading the loss as a loss of money — it is a shortfall against holding. A position can show divergence loss while being up in dollars, and can show none while being down heavily because both tokens fell together.
- Using an advertised annual percentage rate as your fee figure — that rate describes a snapshot of recent volume against current liquidity. Your position collected whatever it collected, and the interface will tell you the actual number.
- Assuming a stable pair is risk-free — the divergence is zero only while both sides hold their peg. A depeg turns a supposedly flat pair into a highly divergent one instantly.
- Applying this formula to a concentrated position — range-bound liquidity does not follow the plain constant-product curve, and the outcome outside the range is worse than this calculation shows.
- Treating the number as the whole risk — contract failure and token collapse are separate, larger and entirely unmodelled here, and neither is reduced by understanding divergence loss.
Related Free Tools From Arb Digital
For single-asset yield with no pool mechanics, use the crypto staking calculator. Work a straight buy and sell with the crypto profit calculator or the bitcoin profit calculator. To measure what a position actually returned across the time you held it, the holding period return calculator handles income and capital together, and the annualized return calculator converts it to an annual rate. For the underlying price moves, the percentage change calculator is the quickest check. Everything else is in the free online tools hub.
Frequently Asked Questions
It is the difference between the value of a two-token liquidity position after prices move and the value those same tokens would have had if they had simply been held. It arises because an automated market maker rebalances reserves as prices change, systematically reducing exposure to the token that is rising and increasing exposure to the one that is falling.
Because the shortfall reverses if the price ratio between the two tokens returns to where it was at deposit. That is the only circumstance in which it disappears. Once you withdraw, the position is converted at whatever the reserves are at that moment, and the gap against holding becomes fixed and entirely permanent.
Take the ratio of the two tokens' price changes, call it k, then compute two times the square root of k divided by one plus k, minus one. The result is always zero or negative. It depends only on that ratio, so a doubling of one token against a static pair produces the same figure regardless of the position's size.
They can, and whether they do in any specific case depends on trading volume, the fee tier, competing liquidity and how long the position was open. None of that is predictable, which is why this page asks you for your actual accrued fees rather than estimating them. Fee income covering the loss in the past is not evidence it will do so again.
Only while both sides hold their peg. The measure depends on the two assets diverging, so two tokens genuinely tracking the same value produce essentially none. If either loses its peg, the ratio moves sharply and the pool will have been absorbing the falling asset the whole way down.
Several, and some are larger. Smart-contract bugs and exploits have caused complete loss of deposited funds in real incidents. A token collapsing to near zero leaves the position holding mostly the failed asset. Gas costs, deposit and withdrawal transactions, concentrated-range behaviour and tax treatment are all outside the formula.
No. The percentage depends only on the ratio between the two tokens' price changes, so a small and a large position in the same pool over the same period show the same percentage. The size determines only how much money that percentage represents, which is what the money figures on this page show.
Not directly. This page models a plain constant-product pool where liquidity is spread across all prices. A position concentrated into a price range behaves differently, earns no fees once price leaves that range, and ends up entirely in one of the two tokens, so the realised shortfall can be considerably larger than this formula indicates.
This tool applies a published formula to prices and amounts you supply. It is not investment advice, not an endorsement of liquidity provision, decentralised finance or any protocol, and not a prediction of fee income or prices. Digital assets are volatile and the risks described above, including total loss, are real. Decisions about your money should involve a licensed financial adviser who is regulated to advise on them.