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)

## Error

Your IP address will be recorded

You must follow the Privacy Policy and Google Terms of use.