You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Summary: <return|Returns> the principal plus accrued interest of an investment.
Introduced: 1.0
OS: mac,windows,linux,ios,android
Platforms: desktop,server,web,mobile
Example:
compound(.05,20)
Example:
put theInvestment * compound(yearlyInterest,numberYears) into endValue
Parameters:
interestPerPeriod:
numberOfPeriods: A positive number.
interestRate: A positive number. The interestRate is expressed as a fraction of 1 so, for example, an 8% rate is written .08.
Returns: The <compound> <function> <return|returns> a positive number.
Description:
Use the <compound> <function> to calculate the value of an investment that earns interest.
The formula for the value of an compound-interest-bearing account is
(1 + <interestRate>)^( <numberOfPeriods>)
The <compound> <function> calculates this value.
The <numberOfPeriods> and the <interestRate> must use the same unit of time. For example, if the periods are months, the interest rate is the interest per month.
References: function (control_st), annuity (function), round (function), return (glossary)