Skip to content
Calculator Collection

DeFi Yield Farming Calculator

Estimate gross yield-farming earnings from a DeFi liquidity position using your principal, APY, and farming duration in days. Treats yield as simple interest and assumes nothing else changes.

Last updated: May 2026

Compare with similar

About this calculator

The calculator uses simple interest: Earnings = liquidityAmount × (APY / 100) × (farmingDays / 365). It returns gross yield in USD over the chosen period assuming a constant rate, no compounding, no fees, no token-price movement, and no impermanent loss. APY is the annualised percentage yield advertised by the protocol; farmingDays is your holding period. Edge cases: real DeFi yields are anything but stable — APYs typically start very high (50–500%+ on new farms) and decay rapidly as TVL increases and emissions outpace fees; the figure you enter today is usually wrong tomorrow. The formula completely ignores impermanent loss, the single biggest cost for LP-based farms; a 30% APY pool that suffers 25% IL over the same period leaves you with only ~5% net return. It also ignores reward-token price collapse, which is the most common way farms appear profitable on paper but realise near-zero in dollars (Iron Finance, OHM forks, countless others). Gas fees for entering, claiming, compounding and exiting can be material — on Ethereum mainnet a $1,000 position can lose 5–15% to gas alone over an active farming cycle. Smart-contract risk (audits don't catch everything; Yearn, bZx, Beanstalk and others have all lost user funds to exploits) and protocol-failure risk are not modelled. Treat the output as a gross headline number and discount aggressively for realistic outcomes.

How to use

Example 1 — modest yield, short horizon. Liquidity $10,000, APY 15%, farming 90 days. Step 1: APY decimal = 15 / 100 = 0.15. Step 2: time fraction = 90 / 365 ≈ 0.2466. Step 3: earnings = 10,000 × 0.15 × 0.2466 ≈ $369.86. Verify: roughly 90/365 ≈ 25% of the annual 15%, which would be $1,500 over a full year — so $370 over a quarter is consistent. ✓ In practice, expect this gross number to shrink by 5–10% from gas fees, 5–25% if there's impermanent loss, and potentially much more if the reward token's price falls. Example 2 — high-yield farm. Liquidity $5,000, APY 80%, farming 30 days. Step 1: 80 / 100 = 0.80. Step 2: 30 / 365 ≈ 0.0822. Step 3: earnings = 5,000 × 0.80 × 0.0822 ≈ $328.77. Verify: 80% of $5,000 = $4,000 a year; 30 days is ~8.2% of a year, giving 8.2% × $4,000 = $328 ✓. The realistic net outcome depends entirely on whether the farm's reward token holds value over 30 days — if it crashes 50% the realised earnings are roughly half ($164); if it holds, gas plus minor IL leaves perhaps $280–300 net; if it 2×'es, the net could be $600+. The headline number is a starting point, not a forecast.

Frequently asked questions

Why are advertised DeFi yields so often unattainable in practice?

Advertised APYs are usually a snapshot in time, calculated by annualising the current emission rate of reward tokens divided by current TVL. As more capital deposits into the same pool the yield-per-dollar drops sharply — TVL doubling typically halves the realised APY within days. Token-price decay is the second factor: reward tokens (especially from emissions-heavy farms) face constant sell pressure from farmers harvesting and dumping, so even if the token-denominated yield stays high the USD-denominated yield falls as the reward token depreciates. Third, impermanent loss on the underlying LP position can erase the yield entirely — a 100% APY on an ETH/altcoin LP can be wiped out by a 4× move in the altcoin price (about 20% IL). Gas fees on Ethereum mainnet add 2–10% drag on small positions through deposits, harvests, compounds and withdrawals. Tax friction takes another 25–50% in many jurisdictions. The realistic net yield after all these is often 10–30% of the headline APY, sometimes negative.

What's the difference between APR and APY in DeFi?

APR (Annual Percentage Rate) is the simple, non-compounded annual rate — if a farm pays 100% APR and you don't reinvest, you receive 100% of your principal in rewards over a year. APY (Annual Percentage Yield) is the effective annual rate after compounding — 100% APR auto-compounded daily produces ~171.5% APY. Many DeFi UIs quote APY assuming infinite daily auto-compounding even when the platform doesn't actually auto-compound, exaggerating the realistic yield by a factor of 1.5–2× for high rates. If you have to manually claim and redeposit each day to capture the quoted APY, the gas cost typically eats more than the compounding benefit on positions under $50,000. Auto-compounding vaults (Yearn, Beefy) automate this and pass through most of the compounding benefit minus a performance fee (10–20% of yield). For this calculator's simple-interest formula, you should enter APR if the protocol gives you both, or the platform's stated APY interpreted as APR (it will slightly underestimate true return at high rates but is closer to reality than blindly trusting APY).

How do gas fees affect DeFi farming returns?

Materially, and disproportionately for small positions. On Ethereum mainnet, depositing into an LP-based farm costs $30–150 in gas depending on congestion; claiming rewards costs $10–50; compounding back into the LP costs another $30–150; withdrawing at the end is similar. A complete farming cycle can run $80–500 in gas before reward-claiming costs. On a $1,000 position earning 30% APR over 3 months ($75 expected gross), $100 of gas fees produces a NET LOSS of $25 — even though the headline APY looked attractive. On a $100,000 position the same gas is a rounding error. As a rule of thumb, mainnet DeFi farming is only economic above ~$10,000 per position, and even then frequent harvesting destroys returns. Layer-2 networks (Arbitrum, Optimism, Base) and alternative L1s (Solana, Sui) have gas costs 10–100× lower, making DeFi farming viable at $500–5,000 position sizes. Always compute total expected gas spend over your planned holding period before entering.

What are the common mistakes when projecting DeFi yields?

The biggest is trusting the headline APY as a forward forecast — it almost always falls within days of you depositing as TVL grows. The second is ignoring impermanent loss, which can easily exceed the yield on volatile pairs and is the single largest source of LP underperformance. The third is using USD-denominated assumptions for reward tokens that have no real underlying demand outside the farm — when emissions stop, reward-token prices typically collapse 90%+, retroactively destroying realised returns. People also chase the highest APY without checking the protocol's age, audit status, TVL stability, and team transparency; a 2,000% APY on a 1-week-old fork of a fork is almost always going to zero. Forgetting tax treatment (most jurisdictions tax DeFi yield as ordinary income at receipt, even before you can sell) and ignoring smart-contract exploit risk round out the top mistakes. A useful sanity check: if the yield seems too good to be true relative to risk-free rates, identify exactly what risk is being compensated; if you can't name it, the answer is usually 'principal loss' and you're the exit liquidity.

When should I not use this calculator?

Do not use it for any LP-based farm without separately modelling impermanent loss; the headline yield is meaningless if IL exceeds it. It is not appropriate for compounded vault positions (Yearn, Beefy, Convex, Aura), where rewards are auto-restaked and the effective return follows a compound-interest formula rather than simple interest. Do not use it for leveraged or borrowed-position farms (Notional, Gearbox), where liquidation risk and borrowing costs interact non-linearly and a single 'APY' figure massively oversimplifies. It is unsuitable for projecting returns on emission-heavy farms whose reward tokens face inevitable price decay — the USD output will be wildly optimistic. Avoid it for any farm older than 24 hours without checking current actual APY (not the launch APY); rates fall fast. Finally, do not use the output to decide whether to deposit large sums — it ignores smart-contract risk, governance risk and counterparty risk, all of which can take a position to zero overnight; treat any yield above ~10% as compensation for serious tail risk and size accordingly.

Sources & references