nper: number of periods
pmt: payment at each period
pv: present value
fv: future value
type: payment type
guess: an estimate of what the result should be
RATE calculates the rate of return.
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. The optional guess is needed because there can be more than one valid result. It defaults to 10%.