LP Impermanent Loss Calculator
Pricing
Pay per usage
LP Impermanent Loss Calculator
Calculate impermanent loss for Uniswap v2-style AMM pools. Auto-fetch current prices via CoinGecko or provide manual ratios. Compares LP vs HODL P&L, factors in fee income, generates scenario sweep. $0.001/calculation.
Pricing
Pay per usage
Rating
0.0
(0)
Developer
Hojun Lee
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
5 days ago
Last modified
Categories
Share
Calculate exact impermanent loss (IL) for constant-product AMM liquidity positions — Uniswap, SushiSwap, PancakeSwap, and any x*y=k AMM.
What It Does
Computes impermanent loss and LP position value based on price change from entry to current, using the constant-product AMM formula.
- Auto mode: Fetch live prices from CoinGecko for any two tokens
- Manual mode: Enter a custom price ratio directly
- Scenario sweep: Generate IL across 14 price change scenarios (-95% to +10x)
Outputs LP value, HODL value, net P&L, and the minimum fee APY needed to break even.
Input
| Field | Type | Default | Description |
|---|---|---|---|
mode | string | scenario_sweep | auto (CoinGecko), manual (custom ratio), scenario_sweep |
coinAId | string | ethereum | CoinGecko ID for token A (auto mode) |
coinBId | string | bitcoin | CoinGecko ID for token B (auto mode) |
initialPriceRatio | number | — | B/A price ratio at entry (manual mode) |
currentPriceRatio | number | — | B/A price ratio now (manual mode) |
initialLiquidityUsd | number | 10000 | Initial USD deposited into the LP |
holdingPeriodDays | number | 30 | Days held (for annualized breakeven fee calculation) |
Output
| Field | Description |
|---|---|
price_ratio | Current price ratio vs entry |
il_pct | Impermanent loss percentage |
lp_value_usd | Current LP position value |
hodl_value_usd | What HODL would be worth |
net_pnl_vs_hodl | LP vs HODL dollar difference |
breakeven_fee_apy_pct | Required fee APY to offset IL |
Pricing
$0.001 per calculation (flat per run).
Use Cases
- Evaluate whether a pool's fee APY justifies the IL risk
- Compare LP entry prices vs current for risk/reward decisions
- Stress-test portfolio against extreme price moves