Skip to content
Plaintools

XIRR calculator

Calculate the exact annualized internal rate of return (XIRR) for investment portfolios, private equity, angel checks, real estate capital calls, or dividend streams with irregular calendar dates. Pure client-side Newton-Raphson solver with automatic bisection fallback.

Runs locally · No data uploaded · Newton-Raphson solver

Dated Cash Flows

Negative (−) for investments or contributions; positive (+) for returns, dividends, or current valuation.

#Date (YYYY-MM-DD)Amount ($)TypeAction
1Outflow (Investment)
2Outflow (Investment)
3Inflow (Return)
4Inflow (Return)
Annualized Return (XIRR)
+16.13%across 2 years (730 days)
Total invested (outflows)
$12,500.00
Total returned (inflows)
$16,500.00
Net profit / gain
$4,000.00
Timeline
2022-01-15 → 2024-01-15
Cash flow timeline (chronological order)
#DateAmountDay offsetYear fraction
12022-01-15-$10,000.00+0 days0.000 yrs
22022-07-01-$2,500.00+167 days0.458 yrs
32023-03-15$1,000.00+424 days1.162 yrs
42024-01-15$15,500.00+730 days2.000 yrs

Disclaimer: Not financial advice. Extended Internal Rate of Return (XIRR) calculations assume all returns are reinvested at the calculated rate and does not account for taxes, inflation, or transaction commissions.

Looking for loan amortization and payment notes? Use the Seller financing calculator, Owner financing calculator, or Pool financing calculator.

XIRR calculator example

4-stage investment with $10,000 initial and $16,500 total exit

2022-01-15: -$10,000; 2022-07-01: -$2,500; 2023-03-15: +$1,000 dividend; 2024-01-15: +$15,500 exit. Yields an annualized XIRR of 16.13% over 2.0 years.

XIRR calculator how-to

  1. Validate at least two cash flows, at least one negative flow, and at least one positive flow.
  2. Sort cash flows by date ascending. Compute yearsFromStart = (timestamp_i - timestamp_0) / (365 * 86400000).
  3. Define Net Present Value NPV(r) = sum(amount_i / (1 + r)^yearsFromStart_i) and derivative dNPV(r).
  4. Find root r where NPV(r) = 0 using Newton-Raphson starting at r = 0.10.
  5. If Newton-Raphson does not converge within 60 iterations, fall back to bracketed search and bisection across r in [-0.999, 100].
  6. Format annualized rate as percentage (rate * 100) with two decimal places.

Related tools

Finance

Pool loan calculator

Calculate swimming pool loan monthly payments, total interest, down payment, and payoff schedule.

Finance

Break even calculator

Calculate how many units you need to sell to cover fixed overhead and reach profit goals.

Finance

Retirement corpus calculator

Calculate the required retirement corpus, future monthly living expenses adjusted for inflation, and required monthly savings.

Finance

GST calculator

Calculate Indian Goods and Services Tax (GST), CGST, SGST, IGST, and net/gross invoice values client-side.

Finance

EMI calculator

Calculate loan EMI, interest payments, and view full amortization schedule with CSV export. Runs client-side.

Finance

NPV calculator

Calculate Net Present Value (NPV), Profitability Index, IRR, and discounted payback periods for capital investment projects. Free browser DCF solver.

People also use

Finance

UK VAT calculator

Add or extract UK VAT at 20%, 5%, or 0% from a net or gross amount.

XIRR calculator FAQ

What is an XIRR calculator and how does it evaluate investments?
It calculates your real annual return when deposits and withdrawals happen on uneven dates. Plain CAGR only looks at start and end numbers, whereas XIRR factors in when each top-up, SIP instalment, or dividend actually arrived.
What is XIRR and how does it differ from regular IRR?
Standard IRR assumes cash flows occur at equal, periodic intervals (such as every month or every year). XIRR (Extended Internal Rate of Return) accounts for exact calendar dates and calculates the true annualized rate of return across irregular investment contributions, capital calls, dividends, and distributions.
Why do some cash flows need to be negative and others positive?
Cash flows represent money entering or leaving your pocket. Negative numbers represent cash outflows (money you invested, purchase price, or capital additions). Positive numbers represent cash inflows (dividends received, cash distributions, or current portfolio valuation at exit).
How does this calculator solve for XIRR in the browser?
The calculator calculates the discount rate r where Net Present Value (NPV) equals zero. It uses the Newton-Raphson iterative algorithm. If the derivative vanishes or oscillations occur, it automatically falls back to a bracketed bisection search.
What causes an XIRR calculation to show an error?
XIRR requires at least two cash flows spanning at least two different calendar days. There must be at least one negative amount (investment) and at least one positive amount (return/valuation). If all numbers share the same sign, NPV can never cross zero and no rate of return exists.
Can I use this for SIPs, mutual funds, and stock portfolios?
Yes. Enter each purchase date with a negative amount and your current portfolio value as of today's date as a positive amount. The resulting percentage is your annualized return (CAGR adjusted for cash flow timing).
How is XIRR calculated without this page?
Given cash flows (d_i, C_i) for i = 0..n-1, let t_i = (d_i − d_0) / 365. Find rate r > −1 such that NPV(r) = sum(C_i / (1 + r)^t_i) = 0. Compute derivative dNPV(r) = sum(−t_i × C_i / (1 + r)^(t_i + 1)). Start with initial guess r_0 = 0.10. Iterate r_{k+1} = r_k − NPV(r_k) / dNPV(r_k) until |NPV(r)| < 1e-7. If Newton diverges, find bracket [a, b] where NPV(a) × NPV(b) ≤ 0 and bisect.