XIRR Calculator
Annualised return for cash flows on irregular dates — the measure a real portfolio needs.
Last updated
Your details
Money you put in is negative; money you took out or still hold is positive.
Result
- XIRR
- 6.21%
- Total invested
- $20,000.00
- Total returned
- $23,000.00
- Simple return
- 15.00%
- Period
- 974 days
Annualised, weighting each flow by its own date
Net $3,000.00
Ignores timing entirely — shown for contrast
2.67 years, first flow to last
4 flows over 2.67 years…
0 = Σ CFᵢ ÷ (1 + XIRR)^(dᵢ ÷ 365)
Each flow is discounted by its own distance from the first, in days
No closed form exists — the rate is found by narrowing a bracket
NPV at 6.2128% ≈ 0
XIRR = 6.21%
Formula — written step by step
Money in on three dates, one value out…
0 = Σ CFᵢ ÷ (1 + XIRR)^(dᵢ ÷ 365)
Each flow is discounted by its own age in days
A flow 18 months old uses an exponent of 1.5
No closed form exists — the rate is bracketed and narrowed
XIRR = the true annual rate
dᵢ is the number of days between that flow and the first one. This is what separates XIRR from IRR: IRR assumes every flow is one period apart, which almost no real portfolio obeys.
A worked example
Why simple return flatters a late investment
- Invested
- 10,000 in January 2024
- Invested again
- 10,000 in July 2026
- Worth now
- 23,000 in September 2026
- Simple return = 3,000 ÷ 20,000 = 15%
- But half the money has only been in for two months
- XIRR weights each flow by its own age
- The true annual rate is far higher than 15% ÷ 2.7 years
Simple return understates it badly
Dividing a total return by the number of years assumes all the money was there the whole time. When contributions arrive late, that understates performance; when withdrawals happen early, it overstates it. XIRR is the only measure here that accounts for when the money actually arrived.
How to use this calculator
- Enter one flow per line as a date and an amount, separated by a comma.
- Money leaving you is negative — purchases and contributions. Money coming back, including the current value, is positive.
- Finish with today’s date and the current value as a positive amount, or the sale proceeds if you have sold.
- Compare the XIRR against the simple return beside it: the gap is entirely down to timing.
When periods are not equal
IRR assumes every cash flow sits one period after the last. Real investing does not work that way: contributions land when there is money to spare and withdrawals when there is a need, on dates that follow no pattern. XIRR removes the assumption by discounting each flow by its own distance from the first, measured in days.
That is the entire difference between the two. Feed XIRR a set of evenly spaced annual flows and it returns essentially what IRR does; feed it real dates and it returns something IRR cannot compute at all.
Money-weighted, and what that means
XIRR is a money-weighted return: it accounts for how much money was invested at each moment. If you happened to add a large sum just before a strong run, your XIRR reflects that good timing, and the reverse if you added just before a fall.
Fund managers are judged on time-weighted return instead, precisely because they do not control when investors add money. For your own portfolio, money-weighted is the honest measure — your timing is part of your result whether it was skill or luck.
The reinvestment assumption, and multiple roots
Like IRR, XIRR implicitly assumes interim cash flows are reinvested at the XIRR itself. For a portfolio returning 40%, that means assuming every withdrawal also earns 40% elsewhere, which is rarely true and flatters high results.
And because the underlying equation is a polynomial, a series whose sign changes more than once can have several mathematically valid answers. This calculator reports the first root above −100%. If your flows alternate repeatedly between positive and negative, treat the figure as indicative and check it against an NPV at a rate you actually believe.
Formula & methodology
What this calculator assumes
- Uses a 365-day year throughout and ignores leap days, which is the convention Excel and Google Sheets follow. Over long horizons this differs very slightly from an exact day count.
- Assumes interim cash flows are reinvested at the XIRR itself — the same optimistic assumption IRR makes, and the reason a very high XIRR should be read sceptically.
- A series whose sign changes more than once can have several mathematically valid rates. This reports the first root above −100%.
- Excludes tax, brokerage and inflation. The result is a nominal, pre-tax return.
Sources
- Brealey, Myers & Allen, Principles of Corporate Finance, 13th edition, McGraw-Hill, 2019 — the internal rate of return rule and its pitfalls.
Which return measure fits which situation
| Measure | Handles timing? | Use when |
|---|---|---|
| Simple return | No | One sum in, one sum out, period unimportant |
| CAGR | Period only | One sum in, one out, over a known span |
| IRR | Evenly spaced periods | Regular annual or monthly flows |
| XIRR | Actual dates | Contributions and withdrawals on real dates |
| Time-weighted return | Removes timing | Judging a fund manager, not your own timing |
XIRR is money-weighted: it measures what your money earned, including the effect of when you added it. Time-weighted return deliberately strips that out, which is why fund factsheets use it and your own portfolio should not.
Frequently asked questions
What is the difference between IRR and XIRR?
IRR assumes evenly spaced periods; XIRR uses the actual dates of each flow. For irregular contributions and withdrawals, only XIRR gives a meaningful annual rate.
Why must one amount be negative?
Because the calculation finds the rate at which money in and money out balance. With no outflow there is nothing to earn a return on, and no rate exists.
Should I include the current value?
Yes — enter it as a positive amount dated today. Without it the calculation only covers money you have actually taken out.
Does this use a 365-day year?
Yes, which is the convention Excel and Google Sheets follow. Leap days are ignored, so results match those tools rather than an exact day count.
Each flow, and how far it sits from the first
| Date | Amount | Years elapsed |
|---|---|---|
| 2024-01-01 | $-10,000.00 | 0.000 |
| 2024-06-01 | $-5,000.00 | 0.416 |
| 2025-01-01 | $-5,000.00 | 1.003 |
| 2026-09-01 | $23,000.00 | 2.668 |