Financial function

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])
ArgumentWhat it means
valuesRequiredCash flows: at least one negative (paid out) and one positive (received).
datesRequiredThe 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.
guessOptionalStarting 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

D2fx=XIRR(B2:B6,A2:A6)
ABCD
1DateCash flow
22025-01-15-1000012.73%
32025-06-01-2500
42025-11-201200
52026-03-10-1500
62026-12-0215800

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

D2fx=XIRR(B2:B6,A2:A6)
ABCD
1DateCash flow
22026-01-0197008.05%
32026-04-01-1500
42026-07-01-1500
52026-10-01-1500
62026-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

D2fx=XIRR(B2:B6,A2:A6)
ABCD
1DateCash flow
22024-03-01-500014.39%
32024-09-15120
42025-03-14130
52025-09-15135
62026-02-276100

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.

⬇Practice workbookExamples with live formulas + practice sheets · .xlsx · 16 KB

Common errors and how to fix them

ErrorWhy it happensFix
#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.

LanguageFunction name
DanishINTERN.RENTE
DutchIR.SCHEMA
FinnishSISÄINEN.KORKO.JAKSOTON
FrenchTRI.PAIEMENTS
GermanXINTZINSFUSS
HungarianXBMR
ItalianTIR.X
Norwegian (Bokmål)XIR
Portuguese (Brazil)XTIR
Portuguese (Portugal)XTIR
RussianЧИСТВНДОХ
SpanishTIR.NO.PER
TurkishAİÇVERİMORANI