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

StepWhat to enter
Cash flowsPut the starting cost as a negative number, then each later income as a positive number, in order
Formula=IRR(A2:A7)
ResultA 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]).

ArgumentRequiredWhat it means
valuesYesA range or array of cash flows with at least one positive and one negative number
guessNoA 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

  1. Type the starting investment in A2 as a negative number, for example -70000.
  2. Type each later year’s net income in A3, A4 and so on, one cell per period.
  3. Click an empty cell and type =IRR(A2:A7).
  4. 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.

CellValueMeaning
A2-70,000Initial cost
A312,000Year 1 net income
A415,000Year 2 net income
A518,000Year 3 net income
A621,000Year 4 net income
A726,000Year 5 net income
FormulaDescriptionResult
=IRR(A2:A6)Return after four years-2.1%
=IRR(A2:A7)Return after five years8.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!.

FormulaDescriptionResult
=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]).

PointIRRXIRR
TimingRegular intervalsDates you choose
SyntaxIRR(values, [guess])XIRR(values, dates, [guess])
Iteration limit20 tries100 iterations
Default guess10%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.

FunctionUse it when
IRRCash flows come at regular intervals
XIRRCash flows come on irregular dates
NPVYou want today’s value at a rate you choose, with regular intervals
XNPVYou want today’s value at a rate you choose, with irregular dates
MIRRRegular 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.

Leave a Reply

Your email address will not be published. Required fields are marked *