COMPINT (compound interest)

Top  Previous  Next

 

COMPINT(principal,rate,periods)

 

COMPINT

Computes total compounded interest plus principal.

principal

A numeric constant or variable containing the beginning balance, initial deposit, or loan.

rate

A numeric constant or variable containing the applied interest rate for the given time frame.

periods

A numeric constant or variable containing the number of compounding periods per year.

 

The COMPINT function computes total interest based on a principal amount (principal), an applied interest rate (rate), plus the number of compounding periods (periods). The computed amount includes the original principal plus the compound interest earned. Periods specifies the number of compounding periods. For example, periods = 2 results in semi-annual compounding.

Applied interest rate may be calculated as follows:

PeriodicRate = AnnualInterestRate / (PeriodsPerYear * 100)

AppliedRate = PeriodicRate * TotalPeriods

 

Return Data Type:     DECIMAL

 

Internal Formulas:

 

 

Example:

 

CASE FIELD()

OF ?OK

CASE EVENT()

OF EVENT:Accepted

 PeriodicRate = AnnualInterestRate / (PeriodsPerYear * 100)  ! Setup Variables

 ActualRate  = PeriodicRate * TotalPeriods

 CompoundInterest = COMPINT(Principal,ActualRate,TotalPeriods) ! Call COMPINT

 DO SyncWindow

END