Section: Excel & Google Sheets

NPER in Excel returns the number of periods a loan or a savings plan needs. On 20,000 at 6 percent with a payment of 400 a month, =NPER(6%/12,-400,20000) returns 57.68, which means the loan is cleared in 58 monthly payments. It is the mirror of PMT: there you know the term and want the payment, here you know the payment and want the term. This guide covers the syntax, the sign rule, Microsoft's own example, a payoff comparison, rounding to whole months and what a negative result means.
What NPER returns
Microsoft describes NPER as returning the number of periods for an investment based on periodic, constant payments and a constant interest rate. The result is in periods, so monthly payments give months and annual payments give years, and it is usually a fraction rather than a whole number.
The fraction is not a rounding error. It says the last payment is smaller than the rest: 57.68 months of 400 means 57 full payments and one smaller final payment.
The syntax
=NPER(rate, pmt, pv, [fv], [type])
- rate is the interest rate per period, so 6 percent a year with monthly payments is 6%/12.
- pmt is the payment made each period, and it cannot change over the life of the loan.
- pv is the present value, meaning the amount borrowed or the amount already saved.
- fv is optional and is the balance you want at the end. It defaults to 0, which is what a loan paid off in full uses.
- type is optional: 0 or omitted for payments at the end of the period, 1 for payments at the beginning.
Give the rate cell a name and the formula reads =NPER(loan_rate,-400,20000), which is easier to audit six months later than a cell address nobody remembers.

The signs decide the answer
Money you receive is positive and money you pay is negative. For a loan, the amount borrowed is positive and the payment is negative, as in =NPER(6%/12,-400,20000). For a savings plan it is the other way round: the amount you start with and the payments you make are both negative, and the target balance is positive.
Get a sign wrong and NPER still returns a number, which is what makes the mistake hard to spot. If the answer is negative or absurdly large, check the signs before you check anything else.
Microsoft's example
Microsoft's page uses a 12 percent annual rate, a payment of -100, a present value of -1000 and a future value of 10,000, with the type in its own cell:
=NPER(A2/12, A3, A4, A5, 1)returns 59.67 periods with payments at the beginning.=NPER(A2/12, A3, A4, A5)returns 60.08 periods with payments at the end.=NPER(A2/12, A3, A4)returns -9.58 when the future value is left out.
That third result is worth reading twice. With no target balance, a 100 payment and a 1,000 deposit never reach 10,000, so no positive number of periods satisfies the equation and Excel returns a negative one. A negative NPER is Excel telling you the goal is out of reach at that payment, not that the formula is broken.
Paying off a loan
The useful comparison is what a bigger payment buys. On 20,000 at 6 percent:
- 400 a month clears the loan in 57.68 months, and the total paid is about 23,072, so the interest is about 3,072.
- 300 a month takes 81.30 months, and the total paid is 24,388.68, so the interest is 4,388.68.
One hundred a month more saves roughly 1,300 in interest and two years of payments. That is the kind of sentence NPER lets you write honestly, because both figures come from the same three arguments.

Rounding up to whole periods
You cannot make 57.68 payments, so decide what the schedule will actually do. Wrapping the formula in ROUNDUP gives 58 payments, and the last one is smaller than 400. Wrapping it in ROUND gives 58 as well here, but on a result like 57.2 it would give 57, which leaves a balance outstanding, so ROUNDUP is the safer choice for a payoff date.
If you need the exact final payment rather than a rounded count, keep the fractional result and calculate the last payment separately as the remaining balance plus its interest.
Saving toward a goal
NPER works the same way in reverse. To reach 100,000 by saving 300 a month at 4 percent, =NPER(4%/12,-300,0,100000) returns 224.54 months, which is 18.7 years. Raising the monthly amount shortens it quickly, because the target is fixed and the payment is not.
Two cautions on savings cases. The rate has to be one you can actually get for the whole period, which a savings account rarely guarantees. And the result assumes the payment never pauses, so a month skipped pushes the date out.

A negative or impossible result
Three things produce a strange answer. Signs in the wrong direction, a payment too small to cover the interest, and a target that is unreachable at any rate. The first two give a negative NPER or a very large one, and the third gives #NUM!. When the payment is smaller than the interest accruing each period, the balance grows instead of shrinking, and no number of periods clears it.
NPER compared with Goal Seek
NPER solves this one equation exactly. Goal Seek solves anything, by changing one input until a formula reaches a target, which is what you need when the model has several steps and no closed form. For a plain loan or savings plan, NPER is faster and it updates when an input changes; Goal Seek has to be run again after every edit.
Common problems
- A negative number of periods. The payment never reaches the target. Check the signs, then the size of the payment against the interest.
- A result in the wrong unit. Monthly payments return months. Divide by 12 for years, and do not mix a monthly rate with an annual payment.
- A fraction you cannot use. Round up for a payoff date, and calculate the final payment separately if you need it exactly.
- #NUM! with sensible-looking numbers. The payment is too small to cover the interest, so the balance never falls.
- A different answer from the lender's. Fees, insurance or a different compounding basis. NPER only knows the rate you give it.

Questions and answers
Does NPER return months or years?
Periods. Monthly payments give months, annual payments give years, and the rate must match the period.
Why is the answer not a whole number?
Because the last payment is usually smaller. Round up to get the number of payments, and expect a smaller final one.
What does a negative NPER mean?
The payment never reaches the target balance. Check the signs first, then whether the payment covers the interest.
Can NPER include a lump sum at the end?
Yes. Put the amount you want left over, such as a balloon payment, in the fv argument.
How do I find the term for a specific payment?
That is exactly what NPER does. Give it the rate, the payment and the amount, and it returns the number of periods.
