How to Calculate Impermanent Loss in DeFi Liquidity Pools

How to Calculate Impermanent Loss in DeFi Liquidity Pools

Impermanent Loss Calculator

When you provide liquidity to a DeFi pool like Uniswap or Sushiswap, you’re not just earning trading fees-you’re also taking on a hidden risk called impermanent loss. It’s not a loss you see in your wallet right away. It’s a gap between what your liquidity position is worth and what you’d have if you’d just held the tokens in your pocket. And if you don’t understand how to calculate it, you might pull your money out too early-or stay in too long-and lose money without even realizing why.

What Impermanent Loss Really Means

Impermanent loss isn’t about the value of your tokens going down. It’s about opportunity cost. Imagine you put in 1 ETH and 1,600 USDC when ETH is $1,600. That’s a $3,200 position. A week later, ETH jumps to $2,000. Your tokens are now worth more-$3,600 total. But because of how automated market makers (AMMs) work, your share of the pool doesn’t grow as much as if you’d just held both tokens. That difference? That’s impermanent loss.

The term "impermanent" comes from the idea that if ETH drops back to $1,600, your loss disappears. But if you withdraw when ETH is at $2,000, that loss becomes real. Most people think they’re making money because their portfolio value went up. But if they’d just held, they’d have made even more.

The Math Behind Impermanent Loss

The standard formula for a 50/50 liquidity pool is:

IL = 2 × √d / (1 + d) - 1

Where d is the price ratio change. You calculate d by dividing the initial price by the current price.

Let’s say ETH went from $1,600 to $2,000. That’s a 25% increase. But d isn’t 1.25-it’s the inverse: 1,600 / 2,000 = 0.8.

Plug that in:

  • √0.8 = 0.8944
  • 2 × 0.8944 = 1.7888
  • 1 + 0.8 = 1.8
  • 1.7888 / 1.8 = 0.9938
  • 0.9938 - 1 = -0.0062

So your impermanent loss is -0.62%. That means you lost 0.62% of what you’d have made if you’d just held.

Here’s what happens at bigger price swings:

  • 1.25x price change → 0.6% loss
  • 2x price change → 5.7% loss
  • 3x price change → 13.4% loss
  • 4x price change → 20.0% loss
  • 5x price change → 25.5% loss

That’s why providing liquidity to a token that might pump 5x is risky. Even if the trading fees are high, you could still end up worse off than if you’d just held.

What If Your Pool Isn’t 50/50?

Most beginner guides assume equal weights. But pools like Balancer or Curve often use 80/20, 90/10, or even 99/1 ratios. The formula changes.

For a pool with weight w for the first asset:

IL = (2 × √(d^w × (1-w)^(1-w))) - (d^w + (1-w)^(1-w))

Let’s say you’re in an 80/20 ETH/USDC pool. ETH goes from $1,600 to $2,000 (d = 0.8). w = 0.8.

  • d^w = 0.8^0.8 = 0.8365
  • (1-w)^(1-w) = 0.2^0.2 = 0.7248
  • √(0.8365 × 0.7248) = √0.6063 = 0.7787
  • 2 × 0.7787 = 1.5574
  • 0.8365 + 0.7248 = 1.5613
  • 1.5574 - 1.5613 = -0.0039

That’s a -0.39% loss-smaller than the 50/50 case. Why? Because you’re mostly holding USDC, which didn’t move. The formula adjusts for asymmetry. Higher weight on the stable asset reduces impermanent loss.

Uniswap v3 and Concentrated Liquidity

Uniswap v3 changed everything. Instead of spreading your funds across all prices, you pick a range-say, $1,500 to $2,500 for ETH. Your liquidity only works inside that range. If ETH stays inside, you earn more fees. If it moves outside, your position stops trading entirely.

That means impermanent loss isn’t smooth anymore. If ETH surges to $3,000 and you set your range to $1,500-$2,500, your entire position turns into 100% ETH. You’re no longer earning fees, and you’re fully exposed to price swings. Your impermanent loss calculation now depends on:

  • Your price range
  • Where the price ends up
  • How much of your position is still active

According to Uniswap’s own technical notes, a narrow range can increase impermanent loss by up to 38% compared to v2 for the same price move. But if you pick a wide range, you’re giving up fee efficiency. It’s a trade-off.

Split scene: one person holds a ballooning ETH token, another is half-turned into USDC coins with a -5.7% sign.

Stablecoin Pools Are Different

Curve and other stablecoin AMMs use a different math. Instead of x*y=k, they use x+y=k. This keeps the price of stablecoins tightly pegged. That means even if USDC drops to $0.98 or rises to $1.02, the pool rebalances with almost no loss.

For price changes under 10%, Curve pools show less than 0.1% impermanent loss. That’s why people put stablecoins in Curve-low risk, steady fees. But if you put ETH and BTC in a Curve-style pool? That breaks the model. It’s designed for pegged assets.

Are Fees Enough to Cover the Loss?

This is the real question. You’re not just losing money-you’re earning fees. A pool might offer 50% APY. But if ETH goes up 5x, your impermanent loss is 25.5%. Even with 50% APY, you’d need over 6 months of fees to catch up.

Here’s what CoinGecko found in 2023: only 27% of liquidity pools on major DEXs generate enough fees to overcome typical impermanent loss. That means 73% of LPs are losing money in real terms, even if their portfolio value went up.

Some users report net gains because fees offset loss. One Reddit user put in $1,000 ETH/USDC. ETH went from $2,000 to $3,000. Their impermanent loss was 10.2%, but fees added 3.7%-so they still came out ahead. But another user lost $4,200 because they provided liquidity to a meme coin that spiked then crashed. Fees were only 12.3% APY. Impermanent loss? 38.7%.

How to Avoid Getting Burned

Here’s what works in practice:

  1. Use a calculator-like CoinGecko’s or Zapper.fi. Input your asset weights and price change. Don’t guess.
  2. Stick to stablecoin pairs if you want low risk. Curve, Balancer stable pools.
  3. Avoid volatile pairs unless you’re confident the price won’t swing wildly.
  4. Check your pool’s fee tier. Higher fees = better chance of offsetting loss.
  5. Don’t withdraw after a big price move-wait to see if fees catch up.
  6. Track your position over time. Use DeBank or CoinTracker to see net gain after fees.

A common rule of thumb: if one asset goes up by x%, your impermanent loss is roughly (1 - √x / (1 + x/100)) × 100. For a 50% price increase: (1 - √1.5 / 1.5) × 100 ≈ 3.4% loss. Quick, rough, and useful for mental math.

A cheerful farmer with stablecoins under a sunny sky, while a rocket labeled '5x!' blasts away with an X over it.

What Experts Say

Vitalik Buterin calls it "divergence loss"-it’s not a loss, it’s a mismatch between your position and a simple hold. Dr. Georgios Konstantopoulos points out the formula assumes perfect markets. Real-world slippage and gas fees change things. And Alex Beckett’s analysis of 12,000 positions shows actual loss is often 0.5-1.5% lower than theoretical because fees are already being earned.

But here’s the twist: Pintail, who coined the term, now says "impermanent loss" is misleading. Liquidity providers almost always earn fees. True losses are rare unless you’re in a low-volume pool or a token that crashes.

Tools You Can Use Today

You don’t need to calculate this by hand. Use these:

  • CoinGecko Impermanent Loss Calculator-free, updated July 2024, lets you pick weights and price changes.
  • Zapper.fi-shows your real-time impermanent loss in your portfolio.
  • DeBank-breaks down your position value vs. HODL value.
  • Custom spreadsheets-many advanced users build their own with formulas for fees and multiple deposits.

Remember: these tools don’t include fees. You have to add them manually. A $10,000 position with 10% impermanent loss might still be profitable if you earned $1,200 in fees over 3 months.

The Bottom Line

Impermanent loss isn’t magic. It’s math. And like any math, if you understand it, you can use it to your advantage. Don’t avoid liquidity provision because you’re scared of it. But don’t jump in blind either.

If you’re new, start with stablecoin pairs. Learn how the numbers work. Track your positions. Watch how fees accumulate over time. The goal isn’t to eliminate impermanent loss-it’s to make sure your rewards outweigh your risks.

Because in DeFi, the biggest losses aren’t from hacks or scams. They’re from people who thought they were making money-when they were just falling behind what they could have had.

Is impermanent loss the same as losing money?

No. Impermanent loss is an opportunity cost, not an actual loss. If you hold your tokens, their value might rise. But when you provide liquidity, the AMM rebalances your assets, so you end up with fewer of the token that increased in price. You haven’t lost money-you’re just not as far ahead as you would have been if you’d held. Only when you withdraw do you lock in the difference as a real loss.

Can you avoid impermanent loss entirely?

Not completely, but you can minimize it. Use stablecoin pairs like USDC/DAI-they have near-zero impermanent loss. Avoid highly volatile token pairs unless you’re confident the price won’t swing dramatically. Also, use concentrated liquidity pools (like Uniswap v3) with wide price ranges to reduce exposure. And always factor in trading fees-they can offset or even eliminate impermanent loss over time.

Why does impermanent loss increase with larger price changes?

AMMs use a constant product formula (x*y=k). When one token’s price rises, the protocol automatically sells some of that token to keep the product constant. That means you end up with fewer of the rising asset and more of the stable one. The bigger the price shift, the more the pool rebalances, and the more you miss out on the upside. At a 5x price increase, you could be holding 80% of your position in the stable asset-while the token you wanted to profit from has gone up fivefold.

Do fees cancel out impermanent loss?

Sometimes. If a pool offers 30-50% APY in fees and the price moves moderately (1.5x-2x), fees often cover the loss. But if a token surges 5x, even 100% APY might not be enough to offset the 25.5% impermanent loss. The key is time. The longer you stay in, the more fees compound. Many users only see net gains after 4-6 months. Short-term traders often lose money.

What’s the best way to calculate impermanent loss for a 70/30 pool?

Use the weighted formula: IL = (2 × √(d^w × (1-w)^(1-w))) - (d^w + (1-w)^(1-w)), where w is the weight of the first asset (e.g., 0.7 for 70/30) and d is the price ratio (initial price / current price). For example, if ETH rises from $1,600 to $2,400, d = 1600/2400 = 0.6667. Plug that into the formula with w=0.7 to get the exact loss. You can also use CoinGecko’s calculator, which supports custom weights.

Is impermanent loss worse in Uniswap v3 than v2?

It depends. In v2, your liquidity is spread across all prices, so you’re always trading and your loss grows gradually. In v3, if you set a narrow range and the price moves outside it, you stop earning fees and your entire position becomes one-sided. That can lead to much higher impermanent loss-up to 38% more than v2 for the same price move. But if you pick a wide range, v3 can reduce loss because you’re not diluted by irrelevant price levels. It’s a tool-use it right.

10 Comments

  • Image placeholder

    Louise Watson

    November 9, 2025 AT 00:05

    Impermanent loss isn't loss. It's just math showing you held wrong.
    Stop crying. Start calculating.

  • Image placeholder

    Benjamin Jackson

    November 10, 2025 AT 16:04

    Honestly? I started with stablecoin pairs after reading this.
    Zero drama, steady fees, and I actually sleep at night.
    DeFi isn't about getting rich overnight-it's about not getting ruined.
    Thanks for the clarity.

  • Image placeholder

    Liam Workman

    November 12, 2025 AT 14:51

    Love how this breaks it down without the hype 🙌
    Most guides make it sound like a trap, but it's really just a trade-off.
    Think of it like this: you're not losing money-you're just not getting the full moonshot.
    And honestly? If you're in a 90/10 pool with a stablecoin? You're basically playing chess while everyone else is playing Russian roulette.
    Also-Uniswap v3 is a beast if you know how to set ranges.
    Wide range = less stress. Narrow range = more fees but more risk.
    Use the calculator. Don't guess.
    And please, for the love of Satoshi, don't throw ETH/SHIB into a pool and call it 'yield farming'.
    That's not finance. That's a casino with a whitepaper.

  • Image placeholder

    Veeramani maran

    November 14, 2025 AT 10:04

    Bro the formula is wrong! You using d = initial/current but its supposed to be current/initial for the ratio! I tested on my spreadsheet and got 1.2% loss not 0.62%! Also fees are overrated, gas costs eat 30% of it! And why no mention of MEV?!

  • Image placeholder

    Kevin Mann

    November 14, 2025 AT 23:54

    OKAY BUT WHAT IF YOU'RE USING A 70/30 POOL WITH A MEME COIN THAT DROPPED 90% BUT YOU STILL GOT 40% APY??
    WHAT THEN??
    IMPERMANENT LOSS IS A LIE CREATED BY BIG BANKS TO SCARE YOU OUT OF DEFI!!
    THEY WANT YOU TO HOLD BTC AND LET THEM MAKE MONEY WHILE YOU SIT THERE CALCULATING FORMULAS LIKE A ROBOT!!
    WHEN I PUT 10K INTO WIF/USDC I MADE 22K IN 3 WEEKS AND MY IL WAS ONLY 8% BECAUSE I WITHDREW AT THE PEAK!!
    YOU'RE ALL THINKING TOO HARD!!
    JUST YOLO AND HODL THE FEES!!
    🚀🌕

  • Image placeholder

    Kathy Ruff

    November 15, 2025 AT 05:48

    This is one of the clearest explanations I've seen.
    It's not about avoiding impermanent loss-it's about understanding when it's worth the risk.
    Stablecoin pools? Low risk, low reward, but reliable.
    Volatile pairs? High reward, high risk, and most people don't realize they're underperforming HODLing.
    Track your position. Use DeBank. Compare to HODL value.
    And don't chase 100% APY on a token no one's heard of.
    It's not farming. It's gambling with a spreadsheet.

  • Image placeholder

    Robin Hilton

    November 15, 2025 AT 20:47

    Let me get this straight-you’re telling me that if I put money into a pool and the price moves, I’m not actually losing money, I’m just… not making as much as I could have?
    So… this is just a fancy way of saying "you should have bought the dip"?
    Why does this need a 2000-word essay?
    It’s basic economics. You’re not a liquidity provider. You’re a trader who forgot to trade.
    Also, why are Americans so obsessed with formulas? Just buy and hold. It’s simpler.

  • Image placeholder

    Grace Huegel

    November 16, 2025 AT 05:38

    I’ve seen this before. The same people who preach "decentralization" then turn around and treat DeFi like a derivatives market.
    It’s ironic.
    You want freedom from banks, but you’re still chasing alpha like a hedge fund analyst.
    Impermanent loss is just the universe laughing at your hubris.
    And you think a calculator will save you?
    It won’t.
    You’re just delaying the inevitable.

  • Image placeholder

    Nitesh Bandgar

    November 17, 2025 AT 12:19

    YOU ALL ARE MISSING THE POINT!!
    IMPERMANENT LOSS ISN'T THE PROBLEM-IT'S THE SYSTEM!!
    WHY DO WE HAVE TO GIVE OUR ASSETS TO A SMART CONTRACT THAT REBALANCES WITHOUT OUR CONSENT??
    IT'S A TRAP!!
    THEY WANT YOU TO THINK IT'S MATH WHEN IT'S CONTROL!!
    THEY'LL TELL YOU "USE A CALCULATOR" BUT THEY WON'T TELL YOU THAT 90% OF THESE POOLS ARE RUGGED IN 3 MONTHS!!
    YOU THINK YOU'RE EARNING FEES?
    YOU'RE JUST PAYING FOR THE PRIVILEGE OF BEING A CANNON FODDER FOR WHALES!!
    STOP CALCULATING. START REVOLTING.

  • Image placeholder

    Jessica Arnold

    November 18, 2025 AT 07:50

    In India, we call this "opportunity cost"-not "impermanent loss."
    It’s a cultural framing thing.
    We don’t romanticize the math-we just accept that markets move.
    But I appreciate the breakdown.
    What’s missing? Context.
    Why are we comparing to HODLing?
    Because in the West, we treat crypto like a stock market.
    In Asia? We treat it like a new asset class-fluid, dynamic, unpredictable.
    Maybe the real lesson isn’t how to calculate loss…
    but how to stop thinking in binary terms.
    Not HODL vs LP.
    But when to do both.

Write a comment