How To Calculate IRR In Excel (2026)
IRR is the yearly rate of return that makes a series of cash flows break even in today’s money.
Excel calculates it with the IRR function, which needs only one range of cash flows.
This guide shows the exact formula, a worked example from Microsoft, and what to do when Excel returns #NUM!.
Table of Contents
- Quick answer: the IRR formula
- What IRR tells you
- IRR syntax and arguments
- Calculate IRR in Excel step by step
- Worked example from Microsoft
- Why the order of cash flows matters
- When to use the guess argument
- Fix the #NUM! error
- Check IRR with the NPV function
- Use XIRR when dates are not regular
- Which function to pick
- Checklist before you press Enter
- Limits of IRR
- Official Microsoft pages
- More Word, Excel and PowerPoint guides
Quick answer: the IRR formula
| Step | What to enter |
|---|---|
| Cash flows | Put the starting cost as a negative number, then each later income as a positive number, in order |
| Formula | =IRR(A2:A7) |
| Result | A decimal that you format as a percentage |
Select the result cell and press Ctrl+Shift+% to show it as a percentage.
What IRR tells you
Microsoft describes IRR as the internal rate of return for a series of cash flows.
The cash flows do not have to be equal, but they must happen at regular intervals such as monthly or yearly.
IRR is also the discount rate at which the net present value of those cash flows equals zero.
A higher IRR means the investment earns a higher rate on the money put in.
IRR syntax and arguments
The syntax is IRR(values, [guess]).
| Argument | Required | What it means |
|---|---|---|
| values | Yes | A range or array of cash flows with at least one positive and one negative number |
| guess | No | A number you think is close to the answer; Excel uses 0.1 (10 percent) if you leave it out |
Text, logical values and empty cells inside the range are ignored.
Calculate IRR in Excel step by step
- Type the starting investment in A2 as a negative number, for example -70000.
- Type each later year’s net income in A3, A4 and so on, one cell per period.
- Click an empty cell and type =IRR(A2:A7).
- Press Enter, then press Ctrl+Shift+% to show the result as a percentage.
Keep the cash flows in a single column or row with no gaps in the timeline.
Worked example from Microsoft
Microsoft’s example treats a business that costs $70,000 and returns income over five years.
| Cell | Value | Meaning |
|---|---|---|
| A2 | -70,000 | Initial cost |
| A3 | 12,000 | Year 1 net income |
| A4 | 15,000 | Year 2 net income |
| A5 | 18,000 | Year 3 net income |
| A6 | 21,000 | Year 4 net income |
| A7 | 26,000 | Year 5 net income |
| Formula | Description | Result |
|---|---|---|
| =IRR(A2:A6) | Return after four years | -2.1% |
| =IRR(A2:A7) | Return after five years | 8.7% |
The same business loses money if you stop after four years and earns 8.7 percent a year if it runs for five.
Why the order of cash flows matters
IRR reads the values in the order you list them and treats each as the next period.
If you sort the column or enter the income before the cost, the answer changes.
Enter payments and income in the sequence they happen, with the first cash flow at the top or left.
Use a zero for a period with no cash flow instead of leaving a gap, because empty cells are ignored and would shorten the timeline.
When to use the guess argument
Excel calculates IRR by trial and error, starting from the guess and refining it until the result is accurate to 0.00001 percent.
If it cannot find an answer after 20 tries, IRR returns #NUM!.
| Formula | Description | Result |
|---|---|---|
| =IRR(A2:A4,-10%) | Two-year return with a guess of -10% | -44.4% |
Microsoft uses a guess here because the two-year calculation did not settle on the default of 10 percent.
In most cases you do not need to supply a guess.
Fix the #NUM! error
- Check that the range holds at least one negative and one positive number.
- Check that the cash flows are numbers and not text that only looks like numbers.
- Type a different guess, such as a negative or a much larger percentage, and press Enter.
- Make sure the range has the cash flows in order and covers every period.
For a full list of Excel error values, see our guide to Excel formula errors.
Check IRR with the NPV function
Because IRR is the rate where net present value is zero, you can test the answer with NPV.
Microsoft shows NPV(IRR(A2:A7),A2:A7) returning 1.79E-09, which is effectively zero within the calculation’s accuracy.
A result that tiny confirms the IRR is correct for that range.
Use XIRR when dates are not regular
IRR assumes equal gaps between cash flows.
When payments fall on specific dates, Microsoft points to XIRR, which has the syntax XIRR(values, dates, [guess]).
| Point | IRR | XIRR |
|---|---|---|
| Timing | Regular intervals | Dates you choose |
| Syntax | IRR(values, [guess]) | XIRR(values, dates, [guess]) |
| Iteration limit | 20 tries | 100 iterations |
| Default guess | 10% | 10% |
In Microsoft’s XIRR example, the formula =XIRR(A3:A7, B3:B7, 0.1) returns 0.373362535, or 37.34%.
Enter dates with the DATE function or as formula results, because text dates cause problems.
Which function to pick
Microsoft lists five related functions for discounted cash flows, and each fits a different layout of data.
| Function | Use it when |
|---|---|
| IRR | Cash flows come at regular intervals |
| XIRR | Cash flows come on irregular dates |
| NPV | You want today’s value at a rate you choose, with regular intervals |
| XNPV | You want today’s value at a rate you choose, with irregular dates |
| MIRR | Regular intervals, with a separate borrowing rate and reinvestment rate |
Microsoft says NPV shows whether a project beats a desired rate of return, while IRR gives the specific rate the project earns.
Both can be used to compare competing projects.
Checklist before you press Enter
Run through these points whenever the answer looks wrong.
- The first cash flow is the starting cost and is negative.
- Every later cash flow is entered in time order, one per period.
- The periods are all the same length, such as all months or all years.
- Periods with no cash flow hold a zero, not a blank cell.
- The result cell is formatted as a percentage so 0.087 reads as 8.7%.
Limits of IRR
Microsoft says IRR has a single value when all negative cash flows come before all positive ones, or when there is only one negative cash flow.
Some patterns of cash flow produce more than one acceptable IRR, or none.
Excel returns the first acceptable answer it finds, so a different guess may give a different result.
To compare a rate with growth over time, our CAGR guide and compound interest guide cover related calculations.
Official Microsoft pages
These pages are the source for every setting and example above.