I'm writing this loan code and thats the equation that has to be calculate.. I just don't understand how I would do it. Math is a struggle for me. p = rSn(subscript n) / 1 - (1 + r)-n (to the negative n or something like that)
http://www.sontek.net/equ.jpg is a picture of what the equation looks like.
I'm doing the code in Visual Basic.. I have everything setup I just don't know how to setup the equation in the code (I don't know that much math so that equation makes no sense to me at all)
p - is an equal periodic (monthly) payment
r - is interest rate stated as an annual interest rate
n - is the number of monthly payments over the life of the loan
Sn - is the amount of the loan
This is what I tried doing.. But its overflowing.. so if anyone has any ideas let me know
answer = ammount * (number) / (1 - (1 + interest) ^ number)
November 5 2004, 03:09:07 UTC 13 years ago
November 5 2004, 05:32:05 UTC 13 years ago
you should be using:
you should probably also make sure that you're using the double floating-point datatype as otherwise higher-order exponentiations tend to result in either 0 or NaN results.
interest calculator
Anonymous
February 16 2005, 17:15:50 UTC 13 years ago
I believe the formula for this is:
for counter=1 to term
balance= principle * (1+interest) ^ counter
lstoutput.additem ("whatever you want to print
out")
but not sure. I am a newbie and trying to pick up things on my own, but it is not working out too well.
I have a listbox I want to show the results in. The downpayment is a txt box and the pther two combo boxes. Any suggestions?