Technical Information Database TI1051D.txt Returns the amount required to repay a debt. Category :General Programming Platform :All Product :Delphi All Description: PAYMENT() Returns the periodic amount required to repay a debt. function payment(princ, int, term: double): double; var temp: double; begin int := int / 100; temp := exp(ln(int + 1) * term); result := princ * ((int * temp) / (temp - 1)); end; Syntax PAYMENT(, , ) The original amount to be repaid over time. The interest rate per period expressed as a positive decimal number. Specify the interest rate in the same time increment as the term. It is to be expressed as a percentage. The number is divided by 100 inside the function. The number of payments. Specify the term in the same time increment as the interest. Description Use PAYMENT( ) to calculate the periodic amount (payment) required to repay a loan or investment of amount in payments. PAYMENT( ) returns a numeric value based on a fixed interest rate compounding over a fixed length of time. If is positive, PAYMENT( ) returns a positive number. If is negative, PAYMENT( ) returns a negative number. Express the interest rate as a decimal. For example, if the annual interest rate is 9.5%, is 9.5 for payments made annually. Express and in the same time increment. For example, if the payments are monthly, express the interest rate per month, and the number of payments in months. You would express an annual interest rate of 9.5%, for example, as 9.5/12, which is the 9.5% divided by 12 months. The formula used to calculate PAYMENT( ) is as follows: term int*(1 + int)^ pmt = princ * ------------------- term (1 + int)^ - 1 where int = rate / 100 (as a percentage). For the monthly payment required to repay a principal amount of $16860.68 in five years, at 9% interest, the formula expressed as a dBASE expression looks like this: MyVar := PAYMENT(16860.68, 9/12, 60) {Returns 350.00} Reference: 7/16/98 4:34:00 PM
Last Modified: 01-SEP-99