====== PPmt(rate, per, num_per, curr_val) ======
Category:  Number (Financial) function

\\ 
=====Description=====
This function calculates the payment on the principal for an investment over a given period.

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

\\ 
=====Arguments=====
^Argument^Type^Description^
|rate|Number (decimal)|The interest rate of the loan (entered as a decimal).|
|per|Number|The period.  Must be a value between 1 and //num_per//.|
|num_per|Number|The number of payments of the loan (usually in months or years).|
|curr_val|Number|The current value of the loan.|
|fut_val|Number|Optional.  The future value 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 //rate// and //num_per// to the same time period.  If calculating a monthly payment and //rate// is an annual rate, divide it by 12 (//rate// / 12).  If //num_per// is given as years, multiply by 12 (//num_per// * 12).

\\ 
=====Examples=====
** Calculate the annual principal payment for period 1:**  Annual rate of 8%, for period 1, number of periods is 3 years, value is $20,000, (final value = default, 0).
  ppmt(0.08, 1,  3, 20000) //Returns -6160.67 (annual payment, rounded)
\\ 
** Calculate the monthly principal payment for period 24:**  Annual rate of 6%, number of periods is 48 months, value is $10,000, final value is 0 (paid off).
  ppmt(0.06/12, 24, 48, 10000, 0) //Returns -207.32 (monthly payment, rounded)
\\ 
** Calculate the monthly principal payment for period 20:**  Annual rate of 10%, number of periods is 2 years, value is $8,000, final value is 0 (paid off), with payments due at the end of the period.
  ppmt(0.10/12,20, 2*12, 8000, 0, 1) //Returns -351.23 (monthly payment, rounded)

\\ 
** Calculate the monthly principal payment for period 25:**  Annual rate of 10%, number of periods is 2 years, value is $8,000, final value is 0 (paid off), with payments due at the end of the period.
  ppmt(0.10/12,25, 2*12, 8000, 0, 1) //Returns an error.  "Per" is outside of 1 to 24 (the # of months).


\\ 
===== 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:pv|PV(rate, num_per, payment)]]
  * [[syntax:functions:rate|Rate(num_per, payment, curr_val)]]