The NPER function calculates the number of payment periods in an investment or loan. NPER is a function in microsoft excel from the category Financial Function. It that can be used to get the number of payment periods for a loan, given the amount, the interest rate, and periodic payment amount.