InterestRate: Final capital after compound interest

View source: R/InterestRate.R

InterestRateR Documentation

Final capital after compound interest

Description

Calculates the final capital, after compounding interest

Usage

InterestRate(initialCapital, interest, days)

Arguments

initialCapital

Numeric value of initial capital

interest

Numeric value of the interest rate

days

Numeric value of days, for time of accumulation

Details

Calculates the final capital through the formula P \times \left(1 + \frac{r}{100}\right)^t, where P = initialCapital, r = interestRate, t = \frac{days}{365.25}

Value

Final capital value, given by the formula above

Author(s)

Michael Thrun

Examples

initialCapital = 25000
interestRate = 2
days = 365
finalCapital = InterestRate(initialCapital,interestRate,days)
compoundedInterest = finalCapital - initialCapital

Mthrun/TSAT documentation built on Feb. 5, 2024, 11:15 p.m.