PAYMENT()

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()

PV()

PV()

Present value of a loan

Syntax

      PV( nPayment, nInterest, nPeriods ) --> nPresentValue

Arguments

<nPayment> amount of money paid back per period <nInterest> rate of interest per period, 1 == 100%

<nPeriods> period count

Returns

<nPresentValue> Present value of a loan when one is paying back <nDeposit> per period at a rate of interest of <nInterest> per period

Description

PV() calculates the present value of a loan that is paid back in <nPeriods> payments of <nPayment> (Dollars, Euros, Yens, …)
while the rate of interest is <nInterest> per period:
debt in period 0 = <nPresentValue>
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

    <nPresentValue> = <nPayment>*(1-(1+<nInterest>/100)ˆ(-n)) / (<nInterest>/100)

Examples

      // You can afford to pay back 100 Dollars per month for 5 years
      // at a interest rate of 0.5% per month (6% per year), so instead
      // of 6000 Dollars (the amount you will pay back) the bank will pay
      // you

      ? pv( 100, 0.005, 60 ) // --> 5172.56

Tests

      pv( 100, 0.0, 60 )   == 6000.0
      pv( 100, 0.005, 60 ) == 5172.56

Compliance

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

Platforms

All

Files

Source is finan.c, library is libct.

Seealso

FV(), PAYMENT(), PERIODS(), RATE()

FV()

FV()

Future value of a capital

Syntax

      FV( nDeposit, nInterest, nPeriods ) --> <nFutureValue>

Arguments

<nDeposit> amount of money invested per period <nInterest> rate of interest per period, 1 == 100% <nPeriods> period count

Returns

<nFutureValue> Total value of the capital after <nPeriods> of paying <nDeposit> and <nInterest> interest being paid every period and added to the capital (resulting in compound interest)

Description

FV() calculates the value of a capital after <nPeriods> periods. Starting with a value of 0, every period, <nDeposit> (Dollars, Euros, Yens, …) and an interest of <nInterest> for the current capital are added for the capital (<nInterest>=Percent/100).

Thus, one gets the non-linear effects of compound interests:

value in period 0 = 0

value in period 1 = ((value in period 0)*(1+<nInterest>/100)) + <nDeposit>

value in period 2 = ((value in period 1)*(1+<nInterest>/100)) + <nDeposit> etc….

value in period <nPeriod> = ((value in period <nPeriod>-1)*(1+<nInterest>/100))< + <nDeposit>

                                           = <nDeposit> * sum from i=0 to <nPeriod>-1 over (1+<nInterest>/100)ˆi

                                          = <nDeposit> * ((1+<nInterest>/100)ˆn-1) / (<nInterest>/100)

Examples

      // Payment of 1000 per year for 10 years at a interest rate
      // of 5 per cent per year

      ? fv( 1000, 0.05, 10 ) // --> 12577.893

Tests

      fv( 1000, 0.00, 10 ) == 10000.0
      fv( 1000, 0.05, 10 ) == 12577.893

Compliance

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

Platforms

All

Files

Source is finan.c, library is libct.

Seealso

PV(), PAYMENT(), PERIODS(), RATE()

CT_RATE

 RATE()
 Computes the interest rate for a loan
------------------------------------------------------------------------------
 Syntax

     RATE(<nCapital>,<nPayment>,<nNumberPayments>)
        --> nInterestRate

 Arguments

     <nCapital>  Designates the amount of the loan.

     <nPayment>  Designates the payment per installment.

     <NumberPayments>  Designates the number of the planned payment
     periods.

 Returns

     RATE() returns the loan interest rate.

 Description

     RATE() determines the annual interest rate for a loan <nCapital> in the
     <nNumberPayments> period at the specified <nPayment> installment.  The
     calculated interest rate is based on a Newtonian iterative solution
     procedure:

         lk+1=ik - f(ik)/f(ik)

     where:

         f(i)=(1-(l + i)^-n)/i - PV/PMT

     The initial value for i is selected as follows:

         -io = PMT/PV - PV/n^2PMT

 Note

     .  This function allows a maximum value for the payment period of
        1020.

 Example

     For a $2500 loan, you pay $86.67 per month for 3 years.  What is the
     effective annual interest rate?

     nLoan     :=  2500
     nPayment  :=  86.67
     nPeriod   :=  36

     ? RATE(nLoan, nPayment, nPeriod) * 12      // 0.1501 (15.01%)

See Also: PAYMENT() PV() FV() PERIODS()

 

Tools — Mathematical Functions

Introduction Mathematical Functions
ACOS()    Computes the cosine arc
ASIN()    Computes the sine arc
ATAN()    Computes the tangent arc
ATN2()    Computes the angle size from the sine and cosine
CEILING() Rounds up to the next integer
COS()     Computes the cosine
COT()     Computes the cotangent
DTOR()    Converts from a degree to radian measure
FACT()    Computes the factorial
FLOOR()   Rounds down to the next integer
FV()      Computes future value of capital
GETPREC() Determines the level of precision that is set
LOG10()   Computes the common logarithm
PAYMENT() Computes the periodic payment amount
PERIODS() Computes number of payment periods necessary to repay a loan
PI()      Returns pi with the highest degree of accuracy
PV()      Computes the cash present value after interest charges
RATE()    Computes the interest rate for a loan
RTOD()    Converts from a radian to degree measure
SETPREC() Sets the precision level for trigonometric functions
SIGN()    Determines the mathematical sign of a number
SIN()     Computes the sine of a radian value
TAN()     Computes the tangent of a radian value