<doc>
  <legacy_id>1156</legacy_id>
  <name>compound</name>
  <type>function</type>
  <syntax>
    <example>compound(<i>interestPerPeriod</i>,<i>numberOfPeriods</i>)</example>
  </syntax>
  <library></library>
  <objects>
  </objects>
  <synonyms>
  </synonyms>
  <classification>
    <category>Math, Logic, &amp; Dates</category>
  </classification>
  <references>
    <function tag="annuity">annuity Function</function>
    <function tag="round">round Function</function>
  </references>
  <history>
    <introduced version="1.0">Added.</introduced>
  </history>
  <platforms>
    <mac/>
    <windows/>
    <linux/>
    <ios/>
    <android/>
  </platforms>
  <classes>
    <desktop/>
    <server/>
    <web/>
    <mobile/>
  </classes>
  <security>
  </security>
  <summary><glossary tag="return">Returns</glossary> the principal plus accrued interest of an investment.</summary>
  <examples>
    <example>compound(.05,20)</example>
    <example>put theInvestment * compound(yearlyInterest,numberYears) into endValue</example>
  </examples>
  <description>
    <p>Use the <b>compound</b> <control_st tag="function">function</control_st> to calculate the value of an investment that earns interest.</p><p/><p><b>Parameters:</b></p><p>The <i>interestRate</i> is a positive number. The <i>interestRate</i> is expressed as a fraction of 1 so, for example, an 8% rate is written<code> .08</code>.</p><p/><p>The <i>numberOfPeriods</i> is a positive number.</p><p/><p><b>Value:</b></p><p>The <b>compound</b> <control_st tag="function">function</control_st> <glossary tag="return">returns</glossary> a positive number.</p><p/><p><b>Comments:</b></p><p>The formula for the value of an compound-interest-bearing account is</p><p/><p>   (1 + <i>interestRate</i>)^( <i>numberOfPeriods</i>)</p><p/><p>The <b>compound</b> <control_st tag="function">function</control_st> calculates this value.</p><p/><p>The <i>numberOfPeriods</i> and the <i>interestRate</i> must use the same unit of time. For example, if the periods are months, the interest rate is the interest per month.</p>
  </description>
</doc>