XIRR
Calculates annualized internal rate of return for irregularly dated cash flows.
The solver uses Newton-Raphson on XNPV(rate, values, dates) = 0 with day-count basis 365.
The Formualizer engine in this repository at 0.15.0 plus unreleased changes computes the example results. Known differences from Excel are listed on this page.
Syntax
=XIRR(values, dates, [guess])
Arguments
| Argument | Type | Required | Default |
|---|---|---|---|
values | any | Required | — |
dates | any | Required | — |
guess | number | Optional | — |
Remarks
- Output is an annualized rate.
- Cash-flow sign convention requires at least one negative and one positive value.
guessdefaults to0.1and can materially affect convergence.
Error cases
- Non-numeric entries in value/date arrays are ignored; callable inputs return
#CALC!. - Returns
#NUM!for mismatched lengths, insufficient valid points, missing sign change, derivative failure, or non-convergence.
Examples
Find the rate for cash flows at irregular dates.
Formula =XIRR(A1:A3,B1:B3)
| A | B | |
|---|---|---|
| 1 | -100 | =DATE(2024,1,1) |
| 2 | 60 | =DATE(2024,9,1) |
| 3 | 55 | =DATE(2025,5,1) |
Expected result 0.153661538188134
Try this formula
This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.
Choose a different initial guess for the numerical solver.
Formula =XIRR(A1:A3,B1:B3,0.15)
| A | B | |
|---|---|---|
| 1 | -100 | =DATE(2024,1,1) |
| 2 | 60 | =DATE(2024,9,1) |
| 3 | 55 | =DATE(2025,5,1) |
Expected result 0.153661538188134
Try this formula
This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.
Use the minimum schedule of one outflow and one inflow.
Formula =XIRR(A1:A2,B1:B2)
| A | B | |
|---|---|---|
| 1 | -100 | =DATE(2024,1,1) |
| 2 | 60 | =DATE(2024,9,1) |
Expected result -0.534267986223805
Try this formula
This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.
The cash flow and date ranges must have the same length.
Formula =XIRR(A1:A3,B1:B2)
| A | B | |
|---|---|---|
| 1 | -100 | =DATE(2024,1,1) |
| 2 | 60 | =DATE(2024,9,1) |
| 3 | 55 |
Expected result #NUM!
Try this formula
This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.
Find the annualized return on four receipts spaced 365 days apart.
Formula =XIRR({-10000,2750,4250,3250,2750}, {0,365,730,1095,1460})
Expected result 0.115412783100559
Try this formula
This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.
Find the annualized return on unequally spaced receipts from a 10% starting guess.
Formula =XIRR({-5000,1200,1800,2400}, {0,180,365,730}, 0.1)
Expected result 0.0600182949212776
Try this formula
This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.
Related functions
FAQ
What data shape does XIRR require?
values and dates must have equal numeric length with at least one positive and one negative cash flow, or #NUM! is returned.