XIRR: formula
OpenStax Principles of Finance: internal rate of return IRR method
XIRR: worked example
| Initial investment | $10,000 |
|---|---|
| Cash flow 1 | $2,000 |
| Years to cash flow 1 | 0.5 years |
| Cash flow 2 | $3,500 |
| Years to cash flow 2 | 1.7 years |
| Final cash flow | $7,000 |
| Years to final cash flow | 3.2 years |
| Estimated XIRR | 10.2% |
| Net cash gain | $2,500 |
| Total positive cash flows | $12,500 |
The solver requires a finite conventional root above −100%, an initial net outlay and at least one later positive inflow. Unsupported sign patterns or a missing root produce an undefined result. The equation does not require actual reinvestment at the root.
Small time fractions can create very large annualized rates without implying a repeatable opportunity.
XIRR: changing Initial investment
| Initial investment | Estimated XIRR | Net cash gain | Total positive cash flows |
|---|---|---|---|
| $8,000 | 22.1% | $4,500 | $12,500 |
| $9,000 | 15.6% | $3,500 | $12,500 |
| $10,000 (example) | 10.2% | $2,500 | $12,500 |
| $11,000 | 5.7% | $1,500 | $12,500 |
| $12,000 | 1.8% | $500 | $12,500 |
XIRR: compare input ranges
| Input | Tested from | To | Estimated XIRR: low input | Estimated XIRR: high input | Swing |
|---|---|---|---|---|---|
| Initial investment | $9,000 | $11,000 | 15.6% | 5.7% | 9.9% (97%) |
| Years to final cash flow | 2.0 years | 4.0 years | 14.4% | 8.6% | 5.8% (57%) |
| Final cash flow | $6,300 | $7,700 | 7.6% | 12.7% | 5.1% (49%) |
| Cash flow 2 | $3,150 | $3,850 | 8.8% | 11.7% | 2.9% (29%) |
| Years to cash flow 2 | 1.0 years | 3.0 years | 11.4% | 8.7% | 2.6% (26%) |
| Cash flow 1 | $1,800 | $2,200 | 9.3% | 11.2% | 1.9% (18%) |
| Years to cash flow 1 | 1.0 years | 2.0 years | 9.8% | 9.1% | 0.704% (6.9%) |
XIRR: individual input comparisons
| Input | Value | Estimated XIRR | Net cash gain | Total positive cash flows |
|---|---|---|---|---|
| Initial investment | $8,000 | 22.1% | $4,500 | $12,500 |
| $9,000 | 15.6% | $3,500 | $12,500 | |
| $10,000 | 10.2% | $2,500 | $12,500 | |
| $11,000 | 5.7% | $1,500 | $12,500 | |
| $12,000 | 1.8% | $500 | $12,500 | |
| Cash flow 1 | $1,600 | 8.4% | $2,100 | $12,100 |
| $1,800 | 9.3% | $2,300 | $12,300 | |
| $2,000 | 10.2% | $2,500 | $12,500 | |
| $2,200 | 11.2% | $2,700 | $12,700 | |
| $2,400 | 12.1% | $2,900 | $12,900 | |
| Years to cash flow 1 | 1.0 years | 9.8% | $2,500 | $12,500 |
| 1.0 years | 9.8% | $2,500 | $12,500 | |
| 1.0 years | 9.8% | $2,500 | $12,500 | |
| 2.0 years | 9.1% | $2,500 | $12,500 | |
| 3.0 years | 8.5% | $2,500 | $12,500 | |
| Cash flow 2 | $2,800 | 7.3% | $1,800 | $11,800 |
| $3,150 | 8.8% | $2,150 | $12,150 | |
| $3,500 | 10.2% | $2,500 | $12,500 | |
| $3,850 | 11.7% | $2,850 | $12,850 | |
| $4,200 | 13.1% | $3,200 | $13,200 | |
| Years to cash flow 2 | 1.0 years | 11.4% | $2,500 | $12,500 |
| 1.0 years | 11.4% | $2,500 | $12,500 | |
| 2.0 years | 9.8% | $2,500 | $12,500 | |
| 3.0 years | 8.7% | $2,500 | $12,500 | |
| 4.0 years | 7.9% | $2,500 | $12,500 | |
| Final cash flow | $5,600 | 4.8% | $1,100 | $11,100 |
| $6,300 | 7.6% | $1,800 | $11,800 | |
| $7,000 | 10.2% | $2,500 | $12,500 | |
| $7,700 | 12.7% | $3,200 | $13,200 | |
| $8,400 | 15.0% | $3,900 | $13,900 | |
| Years to final cash flow | 1.0 years | 22.5% | $2,500 | $12,500 |
| 2.0 years | 14.4% | $2,500 | $12,500 | |
| 3.0 years | 10.7% | $2,500 | $12,500 | |
| 4.0 years | 8.6% | $2,500 | $12,500 | |
| 5.0 years | 7.2% | $2,500 | $12,500 |
XIRR: combined input changes
| Initial investment / Cash flow 1 | $1,600 | $2,000 | $2,400 |
|---|---|---|---|
| $8,000 | 19.6% | 22.1% | 24.8% |
| $9,000 | 13.5% | 15.6% | 17.8% |
| $10,000 | 8.4% | 10.2% | 12.1% |
| $11,000 | 4.1% | 5.7% | 7.3% |
| $12,000 | 0.345% | 1.8% | 3.2% |
XIRR: which assumptions move the result?
XIRR: values and definitions
| Quantity and definition | Value used |
|---|---|
| Initial investment | $10,000 |
| Cash flow 1 | $2,000 |
| Years to cash flow 1 | 0.5 years |
| Cash flow 2 | $3,500 |
| Years to cash flow 2 | 1.7 years |
| Final cash flow | $7,000 |
| Years to final cash flow | 3.2 years |
| Estimated XIRR | 10.2% |
| Net cash gain | $2,500 |
| Total positive cash flows | $12,500 |
Enter one initial outlay and up to three later nonnegative cash inflows, each timed as a year fraction from the outlay. The default times are 0.5, 1.7 and 3.2 years. This conventional-sign solver does not support later capital calls or claim to identify every root when cash flows change sign repeatedly.
Spreadsheet XIRR uses actual dated day counts, so matching year fractions matters.
Common error: Comparing an XIRR with a simple average return. They measure different things, and XIRR rewards an early return of cash even when the total gain is the same.
Investing & Returns calculators: Investment Payback Period Calculator, Average Investment Return Calculator, After-Tax Investment Return Calculator, DCA vs. Lump Sum Calculator, Dividend Reinvestment Calculator, Investment Beta Calculator.
A plain average return breaks down when money goes in and out on different dates, and XIRR handles that by using the exact timing of each cash flow. Investing $10,000, receiving $2,000 at six months, $3,500 at 1.7 years and $7,000 at 3.2 years gives a return of about 10.2 percent a year, on a net gain of $2,500. Two investments with the same gain can have very different XIRRs if one returns the money sooner.
Enter the dates as year fractions from the start and use the same sign convention for every flow: money out as negative, money in as positive.
For evenly spaced yearly flows use the IRR calculator, and for the simplest case use CAGR. To see whether timing helped you, compare with the time-weighted return. If the money was in a fund, check what the fund itself returned so you can separate the fund from your own contribution timing.
Can I enter later negative capital calls?
This simplified solver supports a single initial outlay and later nonnegative returns. A series with repeated sign changes needs a different analysis and can have multiple roots.
Does a large annualized root predict a yearly return?
No. It annualizes the entered timing. Repeating the same result across a full year is a separate assumption.
How is XIRR different from IRR?
IRR assumes cash flows arrive at equal intervals, while XIRR uses the actual date of each flow, so it fits real accounts with irregular deposits and withdrawals.
Where do I find the dates?
Your brokerage's transaction history or statements list the date and amount of each deposit, withdrawal and dividend. Convert each to years from the first date.
Why does XIRR give a huge number for a short period?
It annualizes the return, so a small gain over a few weeks becomes a large yearly rate. Treat it as a mathematical result, not a forecast.