====== Rate(num_per, payment, curr_val) ======
Category:  Number (Financial) function

\\ 
=====Description=====
This function calculates the interest rate per period of an annuity.

\\ 
=====Additional syntax=====
Optional //future value// (fut_val) argument.
  rate(num_per, payment, curr_val, fut_val)
\\ 
Optional //payments due// (pay_due) argument.
  rate(num_per, payment, curr_val, fut_val, pay_due)

\\ 
=====Arguments=====
^Argument^Type^Description^
|num_per|Number|The number of payments of the annuity (usually in months or years).|
|payment|Number (negative)|The payment made each period (that does not change), entered as a negative value.  Includes principal\\ and interest, but no fees or taxes.|
|curr_val|Number|The current value of the annuity.|
|fut_val|Number|Optional.  The future value, or cash balance, to be achieved after the last payment (i.e., "0" to pay the loan\\ off in full).  The default, if not supplied, is //0//.|
|pay_due|Binary (0 or 1)|Optional.  This value defines when payments are due.  Options:  //0// (the beginning of the period; default),\\ or //1// (the end of the period).|

\\ 
**Return value type:**  Number

\\ 
=====Remarks=====
For an accurate calculation, be sure to convert //num_per// to the time period desired.  If calculating a monthly rate and //num_per// is given as years, multiply by 12 (//num_per// * 12).

\\ 
=====Examples=====
** Calculate the annual interest rate:**  Number of periods is 3 years, payment desired is $7500 per year, value is $20,000, (final value = default, 0).
  rate(3, -7500, 20000) //Returns 0.06 (or 6%) (annual interest rate, rounded)
\\ 
** Calculate the monthly interest rate:**  Number of periods is 48 months, payment desired is $350 per month, value is $10,000, final value is 0 (paid off).
  rate(48, -350, 10000, 0)  //Returns 0.02 (or 2%) (monthly interest rate, rounded)
\\ 
** Calculate the monthly interest rate:**  Number of periods is 5 years (60 months), payment desired is $5200 per month, value is $150,000, final value is 0 (paid off), with payments due at the end of the period.
  rate(60, -5200, 150000, 0, 1)  //Returns 0.03 (or 3%) (monthly interest rate, rounded)

\\ 
===== See also =====
  * [[syntax:functions:fv|FV(rate, num_per, payment)]]
  * [[syntax:functions:nper|NPer(rate, payment, curr_val)]]
  * [[syntax:functions:ipmt|IPmt(rate, per, num_per, curr_val)]]
  * [[syntax:functions:pmt|Pmt(rate, num_per, curr_val)]]
  * [[syntax:functions:ppmt|PPmt(rate, num_per, curr_val)]]
  * [[syntax:functions:pv|PV(rate, num_per, payment)]]
