{"identifier":54407,"topic":"Functions","name":"compound","text":"<code>compound(<i>number1<\/i>, <i>number2<\/i>)<\/code> <br><br>\n\n where<code> <i>number1<\/i> <\/code>represents the <b>interest rate<\/b> (expressed as a decimal) and<code> <i>number2<\/i> <\/code>represents the number of <b>periods<\/b> over which the interest is compounded. <br><br>\n\n Value returned: value of one unit of principal invested at the interest rate and compounded over the specified number of periods, or a number equal to<code> (1 + rate) ^ periods<\/code> <br>\n<br>\nAn interest rate involves a certain percentage (expressed as a decimal) per some unit of time\u2014usually per year. You must use the same unit of time to measure the number of periods. <br><br>\n\n For example, if you have a yearly interest rate that is compounded monthly, you must convert the  yearly rate to the interest per month (<code>rate \/ 12<\/code>) and be sure to express the number of periods as months  (2 years = 24 months). <br>\n","related":{"51607":"annuity","89523":"Arithmetic operators","78162":"numberFormat"},"examples":"","demo":"on compoundDemo\n   set numberFormat to \"0.00\"\n   answer \"$100 invested for 5 years at 5.75% interest\" &&\u00ac\n   \"compounded quarterly yields $\" & (100 * compound(.0575\/4,5*4))\n end compoundDemo\n ","debug":{"9":["compound(number1, nu"],"10":["An interest rate inv"]}}