cryptocurrency calculators

DeFi Yield Farming Calculator

Estimate your net return from DeFi liquidity pools by combining yield farming rewards with impermanent loss. Use it before depositing into a pool to weigh APY gains against price-divergence risk.

About this calculator

When you deposit two tokens into an automated market maker (AMM) pool, you earn trading fees and farming rewards at the stated APY, but you also face impermanent loss if the two token prices diverge. The net result is approximated as: Net Return = liquidityAmount × (1 + poolAPY/100 × farmingDays/365) − liquidityAmount × max(0, 2√[(1 + ΔA)(1 + ΔB)] − (1 + ΔA) − (1 + ΔB)), where ΔA and ΔB are the fractional price changes of Token A and Token B respectively. The square-root term captures the constant-product (x·y = k) rebalancing that causes impermanent loss. If both tokens move identically, impermanent loss is zero. The formula nets yield rewards against that loss to give a single USD outcome, helping you decide whether the APY justifies the price-divergence risk.

How to use

Suppose you deposit $10,000 into a pool offering 40% APY for 90 days. Token A rises 20% and Token B falls 10%. Step 1 – Yield portion: $10,000 × (1 + 0.40 × 90/365) = $10,986.30. Step 2 – Impermanent loss factor: 2 × √[(1.20)(0.90)] − 1.20 − 0.90 = 2 × √1.08 − 2.10 = 2 × 1.0392 − 2.10 = −0.0216. Step 3 – IL deduction: $10,000 × max(0, 0.0216) = $216. Step 4 – Net result: $10,986.30 − $216 = $10,770.30. Your estimated net return is $770.30 over the 90-day period.

Frequently asked questions

What is impermanent loss and how does it affect DeFi yield farming returns?

Impermanent loss occurs when the price ratio of your two pooled tokens changes after you deposit them. An AMM constantly rebalances your holdings to maintain equal value on both sides, meaning you end up with more of the depreciating token and less of the appreciating one compared with simply holding. The larger the price divergence between Token A and Token B, the greater the impermanent loss. High farming APYs can offset this loss, but if prices diverge dramatically the loss can outweigh your rewards. This calculator shows you both effects combined so you can judge the real net outcome.

How do I know if a DeFi pool's APY is high enough to offset impermanent loss risk?

A useful rule of thumb is that a constant-product pool suffers roughly 0.5% impermanent loss when prices diverge by 10%, about 2% at 20% divergence, and over 5% at 50% divergence. If the annualised APY scaled to your farming period exceeds the expected impermanent loss percentage, the pool is likely profitable. You can test this by entering conservative price-change scenarios in the calculator before committing capital. Stablecoin pairs (both tokens pegged to $1) have near-zero impermanent loss and are therefore lower risk, while volatile pairs require much higher APYs to justify the exposure.

Why does the farming period in days matter for calculating DeFi yield farming profits?

APY figures are annualised, so the actual yield earned scales linearly with the fraction of the year you remain in the pool: yield = APY × (days/365). A 100% APY pool earns only about 8.2% if you farm for just 30 days. Conversely, impermanent loss can crystallise quickly if prices move sharply in the first few days. Entering the exact number of days you plan to stay lets the calculator pro-rate the yield accurately and compare it against the price-change risk for that specific window, giving you a realistic rather than overstated picture of potential returns.