Where :
m = ceiling [ p0 * rm
--------------------
1 - (1 + rm)-tm]
- m
- is monthly payment, in pennies.
- p0
- is the loan amount, in pennies.
- rm
- is the monthly interest rate, equal to 1/12 of the annual interest rate.
- tm
- is the amount of time to repay the loan, in months.
(Note: The "ceiling" function is used to round the monthly payment up to the nearest penny.)
Every time you make a monthly payment, some of that amount covers interest on the loan and the rest is used to pay principle. At the beginning, most of your monthly payment goes towards interest, but near the end of your loan, your monthly payments cover mostly principle.
Each month, the amount of interest due is computed according to the following equation:
interest due = principle remaining * rm
Presumably, this amount is rounded to the nearest penny. After the interest is subtracted from your monthly payment, whatever remains is used to pay off the principle. As the principle you owe gradually decreases, your monthly payments shift from being mostly interest payments to being mostly principle payments.