-3

I want your help to calculate rate of interest in excel without using RATE command. (so that I can try to convert the formula in php) This is the code we use in Excel

B5= 60 B4= 16070 B3= 750000 B6= 1

=RATE(B5,B4,-B3,0,B6)*12

It should give a result of "10.75%" as rate.

How can I get the same result without using 'RATE' or any other commands?

In short , how can I calculate interest rate in a simple calculator ?

Shijil
  • 3

1 Answers1

1

If I properly understand, you are looking for a way to compute $i$ in the formula $$A=P\frac{i \,(i+1)^n}{(i+1)^n-1}$$ There is no analytical formula and you could find some approximations here. So, consider that you need to find the zero of the equation $$f(i)=P\frac{i \,(i+1)^n}{(i+1)^n-1}-A$$ Use Newton method which, starting from one of the guesses $i_0$ given in the link, will update it according to $$i_{k+1}=i_k-\frac{f(i_k)}{f'(i_k)}$$ using $$f'(i)=P\frac{(i+1)^{n-1} \left((i+1)^{n+1}-i( n+1)-1\right)}{\left((i+1)^n-1\right)^2}$$ It will converge very quickly to the solution.

Using your numbers, the simplest estimate (called $i_1$ in the link) is $\frac{357}{38125}$ and the successive iterates of Newton method will be $$0.00864101$$ $$0.00863680$$ which is the solution for six significant figures.

All of that is easily doable with Excel.