DeFi liquidity pool risk

Impermanent Loss Calculator

Estimate impermanent loss when token prices change in a 50/50 AMM liquidity pool. Compare LP value vs HODL value, add optional trading fee assumptions and see the price ratio used in the calculation.

LP vs HODLAMM formulaFees optionalNo live API

Calculator

Liquidity pool inputs

Use token prices from the time liquidity was added and the current or target prices you want to test.

Formula: priceRatio = current price ratio / initial price ratio. Standard 50/50 pools use IL = 2 * sqrt(priceRatio) / (1 + priceRatio) - 1.

Definition

What is impermanent loss?

Impermanent loss is the difference between holding tokens in a liquidity pool and simply holding the same tokens in your wallet. It happens when the relative price of the pooled assets changes after you provide liquidity.

In a standard AMM pool, the pool rebalances token amounts as traders swap. If one asset rises relative to the other, the LP position gradually holds less of the outperforming asset and more of the underperforming asset. The pool can still gain in dollar terms, but it may be worth less than the HODL alternative.

Formula

Impermanent loss formula

This calculator uses the standard AMM impermanent loss formula for a 50/50 liquidity pool. The formula compares the value of your liquidity pool position with the value of simply holding the original tokens.

Price ratio change

priceRatio = (currentA / currentB) / (initialA / initialB)

This shows how much token A moved relative to token B.

50/50 AMM impermanent loss

IL = (2 * sqrt(priceRatio) / (1 + priceRatio)) - 1

The value is displayed as a negative percentage when LP underperforms HODL.

Net result after fees

netDifference = LP value + fees - HODL value

Trading fees can reduce or offset the gap, but fee income depends on real pool activity.

Example

LP vs HODL example

StepValueExplanation
Initial ETH price$2,000Token A starts at $2,000.
Current ETH price$4,000Token A doubles against the stablecoin.
Stablecoin price$1 to $1Token B remains flat.
Price ratio2.00xThe current price ratio is twice the initial ratio.
Impermanent lossAbout -5.72%IL = 2 * sqrt(2) / 3 - 1.

Use cases

When does impermanent loss happen?

One token moves faster

Impermanent loss appears when one pooled asset rises or falls relative to the other. The larger the relative price change, the larger the LP vs HODL gap.

The pair is volatile

Volatile pairs such as ETH/stablecoin or altcoin/stablecoin can show meaningful IL during strong trends or drawdowns.

A stablecoin depegs

Stable pairs often have low IL while both assets keep their peg. A depeg can change the price ratio and create a larger gap.

Fees

Can trading fees offset impermanent loss?

Trading fees can partially or fully offset impermanent loss, but they are not guaranteed. Fee income depends on pool volume, fee tier, your pool share, token incentives and the time you stay in the pool.

This page lets you add an optional fee amount. If the fee value is your own earned fee income, leave pool share at 0. If the fee value is total pool fees, add your pool share so the calculator estimates your portion.

Limitations

Limitations of this calculator

This liquidity pool loss calculator is built for standard 50/50 constant product AMM pools. It may not apply to concentrated liquidity positions, stable swap curves, custom-weighted pools, multi-token pools, protocol-level IL protection or dynamic fee designs.

The calculator does not automatically include gas fees, taxes, MEV, slippage, live pool volume, changing APY, token reward decay, smart contract risk or oracle risk. Add external costs separately when you have them.

Related crypto calculators

Impermanent loss is only one part of the LP decision. Use these related tools to model yield, real return and trading costs.

FAQ

Impermanent Loss Calculator FAQ

What is an impermanent loss calculator?

An impermanent loss calculator estimates how much value a liquidity provider may lose compared with simply holding the original tokens when prices change in an AMM pool.

How is impermanent loss calculated?

Impermanent loss is calculated by comparing the value of a liquidity pool position with the value of holding the same tokens outside the pool. For a 50/50 AMM pool, the formula uses the relative price change between the two assets.

Can trading fees offset impermanent loss?

Yes, trading fees can partially or fully offset impermanent loss, but this depends on pool volume, fee rate, pool share and how much prices diverge.

Is impermanent loss permanent?

It becomes realized when you withdraw liquidity while the token prices are different from when you deposited. If prices return to the original ratio before withdrawal, the loss may disappear.

Does this calculator work for Uniswap?

It can be used for standard 50/50 constant product AMM pools such as many Uniswap-style pools. It may not apply to concentrated liquidity, stable pools or custom-weighted pools.

Does impermanent loss happen with stablecoins?

It can happen with stablecoins, but it is usually smaller when both assets remain close to their peg. Depegging events can create larger losses.

What is LP value vs HODL value?

LP value is the estimated value of your liquidity pool position after price changes. HODL value is what your tokens would be worth if you had kept them outside the pool.

Does this calculator include gas fees?

Gas fees should be added separately if available. They can reduce the net return from providing liquidity.

Quality notes

How to use this result responsibly

Lamppoli calculators are designed to answer a practical crypto question quickly, then show the assumptions behind the result.

When to use

Best use case

Use this calculator before or after providing liquidity to a 50/50 AMM-style pool. It compares LP value with simply holding the original tokens.

Use the result as a planning estimate, then review fees, taxes, slippage, liquidity and risk separately before making decisions.

More FAQ

Additional Impermanent Loss Calculator Questions

Can LP fees offset impermanent loss?

Yes, fees can offset some or all impermanent loss, but fee income depends on volume, pool share, fee tier and time in pool.

Does this work for concentrated liquidity?

The standard 50/50 formula may not fit concentrated liquidity, stable pools or custom-weighted pools without extra assumptions.

Why compare LP value with holding?

Impermanent loss is measured against what the same assets would have been worth if held outside the pool.