Sub topic 13
How Excel Solves for IRR and When It Fails
Excel calculates IRR by searching for the discount rate that makes the cash flow's NPV equal to zero. This chapter assumes you understand cell references, ranges, percentages, compound interest, and basic Excel dates.
The IRR problem Excel is solving
For periodic cash flows, IRR is the rate \(r\) that satisfies:
\[ 0 = CF0 + \frac{CF1}{(1+r)^1} + \frac{CF2}{(1+r)^2} + \cdots + \frac{CFn}{(1+r)^n} \]
Excel does not usually rearrange this equation into a simple formula. Instead, it tests possible rates and updates its estimate until the calculated NPV is close enough to zero.
The cash flows must contain at least one negative value and one positive value. A negative value usually represents an investment or payment. A positive value usually represents a receipt or return.
B3:B7 contain:
-10000
3000
4000
4000
3000
=IRR(B3:B7)The result is a periodic rate. If the cash flows are annual, the result is an annual rate. If they are monthly, the result is a monthly rate.
What the guess argument does
The optional guess argument gives Excel its starting estimate:
=IRR(B3:B7, 0.10)This tells Excel to begin searching near 10%. It does not force the answer to be 10%, and it does not change the definition of IRR. It can help when the default starting point does not lead to a solution quickly.
For dated cash flows, use the same idea with XIRR:
=XIRR(B3:B7, A3:A7, 0.10)XIRR returns an annualized rate and uses the actual number of days between the dates.
Diagnosing convergence errors
#NUM! commonly means Excel could not find a rate that satisfies the equation from its search path. Try a reasonable guess based on the project economics:
=IRR(B3:B7, 0.25)
=XIRR(B3:B7, A3:A7, 0.25)If one guess fails, try several guesses. A successful result is not automatically the correct business answer. Check it by substituting the result into NPV or XNPV:
=NPV(IRR(B3:B7), B4:B7) + B3
=XNPV(XIRR(B3:B7, A3:A7), B3:B7, A3:A7)Both checks should be close to zero.
#VALUE! usually indicates invalid input. Check that cash-flow ranges contain numbers, dates are real Excel dates rather than text, and the cash-flow and date ranges have the same length.
Exercise
An IRR formula returns #NUM!. What should you check and try first?
Show answer
Confirm that the cash flows include at least one negative and one positive number, check for invalid or text values, and retry with a reasonable explicit guess such as 10% or 25%. Then verify the result by calculating NPV at that rate.