M = P * [r(1+r)^n] / [(1+r)^n - 1] where P = loan amount, r = monthly interest rate, n = number of months.