Internal rate of return
calculates the internal rate of return for a series of periodic cash flows.Return
= irr(CashFlow
)
irr
uses the following conventions:
If one or more internal rates of returns (warning if multiple) are
strictly positive rates, Return
sets to the
minimum.
If there is no strictly positive rate of returns, but one or multiple
(warning if multiple) returns are nonpositive rates,
Return
sets to the maximum.
If no real-valued rates exist, Return
sets to
NaN
(no warnings).
Find the internal rate of return for a simple investment with a unique positive rate of return. The initial investment is $100,000 and the following cash flows represent the yearly income from the investment.
Year 1 — $10,000
Year 2 — $20,000
Year 3 — $30,000
Year 4 — $40,000
Year 5 — $50,000
Calculate the internal rate of return on the investment:
Return = irr([-100000 10000 20000 30000 40000 50000])
This returns:
Return = 0.1201
If the cash flow payments were monthly, then the resulting rate of return is multiplied by 12 for the annual rate of return.
Find the internal rate of return for multiple rates of return. The project has the following cash flows and a market rate of 10%.
CashFlow = [-1000 6000 -10900 5800]
Use irr
with a single output argument:
Return = irr(CashFlow)
A warning appears and irr
returns a 100% rate of return. The
100% rate on the project looks attractive:
Warning: Multiple rates of return > In irr at 166 Return = 1.0000
Use irr
with two output arguments:
[Return, AllRates] = irr(CashFlow)
This returns:
>> [Return, AllRates] = irr(CashFlow) Return = 1.0000 AllRates = -0.0488 1.0000 2.0488
The rates of return in AllRates
are -4.88%, 100%, and 204.88%.
Though some rates are lower and some higher than the market rate, based on the work
of Hazen, any rate gives a consistent recommendation on the project. However, you
can use a present value analysis in these kinds of situations. To check the present
value of the project, use pvvar
:
PV = pvvar(CashFlow,0.10)
This returns:
PV = -196.0932
The second argument is the 10% market rate. The present value is
-196.0932
, negative, so the project is undesirable.
[1] Brealey and Myers. Principles of Corporate Finance. McGraw-Hill Higher Education, Chapter 5, 2003.
[2] Hazen G. “A New Perspective on Multiple Internal Rates of Return.” The Engineering Economist. Vol. 48-1, 2003, pp. 31–51.