IRR Calculator
Find the internal rate of return (IRR) for a series of irregular cash flows like yield farming.
Cash Flows
Enter your initial investment as a negative number (e.g. -1000), then each period's return.
12 = monthly, 1 = yearly
Start Trading Today
Sign up on top exchanges with exclusive referral bonuses
Related Calculators
Related Guides
What Is Internal Rate of Return (IRR)?
Internal Rate of Return (IRR) is the discount rate at which the net present value (NPV) of all cashflows from an investment equals zero. In plain terms, it answers the question: “If my investment were a bank account, what annual interest rate would produce the exact same series of deposits and withdrawals?” IRR is particularly powerful for evaluating investments where money flows in and out at irregular intervals, such as yield farming, liquidity pool participation, token vesting schedules, and staged DeFi strategies.
The formula IRR solves is:
0 = CF₀ + CF₁/(1+r) + CF₂/(1+r)² + ... + CFₙ/(1+r)ⁿ
where r is the IRR and CF_t is the cashflow at periodt. Because this equation has no closed-form algebraic solution, it is solved numerically — this calculator uses a bisection algorithm that converges to seven decimal places of accuracy in under 200 iterations.
IRR vs ROI vs CAGR: Which Should You Use?
All three metrics measure investment performance but serve different purposes:
- ROI (Return on Investment) is the simplest metric: total profit divided by total cost. It ignores timing entirely. If you invested $1,000 and received $1,400 back over two years, your ROI is 40% — the same whether the $400 arrived in month 1 or month 24. ROI is ideal for quick comparisons where timing does not matter.
- CAGR (Compound Annual Growth Rate) converts total ROI into a smoothed annual rate, assuming perfectly steady compounding. It requires only a start value, end value, and time period. CAGR is perfect for evaluating a single-asset buy-and-hold, but breaks down when there are intermediate cashflows like periodic reward claims.
- IRR handles the timing of every individual cashflow, making it the correct tool whenever you deposit or withdraw at irregular intervals. It is the preferred metric for financial professionals evaluating venture capital investments, real estate, and complex derivative strategies — and increasingly, DeFi positions.
IRR and Net Present Value (NPV)
IRR and NPV are deeply linked. NPV measures the present value of all cashflows discounted at a target rate you choose. If NPV is positive at your hurdle rate, the investment exceeds your minimum required return. IRR is the specific discount rate that drives NPV to exactly zero. Use the two together: compute IRR to see the investment's intrinsic return, then check whether that IRR clears your personal hurdle rate (e.g., the risk-free rate plus a crypto risk premium of 15–20%).
This calculator shows NPV at 0%, which is simply the sum of all undiscounted cashflows. When NPV at 0% is positive, you received more cash back than you put in — a basic profitability check before the time-value analysis begins.
Applying IRR to Yield Farming, Staking, and LP Positions
Traditional finance applies IRR to bonds, private equity, and real estate. In crypto, the same math applies to any multi-cashflow investment:
- Yield farming: Enter the initial liquidity deposit as a negative cashflow (Period 0). Each harvest or auto-compound event is a positive cashflow in the corresponding period. Final withdrawal of principal plus accrued rewards is the last positive entry. The resulting IRR tells you the true annualized return across all of those irregular reward claims.
- Staking with manual compounding: If you restake rewards every 30 days, each restake is a negative cashflow (reinvestment) and each unstake plus rewards is positive. IRR captures the compounding effect of your manual harvesting schedule.
- LP positions with fee income: Liquidity positions generate fees continuously but are usually claimed in lump sums. Enter each fee claim as a positive cashflow and the final position withdrawal as the terminal cashflow. This gives a complete picture of LP profitability including gas costs.
Gas Fees and Their Impact on IRR
Gas fees are one of the most underestimated costs in DeFi strategies. Every transaction — deposit, harvest, restake, or withdrawal — incurs a fee that reduces your effective return. The correct way to model gas is to subtract it from the cashflow for that period. If you received $200 in rewards but paid $15 in gas to claim them, your net cashflow for that period is $185.
On Ethereum mainnet during congested periods, gas can consume 5–20% of small reward claims. Using platforms with lower gas costs, batching claims, or only harvesting when rewards exceed a minimum threshold can materially improve your annualized IRR. Sites like smartmoneyapi.com aggregate on-chain data to help you track cumulative gas spend against cumulative yield, making this analysis straightforward.
Limitations of IRR
IRR is a powerful tool but has known limitations in complex scenarios:
- Multiple IRR problem: When cashflows change sign more than once (e.g., you deposit, withdraw, then deposit again), there can be multiple mathematically valid IRR solutions. Our bisection algorithm returns the IRR in the economically meaningful range (between -99.99% and 1000%), but for highly complex multi-deposit strategies, verify results make intuitive sense.
- Reinvestment assumption: IRR implicitly assumes intermediate cashflows are reinvested at the same IRR rate. In reality, those harvested rewards might sit idle or earn a different rate. Modified IRR (MIRR) addresses this but is less commonly used.
- Price volatility: IRR does not model token price changes. If you denominate cashflows in a volatile token, the USD-equivalent IRR will differ significantly from the token-denominated IRR. Always specify which currency you are measuring in.
- Smart contract risk: No return metric captures the binary risk of a smart contract exploit or project failure. IRR analysis should be complemented with qualitative assessment of protocol security.