Skip to content

XIRR

Returns the annualised internal rate of return of cash flows that occur on specific dates, using actual days over a 365-day year.

Syntax

=XIRR(, , )

Financial

All versions of Excel.

Try it

Edit the formula in B5 or change the inputs. The sheet recalculates as you type.

B5
A
B
C
1
Date
Cash flow
2
01-Jan-2025
-1,000
3
01-Jan-2026
1,100
4
5
XIRR
10.00%

B5 =ROUND(XIRR(B2:B3,A2:A3),4) returns 10.00%

How XIRR works

XIRR finds the annual rate of return for cash flows that happen on irregular dates. It is the dated version of IRR. =XIRR(B2:B6,A2:A6) takes the cash flows in column B and their dates in column A and returns one annualised rate. Use it for investments with uneven deposits and withdrawals, property deals, fund returns and any cash flow list tied to real dates.

What it calculates

XIRR finds the rate at which XNPV equals zero: the rate that makes the dated cash flows discount back to nothing. Each flow is discounted by the number of days since the first date, over 365. For two flows exactly a year apart, such as -1,000 on 1 January 2025 and 1,100 on 1 January 2026, XIRR returns exactly 10%.

XIRR or IRR

IRR assumes equal gaps between cash flows and returns a rate per period. If you give it dated flows with unequal gaps, the answer is wrong. For the same three flows of -10,000, +2,000 and +9,000, six months and a year apart, IRR returns 5.39% and XIRR returns 11.09%. They differ because IRR treats the periods as equal, while XIRR counts the actual days.

Use IRR when the flows are truly regular and you want a rate per period, such as monthly. Use XIRR whenever the dates matter or the result needs to be a yearly rate.

The arguments

  • values are the cash flows with the signs showing direction. The initial outlay is the first value, negative, at the first date.
  • dates are real dates, in matching order. The first date is time zero. A text date causes #VALUE!, and an earlier date than the first one causes #NUM!.
  • guess is optional and defaults to 10%. Excel searches by trial for up to 100 attempts. If it doesn't converge, it returns #NUM!, and a closer guess can help.

Common problems

  • Zero as the first value. If the first cash flow is zero, XIRR can fail or return a wrong rate. Start the range at the first non-zero value.
  • Mismatched sizes. Values and dates must have the same number of entries.
  • Odd results. A tiny result such as 2.98023E-09 can mean the search failed. Test with a guess, and cross-check with XNPV at the result: it should be near zero.

Patterns

  • Portfolio return: list each deposit as negative, each withdrawal as positive, and put the current value as a final positive flow on today's date.
  • Hurdle test: =IF(XIRR(values,dates)>=hurdle,"Meets hurdle","Below hurdle").
  • Guarding errors: =IFERROR(XIRR(values,dates),"No rate").

The result is a decimal, so format the cell as a percentage.

Arguments

values
The cash flows, as a range or array. Money you receive is positive and money you pay is negative. There must be at least one positive and one negative value.
dates
The date of each cash flow, in the same order as values. The first date is the starting point. All other dates must be on or after it, but they can be in any order.
guessoptional
Your estimate of the rate, used as the starting point for the search. The default is 10%. Supply a closer figure if XIRR returns #NUM!.

Examples

Each example is a live sheet. Change the inputs or the formula and watch the result.

Example 1

Two flows exactly a year apart

B5 =ROUND(XIRR(B2:B3,A2:A3),4)

Result: 10.00%

365 days separate the dates, so 1,000 growing to 1,100 is exactly 10% a year.

B5
A
B
C
1
Date
Cash flow
2
01-Jan-2025
-1,000
3
01-Jan-2026
1,100
4
5
XIRR
10.00%

B5 =ROUND(XIRR(B2:B3,A2:A3),4) returns 10.00%

Example 2

Irregular dates (Excel's own example)

B8 =ROUND(XIRR(B2:B6,A2:A6),4)

Result: 37.34%

The dated flows return an annual rate of 37.34%.

B8
A
B
C
1
Date
Cash flow
2
01-Jan-2008
-10,000
3
01-Mar-2008
2,750
4
30-Oct-2008
4,250
5
15-Feb-2009
3,250
6
01-Apr-2009
2,750
7
8
XIRR
37.34%

B8 =ROUND(XIRR(B2:B6,A2:A6),4) returns 37.34%

Example 3

Cash flows six months apart

B6 =ROUND(XIRR(B2:B4,A2:A4),4)

Result: 11.09%

XIRR counts 181 days to the second flow and 365 days to the third, and returns an annual rate of 11.09%.

B6
A
B
C
1
Date
Cash flow
2
01-Jan-2025
-10,000
3
01-Jul-2025
2,000
4
01-Jan-2026
9,000
5
6
XIRR
11.09%

B6 =ROUND(XIRR(B2:B4,A2:A4),4) returns 11.09%

Example 4

The same flows treated as equal periods with IRR

B6 =ROUND(IRR(B2:B4),4)

Result: 5.39%

IRR ignores the dates and treats the flows as three equal periods, so it returns 5.39% per period. That is not a yearly rate here. Use XIRR when dates matter.

B6
A
B
C
1
Date
Cash flow
2
01-Jan-2025
-10,000
3
01-Jul-2025
2,000
4
01-Jan-2026
9,000
5
6
IRR
5.39%

B6 =ROUND(IRR(B2:B4),4) returns 5.39%

Your turn.

Solve it in the sheet. Every answer is checked, with hints if you need them.

Task 1 of 2

In B6, return the annual rate of return of the three dated cash flows.

Answer in B6.

B6
A
B
C
D
E
1
Date
Cash flow
Hurdle rate
8.0%
2
01-Jan-2025
-10,000
3
01-Jul-2025
2,000
4
01-Jan-2026
9,000
5
6
XIRR
7
Decision
8
9

Common mistakes

  • Dates must be real dates, in the same order and number as the values. A text date causes #VALUE!, and mismatched sizes cause #NUM!.
  • A date earlier than the first one causes #NUM!. Sort the flows so the first row is the earliest, or at least make sure the first date is the earliest.
  • A zero as the first cash flow can break the search. Start the range at the first non-zero flow.
  • There must be at least one negative and one positive flow. Otherwise the result is #NUM!.
  • XIRR can return a tiny number such as 0.000000003 when the search fails. Treat that as a failed result, and supply a guess.

Questions people ask

What is the difference between IRR and XIRR?

IRR assumes equal gaps between flows and returns a rate per period. XIRR uses the actual dates and returns an annual rate, so it suits irregular cash flows.

Why does XIRR return #NUM!?

The flows may not include both a positive and negative value, a date may be earlier than the first date, or the search didn't converge. Try a closer guess.

Does XIRR need the dates sorted?

Only the first date must be the earliest. The others can be in any order, as long as each value sits next to its own date.

How do I calculate a portfolio return with XIRR?

List each deposit as a negative value and each withdrawal as a positive one, each on its date, and add the current value as a final positive flow dated today.

Is the XIRR result annual?

Yes. It uses actual days over a 365-day year, so the result is an annual rate whatever the spacing.

Learn XIRR in a real sheet.

XIRR is taught in Dates and financial modelling, lesson 20: Internal rate of return with IRR and XIRR. Each lesson is a short, graded exercise like the one above.