Calculate Excel NPER Using Its Mathematical Formula
Question details
Find the mathematical formula Excel uses to calculate the number of payment periods with NPER.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- A user wants to understand or reproduce the NPER calculation for regular payments and a constant periodic interest rate.
- Observed behavior
- The desired result is the number of payment periods calculated from the rate, payment, present value, future value, and payment timing.
Identify the interest rate per payment period, the payment amount, present value, future value, and whether payments occur at the beginning or end of each period. Use opposite signs for cash inflows and outflows, and convert an annual rate to a periodic rate when necessary.
Calculate NPER from the present-value equation
Use the logarithmic formula to reproduce NPER for a nonzero rate, or use the linear formula when the rate is zero.
For a nonzero periodic rate, NPER = LOG((PMT * (1 + RATE * (TYPE <> 0)) - FV * RATE) / (PV * RATE + PMT * (1 + RATE * (TYPE <> 0)))) / LOG(1 + RATE). The expression TYPE <> 0 evaluates to 1 for beginning-of-period payments and 0 for end-of-period payments.
When RATE is zero and PMT is nonzero, NPER = -(PV + FV) / PMT. Both formulas assume a constant rate and payment amount.
In an Excel worksheet, enter RATE in B1, PMT in B2, PV in B3, FV in B4, and TYPE in B5. For example, use 5%/12, -200, 10000, 0, and 0 for a monthly loan payment.
Select an empty cell and enter =NPER(B1,B2,B3,B4,B5) to calculate the number of payment periods.
In another empty cell, enter =IF(B1=0,-(B3+B4)/B2,LOG((B2*(1+B1*(B5<>0))-B4*B1)/(B3*B1+B2*(1+B1*(B5<>0))))/LOG(1+B1)). Compare the result with the NPER cell.

Use NPER in WPS Spreadsheet
Enter your loan or investment inputs in WPS Spreadsheet and use NPER to calculate the number of payment periods. You can also enter the logarithmic formula to inspect the calculation.
- 1. Open a spreadsheet: Open WPS Office, choose Spreadsheet, and create a blank workbook or open an existing Excel file.
- 2. Enter the inputs: Enter the periodic rate, payment, present value, future value, and payment type in cells B1 through B5, respectively.
- 3. Insert the function: Select an empty cell and enter =NPER(B1,B2,B3,B4,B5), then press Enter.
- 4. Save the workbook: Choose File > Save As and select Excel Workbook (.xlsx) if you want to share the calculation with Excel users.

Frequently Asked Questions
What do the arguments in NPER represent?
In =NPER(rate,pmt,pv,[fv],[type]), rate is the interest rate per period, pmt is the regular payment, pv is the present value, fv is the target future value, and type specifies payment timing. Omitted fv and type default to 0.
How do I use an annual interest rate with monthly payments?
Convert the annual rate to a monthly rate in the rate argument. For example, enter =NPER(5%/12,-200,10000,0,0) for a 5% annual nominal rate and monthly payments.
Why should the payment and loan amount have opposite signs?
NPER follows cash-flow conventions: money received is positive and money paid out is negative. For a loan you receive, enter a positive present value and a negative payment.
What does the type argument change?
Use 0 or omit type for payments at the end of each period. Use 1 for payments at the beginning; the mathematical formula treats any nonzero type as beginning-of-period payments.
How is NPER calculated when the interest rate is zero?
With no interest and a nonzero payment, the number of periods is -(PV + FV) / PMT. In a worksheet, you can still use =NPER(0,pmt,pv,fv,type).




