XIRR function
Returns the annual internal rate of return for cash flows that happen on irregular dates.
Available in Excel 2007 and later (earlier versions needed the Analysis ToolPak add-in), Excel for the web
Excel 2007 and laterWorks in Google Sheets
Syntax
XIRR(values, dates, [guess])| Argument | What it means | |
|---|---|---|
values | Required | Cash flows: at least one negative (paid out) and one positive (received). |
dates | Required | The date of each cash flow, same size as values. The first date is treated as the start; others may be in any order but must not be earlier than it. |
guess | Optional | Starting estimate, default 10%. |
Returns: An annual rate of return (format as a percentage).
How XIRR works
Real investments rarely pay out on neat anniversaries. You top up a fund in June, receive a dividend in November, add more in March and sell in December. XIRR handles exactly that: give it the amounts and their actual dates and it returns the annualised rate of return, the figure fund managers and private-equity reports quote.
XIRR finds the rate at which the dated cash flows have a net present value of zero, discounting each flow by (1+rate)^(days/365) from the first date. The answer is always an annual rate, whatever the spacing of the dates. Like IRR, it iterates from the guess (10%) and returns #NUM! if it cannot converge.
Signs matter: contributions or purchases are negative, withdrawals, dividends and the final value are positive.
Examples
1Annual return on a personal investment
| A | B | C | D | |
|---|---|---|---|---|
| 1 | Date | Cash flow | ||
| 2 | 2025-01-15 | -10000 | 12.73% | |
| 3 | 2025-06-01 | -2500 | ||
| 4 | 2025-11-20 | 1200 | ||
| 5 | 2026-03-10 | -1500 | ||
| 6 | 2026-12-02 | 15800 |
Result: 12.73%
Three contributions (negative), one dividend and the value today (positive). The annualised return over the ~23 months is 12.73% (cell formatted as %).
2True cost of a loan with an up-front fee
| A | B | C | D | |
|---|---|---|---|---|
| 1 | Date | Cash flow | ||
| 2 | 2026-01-01 | 9700 | 8.05% | |
| 3 | 2026-04-01 | -1500 | ||
| 4 | 2026-07-01 | -1500 | ||
| 5 | 2026-10-01 | -1500 | ||
| 6 | 2026-12-31 | -5800 |
Result: 8.05%
A $10,000 loan with a $300 fee deducted means you actually receive 9,700. Repaying 10,300 in total over the year gives an effective annual cost of 8.05%, higher than the headline rate suggests.
3Return on a share holding including dividends
| A | B | C | D | |
|---|---|---|---|---|
| 1 | Date | Cash flow | ||
| 2 | 2024-03-01 | -5000 | 14.39% | |
| 3 | 2024-09-15 | 120 | ||
| 4 | 2025-03-14 | 130 | ||
| 5 | 2025-09-15 | 135 | ||
| 6 | 2026-02-27 | 6100 |
Result: 14.39%
Shares bought for 5,000, three half-yearly dividends, then sold for 6,100 about two years later. Counting dividends on their real dates, the annual return is 14.39% (cell formatted as %). Check it with =XNPV(D2,B2:B6,A2:A6), which returns zero.
Common errors and how to fix them
| Error | Why it happens | Fix |
|---|---|---|
#NUM! | No sign change in the values, a date earlier than the first date, or no convergence. | Check signs and dates; try a different guess. |
#VALUE! | A date is not a valid date, or values and dates have different sizes. | Use real date cells and equal-sized ranges. |
Tips
- XIRR always returns an annual rate, even for flows a few days apart — short periods can give extreme percentages.
- Put the earliest cash flow first; Excel uses the first date as day zero.
- XIRR uses a 365-day year with no leap-year adjustment.
Questions
What is the difference between IRR and XIRR?
IRR assumes equally spaced periods and returns a rate per period. XIRR uses real dates and always returns an annual rate.
How do I include the current value of my portfolio?
Add it as a positive final cash flow dated today, as if you sold everything.
Why is XIRR huge for a short period?
Annualising a gain earned over a few weeks compounds it as if it repeated all year.
Google Sheets
XIRR also exists in Google Sheets and works the same way for everyday use, so the examples above work there too.
XIRR in other languages
In a non-English version of Excel the function has a local name. Excel translates formulas automatically when a file is opened in another language.
| Language | Function name |
|---|---|
| Danish | INTERN.RENTE |
| Dutch | IR.SCHEMA |
| Finnish | SISÄINEN.KORKO.JAKSOTON |
| French | TRI.PAIEMENTS |
| German | XINTZINSFUSS |
| Hungarian | XBMR |
| Italian | TIR.X |
| Norwegian (Bokmål) | XIR |
| Portuguese (Brazil) | XTIR |
| Portuguese (Portugal) | XTIR |
| Russian | ЧИСТВНДОХ |
| Spanish | TIR.NO.PER |
| Turkish | AİÇVERİMORANI |