### PAYMENT()

* Payments for a loan
*

**Syntax**

PAYMENT( nLoan, nInterest, nPeriods ) --> nPayment

**Arguments**

<nLoan> amount of money you get from the bank

<nInterest> rate of interest per period, 1 == 100%

<nPeriods> period count

**Returns**

<nPayment> Periodical payment one has to make to pay the loan <nLoan> back

**Description**

PAYMENT() calculates the payment one has to make periodically to pay back a loan <nLoan> within <nPeriods> periods and for a rate of interest <nInterest> per period.

debt in period 0 = <nLoan>

debt in period 1 = ((debt in period 0)-<nPayment>)*(1+<nInterest>/100)

debt in period 2 = ((debt in period 1)-<nPayment>)*(1+<nInterest>/100)

etc…

debt in period <nPeriod> = ((debt in period <nPeriod>-1)-<nPayment>)*(1+<nInterest>/100)

-> has to be 0, so <nPayment> = <nLoan>*(<nInterest>/100)/(1-(1+<nInterest>/100)ˆ(-n))

**Examples**

// You get a loan of 5172.56 at a interest rate of 0.5% per // month (6% per year). // For 5 years, you have to pay back every month ? payment( 5172.56, 0.005, 60 ) // --> 100.00

**Tests**

payment( 5172.56, 0.0, 60 ) == 86.21 payment( 5172.56, 0.005, 60 ) == 100.00

**Compliance**

PAYMENT() is compatible with CT3’s PAYMENT().

**Platforms**

All

**Files**

Source is finan.c, library is libct.

**Seealso**

PV(), FV(), PERIODS(), RATE()