- - * - WhiteUnicorn - * - -




* #WhiteUnicorn/ StartPage/ Documentation/DelphiFAQ >


2906:Returns the amount required to repay a debt.

KEYWORDS: payment AREA: General

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(<principal expN>, <interest expN>, <term expN>)

<principal expN>

The original amount to be repaid over time.

<interest expN>

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.

<term expN>

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 <principal expN>
amount in  <term expN> payments. PAYMENT( ) returns a numeric
value based on a fixed interest rate compounding over a fixed
length of  time. If <principal expN> is positive, PAYMENT( )
returns a positive number. If <principal expN> is negative,
PAYMENT( ) returns a  negative number. Express the interest
rate as a decimal. For example, if the annual interest rate is
9.5%, <interest expN> is 9.5 for  payments made annually.

Express <interest expN> and <term expN> 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}


        TI



* #WhiteUnicorn/ StartPage/ Documentation/DelphiFAQ >



- - * - Anastasija aka WhiteUnicorn - * - - LJLiveJournal
PFPhotoFile