XIRR Calculator
Calculate the true annualised return on an investment where money went in and out on irregular dates, the way a real portfolio or SIP actually behaves.
How to use this calculator
- 1List every cash flow on its own line as a date and an amount: "2024-03-15, -5000".
- 2Use a negative amount for money going in (a purchase or SIP instalment) and a positive one for money coming out (a redemption or dividend).
- 3Add the current value of the holding as a final positive amount dated today — that is what turns an unfinished investment into a measurable return.
- 4Read the annualised figure against the simple return shown beside it: the gap between them is entirely the effect of when each amount was invested.
How the calculation works
Find r such that: Σ [ amount(k) ÷ (1 + r)^(days(k) ÷ 365) ] = 0- r
- The annualised rate being solved for — the XIRR
- amount(k)
- The kth cash flow: negative going in, positive coming out
- days(k)
- Days between the first cash flow and the kth one
There is no algebraic solution for r — the equation is a polynomial of arbitrary degree — so it is found numerically. This uses bisection over a bracketed range rather than Newton-Raphson: it is slower but cannot diverge, and real investment histories often have a derivative near zero where Newton's method fails badly.
Time is measured in actual days divided by 365, which is the convention spreadsheet XIRR functions use. That is why it handles February, leap years and irregular gaps without any special casing.
When the signs of the cash flows alternate more than once there can be several mathematically valid rates. This returns null rather than silently picking one, because presenting one of several answers as "the" return would be misleading.
Worked example
Four instalments, redeemed later
- 1.20,000 went in across four instalments between January 2023 and August 2024, and 24,000 came out in August 2026.
- 2.The simple return is 4,000 ÷ 20,000 = 20% — but that ignores that the first 5,000 was invested for three and a half years and the last for only two.
- 3.XIRR discounts each amount by the actual days it was invested and solves for the single annual rate that makes the whole series balance to zero.
- 4.The result is a per-year rate, directly comparable with a savings rate or a fund's published return.
Result: A single annualised rate covering all five flows
A one-off purchase and sale
- 1.10,000 was invested on 1 January 2024 and the holding was sold for 13,000 on 1 July 2026.
- 2.That is a 30% simple gain over 912 days, or roughly 2.5 years.
- 3.Annualising it: 1.30^(1 ÷ 2.4977) − 1, which works out near 11% a year rather than the 30% headline.
Result: Roughly 11% a year, not the 30% the raw gain suggests
Why a simple percentage gain is not a return
Someone who turns 20,000 into 24,000 has made 20%. That number, on its own, is nearly useless for comparison: 20% over eight months is exceptional, and 20% over eight years is worse than a savings account. A return only becomes comparable once it is expressed per year — and that requires knowing not just how long the money was invested, but which parts of it were invested for how long.
That second requirement is what makes real portfolios awkward. Money rarely goes in once and comes out once. A SIP puts money in every month; dividends come out; top-ups go in when a bonus arrives; part of a holding gets sold to fund something. Each of those amounts has spent a different length of time in the market, and averaging them is not good enough. XIRR is the standard answer: it finds the single annual rate that, applied to every amount for exactly the number of days that amount was invested, reconciles the whole history to zero.
XIRR against the alternatives
Several return measures exist and they answer genuinely different questions, which is why they disagree.
- Absolute or simple return — total gain divided by total invested. Easy to compute, and meaningless for comparison because it contains no notion of time.
- CAGR — the compound annual growth rate between one starting value and one ending value. Correct and useful, but it assumes a single lump sum with nothing added or removed in between — which almost no real portfolio satisfies.
- IRR — the same idea as XIRR but assuming cash flows arrive at equal intervals. Right for a project appraisal with annual flows, wrong for an account where money moved on the 3rd, the 17th and then eight months later.
- XIRR — IRR with actual dates. It handles any number of flows at any spacing, which makes it the correct measure for a real investment account.
- Time-weighted return — what funds publish. It deliberately strips out the effect of when investors added or removed money, so it measures the manager rather than the investor. This is why a fund's stated return and your own XIRR on that fund routinely differ.
Reading your own XIRR honestly
Because XIRR is money-weighted, it reflects your decisions as well as the market's behaviour. Adding a large sum shortly before a strong run lifts your XIRR above the fund's published return; adding it just before a fall pushes your XIRR below. That is a feature — it tells you what your money actually earned — but it means an XIRR below a fund's stated return is not necessarily evidence that the fund disappointed.
Two practical cautions apply when interpreting the number. Over very short periods, annualising exaggerates: a 5% gain over one month annualises to roughly 80%, which describes nothing sustainable. And an XIRR computed on a holding you still own depends entirely on the current value entered as the final flow, so the figure moves every day the market does.
What this assumes, and where it stops
Assumptions
- Time is measured as actual days divided by 365, matching the convention spreadsheet XIRR functions use.
- Cash flows are treated as occurring at the start of their stated date.
- The rate found is the one within a bracketed search range. Where several are mathematically valid, no single answer is reported.
- Amounts are taken as entered — no tax, brokerage or transaction cost is deducted unless you build it into the figures.
Limitations
- Cash-flow series whose sign alternates several times can have more than one valid rate, or none. This reports no answer rather than choosing one arbitrarily.
- Annualising a short holding period produces very large numbers that describe nothing durable — an XIRR over a few weeks should not be read as a yearly expectation.
- For a holding not yet sold, the result depends entirely on the current value you enter as the final cash flow, and changes whenever that value does.
- XIRR measures your money's return, not a fund's performance. It is not directly comparable with a published time-weighted return.
Common questions
What is the difference between XIRR and CAGR?
CAGR compares one starting value with one ending value and assumes nothing was added or withdrawn in between. XIRR handles any number of cash flows on any dates, weighting each by how long it was actually invested. For a single lump sum held untouched the two give the same answer; for a SIP, a portfolio with top-ups, or anything with withdrawals, CAGR simply cannot be applied correctly and XIRR is the right measure.
Why does my XIRR differ from the return the fund reports?
Because they measure different things. A fund publishes a time-weighted return, which deliberately removes the effect of when investors put money in or took it out so that the manager can be judged on their own decisions. XIRR is money-weighted and includes your timing. If you happened to invest more heavily before a strong period your XIRR will exceed the fund's figure, and if you invested before a weak one it will fall short.
Which amounts should be negative and which positive?
Money leaving your pocket and going into the investment is negative — purchases, SIP instalments, top-ups. Money coming back to you is positive — redemptions, dividends taken as cash, and the current value of whatever you still hold, dated today. The series needs at least one of each, because a rate of return is meaningless without money going both ways.
Why does the calculator sometimes refuse to give an answer?
Because the equation genuinely has no single solution for that series. When cash flows change sign several times — money in, out, in again, out again — the underlying polynomial can have multiple valid roots or none at all. Reporting one of several possible rates as though it were the answer would be misleading, so no figure is given. Simplifying the series, or splitting it into separate periods, usually resolves it.
Sources
- Mutual Fund Performance: Understanding Returns — US Securities and Exchange Commission (Investor.gov)
- Global Investment Performance Standards (GIPS) — CFA Institute
Formula and content last reviewed on .
Results are estimates for information only, not professional advice.
Related calculators
Tools people commonly use alongside the xirr calculator.