DeFi Tools

DeFi Yield & Impermanent-Loss Calculator

Spot the edge. Swoop in.

Model how DeFi yield or liquidity-provider positions behave under different price and fee assumptions. Results are educational scenarios with transparent formula assumptions, not forecasts.

By Swoopr Editorial Team

Published · Updated

AI-assisted content · Swoopr is responsible for the final published article.

Educational tool only. Results are scenarios based on user-entered assumptions, not investment advice, price forecasts, or safety ratings. DeFi positions can result in partial or total loss of principal.

DeFi Yield & Impermanent-Loss Calculator

This calculator has two modes. Mode A — Yield Scenario models a DeFi yield position over time: base APR, incentive tokens, compounding, fees, and principal price change. Mode B — LP Scenario models a simplified 50/50 constant-product liquidity position: impermanent loss across price-ratio changes, fee income, and net comparison to holding.

Try a sample scenario:

Position basics
The value you are depositing. Use consistent units throughout.
Yield sources
Annual percentage rate from trading fees or base lending. Enter as a percentage (e.g. 8 for 8%).
Additional APR from reward tokens (liquidity mining, etc.). Enter 0 if none.
Your assumption for how reward token price changes over the period. Enter 0 for no change, -50 for a 50% drop, 100 for a double.
Compounding
How often base yield is reinvested. Applies to base APR only; incentive tokens are treated as simple interest unless you reinvest them manually.
Fees and costs
Charged on gross yield profit if positive. Enter 0 if none.
Principal price change
If your principal is denominated in a volatile token, enter your price-change assumption over the period (e.g. -10 for a 10% drop). Enter 0 to evaluate in token terms only.

About This Calculator

Mode A — Yield Scenario

Mode A models a single-token or LP yield position over a user-defined period. It separates returns into three components — base interest or trading-fee yield, incentive-token yield, and principal price change — and then subtracts management fees, performance fees, entry gas, and exit gas to show a net ending value.

The base yield is calculated as: simple interest = principal × APR × (days / 365). If compounding is selected, the base yield is recalculated using APY = (1 + APR / n)n − 1, where n is the number of compounding periods per year, and the ending value uses principal × (1 + APR / n)n × days / 365.

Incentive yield uses simple interest: incentive value = principal × incentive APR × (days / 365) × (1 + reward price change / 100). Management fees are prorated over the period. Performance fees are taken on gross positive yield only.

The sensitivity table shows net return across low (−50%), base (your entered value), and high (+50%) reward price-change scenarios, holding all other inputs constant.

Mode B — LP Scenario (Impermanent Loss)

Mode B applies the standard simplified impermanent-loss formula for a full-range 50/50 constant-product AMM pool. Given a price ratio change r (ending price divided by starting price), the formula is:

IL = 2 × √r / (1 + r) − 1

This expresses the LP value as a fraction of the holding value. The hold value for a 50/50 split across the price change is starting value × (1 + r) / 2. The LP value before fees is starting value × √r. Fee income and incentive income (adjusted for incentive token price change) are added, and gas costs subtracted, to show the LP value after fees versus holding.

The scenario table evaluates several standard price ratios (0.25×, 0.5×, 0.75×, 1×, 1.5×, 2×, 3×, 4×) with your entered fee and incentive income held constant, showing where fees break even against impermanent loss.

What these results do not tell you

Supporting Lessons

These pages explain the concepts behind the calculator's formulas and inputs.