Impermanent Loss Calculator

Impermanent Loss Calculator worksheet with calculator inputs, formula checks, units, and source notes
Use this worksheet-style image as a reminder to check pool weights, price assumptions, fee estimates, units, and protocol mechanics before relying on an LP comparison.

Plain-text formula: For 50/50 pools, IL = 2 * sqrt(relativePriceRatio) / (1 + relativePriceRatio) - 1. Weighted-pool mode compares the weighted geometric LP ratio with the weighted linear HODL ratio.

Educational tool: this calculator and the LP Drift game are simplified models for understanding how automated market makers rebalance. They are estimates for learning, not investment, financial, or tax advice, and they do not describe any specific pool you can deposit into.

Calculate impermanent loss (IL) for AMM liquidity pools and compare LP returns versus holding, including an estimated fee APR over a chosen time period.

Introduction: impermanent loss is a rebalancing gap, not a fee

Impermanent loss begins when an automated market maker (AMM) rebalances the tokens you deposited as their relative prices change. A liquidity provider earns a share of trading fees in exchange for maintaining the pool's target composition, but that rebalancing can leave the position worth less than the original token quantities would be worth in a wallet. Nothing is deducted from your balance: the shortfall is a comparison against a benchmark, and it only becomes a realised outcome if you withdraw while the relative price is still displaced. This calculator measures that LP-versus-HODL gap for the ending prices you choose. It covers 50/50 pools such as the classic constant-product design and weighted pools such as 80/20 or 95/5 configurations. An optional APR-based fee estimate is then added so the result shows whether assumed income would offset the modeled underperformance. Treat each calculation as a scenario rather than a forecast: test a one-sided move, a stable pair, and a case where both tokens move but at different rates.

The impermanent-loss results separate three amounts: the HODL value of the token quantities held outside the pool, the LP value before fees after modeled AMM rebalancing, and the LP value after fees after a simple fee-income estimate. The difference between LP value before fees and HODL value is displayed as impermanent loss, shown as a negative percentage and a negative dollar amount so the direction of the gap is never ambiguous.

How AMM rebalancing creates impermanent loss

In a 50/50 ETH/USDC-style pool, the AMM targets equal value on both sides. If ETH rises, arbitrage activity changes the pool composition until the pool price follows the outside market. The LP position consequently holds less ETH and more USDC than the original wallet position would have held. If ETH falls, the pool finishes with more of the falling asset. The calculator isolates the resulting difference from simply retaining the entry quantities.

The geometry is worth picturing, because the LP Drift game further down the page draws it directly. A constant-product pool lives on the curve x * y = k in reserve space, where x is the quantity of Token A held by the pool and y the quantity of Token B. The market price of Token A in Token B units is the pool ratio y / x, so every price implies exactly one point on that curve, and a price move slides the position along it. The value of the position at a given price is a straight line of slope -price through that point, and because the curve is convex that line is a tangent. Every other point on the curve โ€” including the point where you deposited โ€” sits above the tangent. The vertical gap between your entry point and the tangent line is impermanent loss.

Weighted AMM pools change the size of that effect. An 80/20 pool allocates most starting value to its 80% token, so a price move in that dominant asset produces less rebalancing than an equal-weight pool. The result still depends on both tokens' price ratios, not merely on whether either token rose in dollar terms.

How to use this impermanent loss calculator

For an impermanent-loss scenario, work through the form from pool design to expected exit prices, then read the LP and HODL figures together.

  1. Pick the pool type. Choose 50/50, 80/20, 95/5, or Custom Weight. Selecting Custom reveals a Token A percentage; Token B receives the remainder.
  2. Name the two tokens. These labels only identify the displayed results. They do not change the calculation.
  3. Enter entry prices. Initial prices set the token quantities represented by the total deposit at the time liquidity was provided.
  4. Enter an ending-price scenario. Current/Future Price is the market price used to value both the HODL benchmark and the modeled LP position.
  5. Set deposit, fee rate, and duration. Initial Investment is the total entry value. Estimated Pool APR and Days in Pool determine a simple, non-compounded fee estimate based on that initial investment.
  6. Calculate and compare. Review HODL value, LP value before fees, estimated fee income, net versus HODL, and break-even APR as one scenario.

Impermanent loss formula for constant-product and weighted pools

The impermanent-loss calculation first converts each price into a change ratio from entry to the chosen ending price. It then values the starting token quantities as HODL and applies the relevant AMM relationship for the selected pool weight. The price-ratio building blocks are:

  • Token A price ratio: priceRatioA = currentPriceA / initialPriceA
  • Token B price ratio: priceRatioB = currentPriceB / initialPriceB
  • Relative ratio for 50/50: relativeRatio = priceRatioA / priceRatioB

The constant-product invariant behind a 50/50 pool

A Uniswap-v2-style pool holds reserves x of Token A and y of Token B and keeps their product fixed across every trade, ignoring the fee that is retained in the pool:

x โ‹… y = k

Setting the pool ratio y / x equal to the outside market price P and solving gives the reserves and the position value at any price. The position value in Token B units is 2 * sqrt(k * P), which grows only with the square root of the price โ€” the source of the whole effect.

Constant-product impermanent loss formula for a 50/50 pool

For a 50/50 constant-product pool, the calculator applies the standard relationship to the relative price ratio R:

IL = 2 R 1 + R โˆ’ 1

Here, R is Token A's price ratio divided by Token B's price ratio. When Token B's price ratio is one, R equals Token A's price ratio. The formula is symmetric: reversing the relative move produces the same percentage shortfall at reciprocal ratios, so a 0.5x move and a 2x move both give โˆ’5.72%.

Weighted-pool impermanent loss formula

For an 80/20, 95/5, or custom weighted pool, the calculator uses a weighted geometric LP ratio and compares it with the weighted linear HODL ratio. This is the constant-mean generalisation used by Balancer-style pools, where the invariant is the weighted product of the balances:

IL = rAwA โ‹… rBwB wA rA + wB rB โˆ’ 1
  • LP value ratio: lpValueRatio = priceRatioA^wA * priceRatioB^wB
  • HODL value ratio: hodlValueRatio = wA * priceRatioA + wB * priceRatioB
  • Impermanent loss: IL = (lpValueRatio / hodlValueRatio) - 1

Setting both weights to 0.5 reduces this expression to the 50/50 formula above, so the two modes agree exactly at equal weights. A larger Token A weight gives the LP position more starting exposure to Token A and generally reduces rebalancing away from that asset. It does not eliminate impermanent loss when Token A and Token B have different price ratios. Because the numerator is a weighted geometric mean and the denominator a weighted arithmetic mean of the same ratios, the inequality of arithmetic and geometric means guarantees the result is never positive.

LP fee-income and break-even APR formula

The calculator estimates liquidity-pool fees and rewards as simple interest rather than compounding them:

feeIncome = investment โ‹… APR100 โ‹… days365

Turning that around gives the break-even APR: the simple annual rate that would generate exactly enough fee income, over the selected number of days and on the initial investment, to cover the modeled dollar shortfall.

APRbreakeven = lossAmountโ‹…365 investmentโ‹…days โ‹… 100

Worked example: a $10,000 ETH/USDC pool at a 1.5x relative move

These are the values the form loads by default, so you can reproduce every line by pressing Calculate. Pool type 50/50, Token A is ETH at $2,000 rising to $3,000, Token B is USDC at $1.00 staying at $1.00, initial investment $10,000, estimated pool APR 25%, days in pool 365.

  1. Split the deposit. $10,000 x 0.5 = $5,000 per side, giving 5,000 / 2,000 = 2.5 ETH and 5,000 / 1 = 5,000 USDC. The invariant is k = 2.5 x 5,000 = 12,500.
  2. Value the HODL benchmark. 2.5 x $3,000 + 5,000 x $1 = $12,500.
  3. Find the relative ratio. priceRatioA = 3,000 / 2,000 = 1.5 and priceRatioB = 1, so R = 1.5.
  4. Apply the formula. 2 x sqrt(1.5) / (1 + 1.5) - 1 = 2.44949 / 2.5 - 1 = -2.0204%.
  5. Value the LP position. $12,500 x 0.979796 = $12,247.45, which is the same figure you get from the reserves: the pool now holds sqrt(12,500 / 3,000) = 2.0412 ETH and sqrt(12,500 x 3,000) = 6,123.72 USDC. The shortfall is -$252.55.
  6. Add the fee estimate. $10,000 x 0.25 x 365/365 = $2,500, so the LP position is worth $14,747.45 against a $12,500 HODL benchmark: +$2,247.45, or +17.98%.
  7. Check the break-even. $252.55 x 365 / ($10,000 x 365) x 100 = 2.53%. Any sustainable fee APR above roughly 2.5% would have covered this particular move.

Switching the same scenario to an 80/20 pool changes step 4: the LP ratio becomes 1.5^0.8 x 1^0.2 = 1.383162 and the HODL ratio becomes 0.8 x 1.5 + 0.2 x 1 = 1.4, so IL falls to -1.2027%. The 80/20 pool rebalances less, but it also starts with a very different exposure, so the two settings are not interchangeable choices for the same view.

Next, vary the APR and days in pool rather than assuming a quoted annual yield will apply for an entire year. The fee estimate uses the original investment and the selected duration, so it is best read as a simple planning input rather than a prediction of realized pool revenue. Check whether the final net-versus-HODL line remains favorable after using a more conservative fee assumption.

How to interpret impermanent loss results

The impermanent-loss results panel reports the percentage gap, its dollar value relative to the HODL benchmark, and the fee-adjusted LP comparison. A negative "Net vs HODL" means the modeled fees were not enough to cover the LP shortfall for the price scenario entered. The "Break-Even APR" is the simple annual rate, over the selected number of days and using the initial investment as the fee base, needed to offset that modeled dollar shortfall.

Limitations and assumptions of this impermanent loss model

  • Start and end prices only: the comparison uses entry and ending prices; it does not simulate price paths or trade-by-trade pool activity.
  • Constant APR assumption: fee and reward income is modeled as a constant simple annual rate, although real pool income changes with volume, liquidity, and incentives.
  • No transaction costs: gas, slippage, MEV, bridging, and tax effects are not included.
  • Fees excluded from the invariant: the model treats fee income as a separate term instead of letting retained fees grow k the way a live constant-product pool does.
  • Generalized pool model: concentrated-liquidity ranges, dynamic fees, and protocol-specific rules are outside this calculator's scope.

Practical notes for impermanent-loss planning

Impermanent loss is the cost of providing continuously rebalanced liquidity relative to holding the deposited assets; it is not a separate charge taken from the wallet. It is usually smaller when the two assets maintain similar price ratios and larger when one asset strongly outperforms or underperforms the other. Weighted pools can alter the exposure and rebalancing trade-off, but the weight should match the actual pool rather than a preferred outcome.

Educational reminder: this calculator is not financial advice. Verify the pool's actual weights, fee tier, incentive terms, range mechanics, and smart-contract risks before providing liquidity.

Deeper guide: using impermanent loss scenarios for real pools

Impermanent loss is often summarized as LP underperformance during price divergence, but a useful LP decision needs more context. The important question is not whether a pool can have ILโ€”it canโ€”but whether its likely fee income and the investor's desired token exposure justify the modeled trade-off. This calculator makes that comparison explicit for a chosen starting deposit and ending-price scenario.

The HODL side of the comparison retains the quantities implied by the initial investment and pool weights. The LP side assumes the AMM rebalances to its selected weights and then applies the resulting impermanent-loss relationship. Estimated fees are added afterward as a separate simple-income term. Keeping these components separate helps prevent a high headline APR from obscuring a large relative-price move.

Why impermanent loss happens in an AMM

A 50/50 AMM acts like a continuous rebalancing strategy. When Token A appreciates relative to Token B, the pool sells some Token A; when Token A depreciates, the pool accumulates some Token A. The LP therefore departs from the original token mix that a holder would still own. This calculator measures the ending-value consequence of that mechanism rather than attempting to predict trades along the route.

In a weighted pool, rebalancing still occurs but the dominant asset starts withโ€”and maintainsโ€”a larger share of value. Comparing the same price ratios under 50/50 and 80/20 settings can show how pool design changes both exposure and the LP-versus-HODL gap.

Reading the break-even APR for an LP scenario

The break-even APR shown for an impermanent-loss scenario asks what simple annual rate would produce enough estimated fees, over the selected days, to cover the modeled dollar difference between LP and HODL. It is calculated from the modeled loss amount and the initial investment, so a changing HODL value matters to the required rate.

Use the result as a stress-test threshold, not as a claim about future yield. Actual fees can be lower or higher than the entered APR, and reward tokens may change value independently of the two assets in the pool.

Impermanent loss scenarios worth testing

These price patterns help reveal which part of an LP decision drives the result. Change the price fields, pool type, APR, and days in pool while keeping the scenario assumptions internally consistent.

  • Similar price ratios: Give both tokens the same proportional move. IL should be near zero because their relative price is unchanged.
  • One token rises: Keep Token B's ratio near one and increase Token A's ratio to examine the classic rising-asset trade-off.
  • Both tokens rise unevenly: Increase both ending prices at different rates. The relative move, rather than the fact both assets rose, drives IL.
  • One token falls: Reduce Token A while Token B is unchanged to see the LP's increased exposure to the declining asset.
  • Weight comparison: Apply the same price ratios to 50/50 and 80/20 settings to see how the pool allocation changes the result.

Impermanent loss assumptions in plain language

This LP calculator is deliberately a compact start-to-finish model. Its assumptions make the calculation transparent, but they also mean the output is a baseline for comparison rather than a complete protocol simulator.

  • No path dependency: only entry and ending prices are used, while actual fee generation depends on changing volume and volatility.
  • No compounding: fee income is simple interest on the initial investment rather than reinvested returns.
  • No range liquidity: concentrated-liquidity positions can behave differently when price approaches or leaves their chosen range.
  • Constant pool share: the model does not adjust the position for other liquidity providers adding or removing capital.
  • No frictions: gas, slippage, MEV, bridge costs, and taxes are excluded from the comparison.

Quick impermanent-loss checklist before using a result

  1. Confirm the actual pool design: use its real weight and treat concentrated positions as rough comparisons only.
  2. Use a defensible APR: separate sustainable trading-fee income from temporary promotional rewards where possible.
  3. Match the duration: enter the days you expect to stay in the pool, not an arbitrary full-year period.
  4. Test relative price moves: run mild, strong, and adverse divergence cases instead of relying on one outcome.
  5. Review risks beyond IL: depegs, contract failures, oracle issues, and transaction costs can outweigh the modeled difference.

Used with those limits in mind, this calculator clarifies how pool weights, relative prices, fee assumptions, and time interact. Record the inputs behind any scenario so the comparison can be revisited when market prices or pool economics change.

Impermanent loss by relative price change in a 50/50 pool

The table below lists the impermanent loss for a standard 50/50 constant-product pool at several relative price ratios. It uses IL = 2*sqrt(k) / (1 + k) โˆ’ 1, where k is the new relative price divided by the starting relative price. Reciprocal ratios have the same loss, so a 0.5x relative move matches a 2x relative move.

Impermanent loss versus HODL for a 50/50 pool at various relative price ratios
Price ratio (k) Relative price change Impermanent loss
1.0ร—No change0.00%
1.25ร—+25%โˆ’0.6%
1.5ร—+50%โˆ’2.0%
2ร—+100%โˆ’5.7%
3ร—+200%โˆ’13.4%
4ร—+300%โˆ’20.0%
5ร—+400%โˆ’25.5%

Sources: references this impermanent loss calculator was checked against

The invariant, the 50/50 closed form, the weighted generalisation, and the way the fee term is layered on top were each re-derived from the protocol specifications below rather than copied from secondary summaries. The fee tiers quoted in the LP Drift game are the published tiers of the referenced designs; the volume response attached to them in the game is an illustrative teaching model, not observed pool data.

  • Hayden Adams, Noah Zinsmeister and Dan Robinson, Uniswap v2 Core (March 2020) โ€” official whitepaper (PDF). Source for the constant-product invariant x * y = k, for the fact that reserves and price are locked to one another by that invariant, and for the 0.30% swap fee that is retained inside the reserves.
  • Fernando Martinelli and Nikolai Mushegian, Balancer: A Non-Custodial Portfolio Manager, Liquidity Provider, and Price Sensor โ€” official whitepaper (PDF). Source for the constant-mean value function, the weighted geometric invariant used by 80/20 and 95/5 pools, and the spot-price relationship that makes the weighted LP ratio a weighted geometric mean of the price ratios.
  • Jason Milionis, Ciamac C. Moallemi, Tim Roughgarden and Anthony Lee Zhang, Automated Market Making and Loss-Versus-Rebalancing, arXiv:2208.06046 โ€” paper record. A peer-reviewed treatment of why an AMM position underperforms a rebalanced benchmark, and why arbitrage against a stale pool price is the mechanism behind the gap this page measures.
  • Rohan Tangri, Peter Yatsyshin, Elisabeth A. Duijnstee and Danilo Mandic, Generalizing Impermanent Loss on Decentralized Exchanges with Constant Function Market Makers, arXiv:2301.06831 โ€” paper record. Used to confirm that the equal-weight closed form is the special case of the general constant-function result, and to check the sign convention used throughout this page.

Frequently asked questions about impermanent loss

What does an impermanent loss calculator do?

It models the difference between the ending value of an AMM liquidity position and the ending value of the same token quantities held outside the pool. It reports the LP value before estimated fees, the HODL benchmark, and the fee-adjusted comparison for the prices and pool weights you enter.

How is impermanent loss calculated?

For a 50/50 pool, the calculator uses 2 times the square root of the relative price ratio, divided by one plus that ratio, minus one. The relative ratio is Token A's price change divided by Token B's price change. For weighted pools, it divides the weighted geometric LP price ratio by the weighted linear HODL price ratio, then subtracts one.

How do I use the impermanent loss calculator?

Choose the pool weight, enter each token's entry and current or future price, then add the total deposit, estimated annual fee rate, and days in the pool. The calculator values the original token quantities at the ending prices, estimates the rebalanced LP value, and adds simple fee income based on the original investment.

When is impermanent loss most significant?

Impermanent loss grows when the tokens move differently relative to one another. It is zero when their price ratios are equal, even if both tokens rise or fall. A fee estimate can offset the modeled shortfall, but actual pool income, costs, and token prices can differ from the assumptions entered here.

Does impermanent loss disappear if the price returns to where it started?

In this model, yes. The gap depends only on the ratio between the two tokens' price changes, so when that ratio returns to its starting value the modeled shortfall returns to zero and any fees earned along the way are kept. That round-trip behaviour is why the loss is called impermanent: it is realised only if you withdraw while the relative price is still displaced.

Which fee tier offsets impermanent loss best?

No tier offsets it on its own, because fee income is the tier multiplied by the volume that tier actually attracts. Low tiers such as 0.05 percent normally capture the most volume on tightly correlated pairs, while a 1.00 percent tier is aimed at volatile pairs where traders accept a wider spread. Compare the break-even APR reported here against a fee APR you can support with observed pool volume.

Different pool weights have different IL profiles.
Label for the first token (example: ETH).
Label for the second token (example: USDC).
Price when you entered the pool.
Current or projected price to calculate IL.
Price when you entered (often 1 for stablecoins).
Current or projected price.
Total dollar value when entering the pool.
Expected annual yield from trading fees + rewards (simple estimate).
Time period for fee accumulation.
Enter pool and price details to compare the LP position against holding.

LP Drift: ride the constant-product curve

LP Drift draws the pool you just modeled. The bright curve is the constant-product invariant x * y = k in reserve space; your position is the glowing dot that slides along it as the market price moves. The hollow ring marks where you deposited, and the shaded wedge between the ring and the dashed value line is impermanent loss in dollars, live. Choose a fee tier, choose how much of your capital to commit, and choose when to be in the pool at all. Three price paths run in sequence โ€” a round trip, a one-way grind up, and a sharp divergence โ€” because the round trip erases the gap while the one-way moves do not.

Everything is scored against a plain hold of the same starting tokens, so staying out of the pool always scores exactly zero edge. Withdrawing returns your capital to the hold mix, which means the only two things you can change are the fees you collect and the divergence you lock in when you exit.

Keyboard: focus the board, then press Space or Enter to start, to add liquidity, and to withdraw. Up and Down switch fee tier, Left and Right change how much capital you commit, and R restarts the current path. Tier and size can only change while you are out of the pool. Pointer or touch: tap a fee-tier chip to select it, drag the commit slider to size the position, and tap anywhere else on the board โ€” including the wide action bar at the bottom โ€” to start the path, add liquidity, or withdraw it.

Pick a single path to practise, or run all three in order.

Path

Ready

Price vs entry

1.00x

Fee tier

0.30%

Fee APR now

0.0%

Position IL

0.00%

Fees earned

$0

Edge vs hold

0.00%

Score

0

Best run

0

Press Start path, or focus the board and press Space. The board is a teaching model of AMM mechanics, not a simulation of any real pool or a recommendation to provide liquidity.

Embed this calculator

Copy and paste the HTML below to add the Impermanent Loss Calculator for AMM LP vs HODL Returns to your website.