Level payment calculation
The annual rate is divided by 12 to obtain the monthly rate r, and the term is converted to n monthly installments. For principal P and a nonzero rate, the scheduled payment is P * r * (1 + r)^n / ((1 + r)^n - 1). At zero interest, the payment is simply P / n.