Sub topic 8
Using Excel's IRR function
This chapter assumes you can enter formulas and ranges in Excel and that you know what NPV is. The previous chapters covered NPV and the t=0 timing pitfall. Here you will learn the syntax of IRR, how it treats your range, how to annualize its result, and how to fix its most common errors.
What the function does
IRR finds the rate at which the NPV of a series of cash flows equals zero. Its syntax is:
=IRR(values, [guess])valuesis a range or array of cash flows.guessis an optional starting estimate for the solver. The default is 10% (0.1).
The result is a rate per period. If your cash flows are yearly, it is an annual rate. If they are monthly, it is a monthly rate.
The key difference from NPV
NPV discounts the first value in its range by one full period, so you keep the t=0 cash flow outside the function. IRR has no such offset. It treats the first value as the starting point, so you include the t=0 outflow in the range.
Consider a project with an 8% discount rate and these cash flows:
| Cell | Period | Cash flow |
|---|---|---|
| B3 | 0 | -10000 |
| B4 | 1 | 3000 |
| B5 | 2 | 4000 |
| B6 | 3 | 4000 |
| B7 | 4 | 3000 |
The IRR formula covers the whole range, B3 through B7:
=IRR(B3:B7)This returns about 14.9%. Check it by substituting the result back into the NPV formula from the previous chapter. The result should be close to zero:
=NPV(IRR(B3:B7), B4:B7) + B3At an 8% discount rate the same project has an NPV of about 1,588. The IRR is above 8%, so the project clears that hurdle.
Rules `IRR` applies to your range
The function follows a few rules that cause errors when you overlook them.
- Order defines timing. Excel reads values in the order they appear. Position 1 is t=0, position 2 is t=1, and so on. Sorting the range changes the answer.
- Periods must be equally spaced.
IRRhas no date input. It assumes every step is the same length. For irregular dates, useXIRR(covered later in this tutorial). - You need both signs. The values must include at least one negative and one positive number. Otherwise no rate can bring NPV to zero, and Excel returns
#NUM!. - Blanks and text are skipped, zeros are not. If a cell in the range is empty or contains text, Excel ignores it. The cash flows after it then move one period earlier. A cell holding
0is kept as a real period.
The fourth rule is the one that does the most damage in practice, because no error appears. Suppose a model leaves the cell for year 2 empty instead of entering 0:
| Period | 0 | 1 | 2 | 3 |
|---|---|---|---|---|
| Intended | -1000 | 400 | 0 | 900 |
| Cell contents | -1000 | 400 | (empty) | 900 |
With the empty cell, IRR sees three values (-1000, 400, 900) and treats 900 as arriving in year 2. The result is overstated.
Annualizing a periodic IRR
A monthly series gives a monthly IRR. To turn it into an effective annual rate, compound it over 12 periods:
Monthly IRR:
=IRR(B3:B38)
Effective annual rate:
=(1 + IRR(B3:B38))^12 - 1Do not multiply the monthly rate by 12. That gives a nominal annual rate, which understates the effective rate. For quarterly data, use an exponent of 4. Label which version your model reports, because "annual IRR" is ambiguous without it.
For example, a monthly IRR of 1% gives a nominal rate of 12% and an effective annual rate of about 12.68%.
How the solver works and why it fails
IRR cannot be calculated with a closed-form formula for more than a few periods, so Excel searches for it. It starts from the guess and refines the estimate step by step. It stops when the result is accurate to 0.00001%, and it gives up after 20 attempts, returning #NUM!.
This has two consequences:
- A poor guess can make the solver fail even when a valid IRR exists. Supplying a closer value often fixes it, for example
=IRR(B3:B7, 0.2). - When several valid IRRs exist, the result depends on the guess. Different guesses can return different answers, and Excel does not warn you.
The multiple-IRR problem is covered in a later chapter. For now, treat it as a reason not to trust an IRR from cash flows that change sign more than once.
Common errors
| Symptom | Likely cause | Fix |
|---|---|---|
| `#NUM!` | All cash flows have the same sign | Check signs and that the t=0 outflow is in the range |
| `#NUM!` | Solver did not converge in 20 tries | Pass a `guess` closer to the expected rate |
| `#VALUE!` | `values` is not a range or array of numbers, or a cell reference points to text only | Make sure the range holds numbers |
| IRR looks too high | Blank cell shifted later flows earlier | Enter 0 for empty periods |
| IRR is 0.1 or 0.01 off from the expected value | A percentage was entered as a whole number, such as 8 instead of 8% | Use consistent units |
| Annual figure is far too low | Monthly IRR reported as annual | Compound it with `(1+IRR)^12-1` |
Cross-checking the result
An IRR is only worth reporting if NPV at that rate is approximately zero. Build this check beside the result:
=ROUND(NPV(IRR(B3:B7), B4:B7) + B3, 4)The result should be 0, or very close to it. A non-zero value means the solver stopped early or the range is wrong. Note that this check uses the same cash flows, so it confirms the solver worked. It does not confirm the cash flows are correct.
Exercise
A project has cash flows in B2:B5 of -1000, 0, 0, 1331, with one value per year starting at t=0. A colleague deletes the 0 in B3 and B4 so they are empty cells. What does IRR(B2:B5) calculate now, and what is the IRR of the original series?
Show answer
With the cells empty, Excel ignores them, so IRR sees only -1000 and 1331 as two consecutive periods. That gives a rate of 33.1%. With the zeros in place, 1331 arrives in year 3, so the IRR solves (1+r)^3 = 1.331, which gives r = 10%.
Exercise
A model has 24 monthly cash flows in C3:C26, with the t=0 outflow in C3. Write a formula for the effective annual IRR, and explain why multiplying the monthly IRR by 12 would be wrong.
Show answer
=(1+IRR(C3:C26))^12-1. Multiplying by 12 ignores compounding within the year, so it gives a nominal rate that is lower than the effective annual rate.