Finance function
NPER function in Google Sheets and Excel
NPER returns the number of payments needed to repay a loan or reach a savings goal with a fixed payment and rate.
Checked against Microsoft's and Google's documentation on · Example calculated on a live sheet
- Excel 2016
- Excel 2019
- Excel 2021
- Excel 2024
- Microsoft 365
- Google Sheets
Syntax
NPER(rate, pmt, pv, [fv], [type])Arguments in [brackets] are optional. Google Sheets writes it NPER(rate, payment_amount, present_value, [future_value], [end_or_beginning]).
Example
=NPER(B3/12,-400,B2) reads: Find how many monthly payments of $400 (negative, paid out) repay the loan in B2 at the monthly rate B3/12.
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | Input | Value | |||
| 2 | Loan amount | $15,000.00 | |||
| 3 | Annual rate | 6.0% | Months at $400 | 41.6 | |
| 4 | Years | 4 | |||
| 5 | |||||
| 6 | Monthly saving | $250.00 | |||
| 7 | Saving rate | 4.0% | |||
| 8 | Saving years | 10 | |||
| 9 | Discount rate | 8% | |||
| 10 | Year | Cash flow | |||
| 11 | 0 | -$20,000.00 | |||
| 12 | 1 | $4,500.00 | |||
| 13 | 2 | $5,200.00 | |||
| 14 | 3 | $6,000.00 | |||
| 15 | 4 | $6,400.00 | |||
| 16 | 5 | $7,000.00 |
E3 shows 41.6: paying $400 a month clears the loan in just under 42 payments.
How the spreadsheet calculates it
The number of payment periods of a loan or investment. Here it's given B3 divided by 12, -400 and B2.
- 1. NPER: The number of payment periods of a loan or investment. Here it's given
B3divided by12,-400andB2.rate=`B3/12`: the rate per paymentpayment=`-400`: the payment, negativeamount=`B2`: the loan
More NPER examples
=NPER(B3/12,-400,B2)/12The same answer in years.=ROUNDUP(NPER(B3/12,-400,B2),0)The number of payments, counting the smaller last one.=NPER(4%/12,-250,0,10000)Months of $250 savings needed to reach $10,000.=NPER(B3/12,-500,B2)How much sooner the loan is repaid at $500 a month.
Paste any of these into the formula explainer to see it step by step.
Tips
- Make the payment negative and the loan positive.
- Try a few payment amounts side by side to see how much time extra money saves.
- Round up for planning; the last payment is usually smaller.
What NPER is used for
Working out how long a loan takes at a given monthly budget, how much faster extra payments clear a debt, and how many months of saving reach a goal.
Arguments
| Argument | Required | What it is |
|---|---|---|
| rate | Yes | The interest rate per payment period: B3/12 for monthly. |
| pmt | Yes | The payment each period, negative because it's paid out. |
| pv | Yes | The present value: the loan amount, or 0 when saving from nothing. |
| fv | No | The balance you want at the end. Left out, it's 0. |
| type | No | 0 or left out: payments at the end of each period; 1: at the beginning. |
Common mistakes
A positive payment: #NUM!.
Reading the answer as years: with a monthly rate it's a number of months. Divide by 12 for years.
Expecting a whole number: 41.6 means 41 full payments and a smaller last one, so round up to plan.
A payment too small to cover the interest: the loan never shrinks, so NPER can't give an answer.
In Google Sheets
Google Sheets has NPER with the same arguments in the same order (NPER(rate, payment_amount, present_value, [future_value], [end_or_beginning])).
Errors you may see with NPER
Questions
How do I get the answer in years?
Divide by 12 when the rate is monthly: NPER(B3/12,-400,B2)/12 gives just under 3.5 years.
How long will it take to save a target?
Use 0 for pv and the target as fv: NPER(4%/12, -250, 0, 10000) is the number of months of $250 needed to reach $10,000.
How do I round up to whole payments?
Wrap it in ROUNDUP: ROUNDUP(NPER(B3/12,-400,B2),0) gives the number of payments including the smaller final one.
Sources
Official documentation the facts on this page were checked against.