# Math Help - Internal rate of return

1. ## Internal rate of return

Hi,

If you want to calculate the internal rate of return (IRR), how do you isolate r ?

Like for example 4000 = 1200 / (1+r)^1 + 1410 / (1+r)^2 + 1875 / (1+r)^3 + 1050 / (1+r)^4

Do you have to use the secant method, or is there another way to do it ?

2. ## Re: Internal rate of return

Ok, I found a way to do it using the financial calculator.

3. ## Re: Internal rate of return

Originally Posted by Nombredor
Hi,

If you want to calculate the internal rate of return (IRR), how do you isolate r ?

Like for example 4000 = 1200 / (1+r)^1 + 1410 / (1+r)^2 + 1875 / (1+r)^3 + 1050 / (1+r)^4

Do you have to use the secant method, or is there another way to do it ?
To find IRR - internal rate of return of a investment, one has to resort to using iterative methods as you have suggested one called the Secant method. The trouble with finding IRR is that there are no IRR formulas when number of cash flows exceed 5.

If the number of cash flows are limited to two, the interest rate may be derived or found using the single sum investment formula as follows

PV(1+i)^n + FV = 0

or

PV + FV(1+i)^-n = 0

which comes to this

i = [-FV/PV]^(1/n)- 1

or

i = [FV/-PV]^(1/n) - 1

If there are 3 cash flows then you can get the IRR values from quadratic formula

i = [ -b +/- b^2 - 4ac ] / 2a

here you will get two IRR solutions

If there are 4 cash flows then you can get the IRR values from cubic formula

If there are 5 cash flows then you can get the IRR values from quartic formula

Solving cubic and quartic formulas is quite difficult and consumes time

For number of cash flows exceeding 5, one has to make use of iterative techinques also referred to as numerical methods. There are many such methods developed over the years ranging from the trivial one such as bi-section method that sets up a lower and upper bound and then uses the binary search to seek the IRR value. If the IRR happens to be out of such bounds then the method fails to find it. The secant method that you alluded to in your post requires two initial guesses to perform iterative calculations and like the other methods looks for convergence of results within fixed number of iterations to a certain degree of accuracy such as 10^-6. If the results from iterative calculations do not converge, a set of new guess rates are used to redo the iteration. Muller's method is another one of these numerical methods, using this method may entail IRR results that are both complex and real. It all depends on the complexity of algorithm, the desired accuracy of results and speed of the given numerical methods of selection. Some numerical methods converge rather quickly with a better precision such as the Newton-Raphson method. But to use NR-method one has to be familiar with finding the derivative of the underlying IRR function that is usually in form of net present value formula. There may be other ways of defining the IRR function, for example setting net future value to zero, or setting benefit to cost ratio to 1, or to set equivalent annual annuity to zero. The selection of the IRR function has no impact on the results of IRR, as the internal rate of return is the same no matter which of the IRR functions we select. If you were looking for more precise result and faster convergence then the modified Newton-Raphson method offers a better solution as compared to the Newton-Raphson method. But to use the modified Newton-Raphson method, you would have to find not just the 1st order derivative but also the 2nd order derivative of the underlying IRR function of your choice.

For your cash flows of -4000 1200 1410 1875 1050, the following example IRR calculation is the result of using Newton Raphson method that defines the IRR function in terms of net present value of the investment.

The function and its derivative are at first found

Code:
f(r) = -4000(1+r)^0 +1200(1+r)^-1 +1410(1+r)^-2 +1875(1+r)^-3 +1050(1+r)^-4

f'(r) = -1200(1+r)^-2 -2820(1+r)^-3 -5625(1+r)^-4 -4200(1+r)^-5
Then the iterative calculations begin using a guess or initial rate or 10% to look for convergence

Code:
r0 = 0.1
f(r0) = 382.0777
f'(r0) = -9560.2635
r1 = 0.1 - 382.0777/-9560.2635 = 0.13996518779754
Error Bound = 0.13996518779754 - 0.1 = 0.039965 > 0.000001

r1 = 0.13996518779754
f(r1) = 25.127
f'(r1) = -8339.5514
r2 = 0.13996518779754 - 25.127/-8339.5514 = 0.1429781771474
Error Bound = 0.1429781771474 - 0.13996518779754 = 0.003013 > 0.000001

r2 = 0.1429781771474
f(r2) = 0.126
f'(r2) = -8256.0875
r3 = 0.1429781771474 - 0.126/-8256.0875 = 0.14299344067239
Error Bound = 0.14299344067239 - 0.1429781771474 = 1.5E-5 > 0.000001

r3 = 0.14299344067239
f(r3) = 0
f'(r3) = -8255.6675
r4 = 0.14299344067239 - 0/-8255.6675 = 0.14299344106065
Error Bound = 0.14299344106065 - 0.14299344067239 = 0 < 0.000001
As noted after the 4th iteration, the Newton Raphson method finds the IRR of 14.30% which is accurate to 6 decimal places

Code:
IRR = r4 = 0.14299344106065 or 14.30%
References

IRR calculation online at IRR calculation