Example—PMT function:
/* Calculate the monthly payment on a $50000 loan,
** with an interest rate of 8.5% per year for a
** period of 20 years. Note payment will be negative
** indicating a cash outflow.
*/
payment = pmt(pv = 50000, i = .085/12, nper = 12*20);