RATE()

Estimate rate of interest for a loan

Syntax

RATE (nLoan, nPayment, nPeriods) --> nRate

Arguments

<nLoan> amount of money you get from the bank <nPayment> amount of money you pay back per period <nPeriods> number of periods you pay the loan back

Returns

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

Description

RATE() calculates the rate of interest per period for the given loan, payment per periods and number of periods. This is done with the same equation used in the PAYMENT() or PERIODS() function:

<nPayment> = <nLoan>*(<nInterest>/100)/(1-(1+<nInterest>/100)^(-<nPeriods>))

However, this equation can not be solved for <nInterest> in a "closed" manner, i.e. <nInterest> = ..., so that the result can only be estimated.
Examples
      // You get a loan of 5172.56, pay 100 back every month for
      // 5 years (60 months). The effective interest rate per
      // period (=month) is

      ? rate (5172.56, 100, 60)  --> 0.005

Tests
      rate (5172.56, 100, 60.0) == 0.005
      rate (6000.0, 100, 60.0) == 0.0
Status

Ready

Compliance

RATE() is compatible with CT3's RATE().

Platforms

All

Files

Source is finan.c, library is libct.

See Also