I am trying to create a calculator that allows the user to enter a balance amount, the interest rate and the payment. I want the calculator to figure and write the amount that went to interest and the amount that went to the balance. My biggest problem is that I need the two calculations to stop after two decimals. I can't figure it out.

The calculator can be found at costofcredit.com/interest_paid.html

Thanks for any help.

The calculator can be found at costofcredit.com/interest_paid.html

Thanks for any help.

## Comment