rate: effective annual interest rate
pmt: payment at each period
pv: present value
fv: future value
type: payment type
NPER calculates the number of periods of an investment based on periodic constant payments and a constant interest rate.
If type is 0, the default, payment is at the end of each period. If type is 1, payment is at the beginning of each period.