Excel XIRR: annualized return on irregular cash flows
XIRR answers the question IRR cannot: what did this investment actually earn per year when the money moved on dates that were not one period apart? This guide covers the three arguments, one worked example you can rebuild in a minute, and the four reasons XIRR returns #NUM! on real spreadsheets.
XIRR syntax and arguments
XIRR returns the annualized internal rate of return for a series of cash flows that arrive on uneven dates. IRR assumes every cash flow is exactly one period apart; XIRR reads the actual dates, so a payment on 3 March and another on 30 September are 211 days apart, not “one period”. Values and dates must be the same length and in the same order.
The cash flows. Money you pay out is negative, money you receive is positive. You need at least one of each, otherwise XIRR returns #NUM!.
The date of each cash flow, same length and order as values. Every entry must be a real date value — text like "2024-01-01" stored as text returns #NUM!.
A starting point for the iterative search. Leave it out and Excel starts at 0.1 (10%). Change it when you get #NUM! on a series that should converge, or when the result is suspiciously far from the guess.
XIRR example: one payment in, four receipts, uneven years
10,000 paid in on 1 January 2024, then four receipts at the turn of each year. The gaps are 366, 365, 365 and 366 days: close enough to a year that IRR happens to agree here — which is exactly why you should not rely on the coincidence.
| Date | Cash flow |
|---|---|
| 2024-01-01 | -10,000 |
| 2025-01-01 | 2,000 |
| 2026-01-01 | 2,500 |
| 2027-01-01 | 3,000 |
| 2028-01-01 | 4,000 |
XIRR returns 5.21% (0.0521 once formatted as a percentage). =IRR(B2:B6) also returns 5.21% here, because every gap is roughly one year. Move any date and the two answers split.
XIRR vs IRR: same cash flows, different answers
Now switch the same cash to a half-yearly pattern: 10,000 invested on 1 January 2024, three receipts of 500 six months apart, then a final 9,800 on 1 January 2026. IRR reads those five numbers as five equal years. XIRR reads the calendar.
| Function | Result | What it assumed |
|---|---|---|
=XIRR(values, dates) | 6.77% | Actual days between payments (365-day year) |
=IRR(values) | 3.34% | Every payment exactly one period apart |
The 3.43 point gap is not a rounding difference — it is two different questions. IRR is only the right tool when your periods really are equal (monthly, quarterly, annual), and even then XIRR will give the same answer if your dates line up.
Half-yearly series over two years
XIRR vs CAGR: when there is only one payment in and one out
With a single investment and a single exit, CAGR and XIRR describe the same growth rate. CAGR divides by whole years; XIRR divides by actual days. Use XIRR when the money is already in a table with dates, and CAGR when you only have two numbers and a year count.
| Method | Formula | Result |
|---|---|---|
XIRR | =XIRR({-10000;12500}, {DATE(2024,1,1);DATE(2026,1,1)}) | 11.79% |
| CAGR | =(12500/10000)^(1/2)-1 | 11.80% |
The 0.01 point difference is the leap year: the span is 731 actual days, so XIRR’s 365-day basis makes it a touch more than two years, while CAGR counts exactly two.
Four XIRR mistakes that show up on real spreadsheets
1. Values must have both signs
XIRR solves for the rate that sets the net present value of all cash flows to zero. With only inflows, or only outflows, there is no solution and Excel returns #NUM!. Enter the investment as a negative number.
2. Dates stored as text silently break it
If the dates column was pasted from a CSV and left-aligned, XIRR returns #NUM!. Check with =ISNUMBER(A2) — it must be TRUE. DATEVALUE or Text to Columns fixes it, but the values then need re-linking.
3. XIRR is not IRR with dates attached
IRR assumes equal periods. On half-yearly flows, IRR reads five flows as five years and can report 3.34% where XIRR reports 6.77%. If the dates are irregular, only XIRR is meaningful.
4. The 365-day year is fixed
Excel discounts with (d − d0)/365 regardless of leap years, so the answer can differ in the third decimal from a solver that uses 365.25. That is a definition, not an error — do not “fix” it by nudging dates.
Excel vs Google Sheets
Microsoft Excel (365 / Desktop)
XIRR is a built-in worksheet function in Excel 2007 and later, Microsoft 365, and Excel for the web — no add-in or Analysis ToolPak needed.
Google Sheets
Google Sheets has XIRR with the same values / dates / guess order and the same 365-day basis, so a workbook copied between the two returns the same rate.
FAQ
What does XIRR do in Excel?
XIRR returns the annualized internal rate of return for a series of cash flows that happen on specific, irregular dates. It solves for the discount rate that makes the net present value of all the cash flows equal zero, using actual days between payments.
Should I use XIRR or IRR?
Use XIRR when your cash flows have real dates that are not evenly spaced — which is most of the time in investing and project finance. Use IRR only when every cash flow is exactly one period apart, and remember IRR will misread a half-yearly series as annual.
Why does XIRR return #NUM!?
Four usual causes: (1) all cash flows have the same sign, so no rate can zero the net present value; (2) the dates are stored as text instead of date values — check with =ISNUMBER(); (3) values and dates are different lengths; (4) the iteration did not converge, which a different guess argument often fixes.
How does XIRR count days?
XIRR discounts with (date − first date) / 365 regardless of leap years. That 365-day basis is fixed by definition, so results can differ in the third decimal from tools that use 365.25 — do not nudge dates to compensate.
Does XIRR work in Google Sheets?
Yes. Google Sheets has XIRR with the same values / dates / guess order and the same 365-day basis, so a sheet moved between Excel and Sheets keeps the same rate.
Can XIRR handle monthly cash flows?
Yes — that is its main advantage over IRR. List each month's flow with its real date and XIRR returns an annualized rate directly. If you want a monthly rate instead, use XIRR then convert: (1 + XIRR)^(1/12) − 1.
Is XIRR the same as CAGR?
Only when there is exactly one investment and one exit. CAGR uses whole years; XIRR uses actual days, so they converge but rarely match to the decimal. With any interim cash flow in either direction, CAGR cannot be used at all.