In Excel: use =NPER(rate, pmt, pv) — it returns how many periods are needed, so it answers "how long until this is paid off".
On this page8
Syntax
Arguments
| Argument | required / optional | Description |
|---|---|---|
rate | required | Interest rate per period. |
pmt | required | The payment made each period, entered as a negative number if you are paying it. |
pv | required | Present value — the current balance. |
fv | optional | Target future value. Defaults to 0, meaning fully repaid. |
type | optional | 0 for end-of-period payments, 1 for beginning. |
Related functions
Select the result cell and type =NPER(.
Enter the periodic rate — annual divided by 12 for monthly.
Enter the payment as a negative number, then the current balance as positive.
Press Enter. Round up with ROUNDUP, since a partial period still needs a payment.
What this does
NPER inverts the PMT question: given a rate, a payment and a balance, how many periods until it is cleared. It is the formula behind every debt-payoff calculator and every "if I save this much a month" projection. The signs must oppose each other — a positive balance with a negative payment, or the reverse — or the maths has no solution and returns #NUM!. The same happens when the payment is too small to cover the interest, which is a genuinely useful warning: it means the debt never clears. Most people learn this as a sequence of clicks and forget it by next week; learning it as a pattern instead is what lets you apply it to the next, slightly different version of the problem without starting from scratch. That is the difference this page is trying to make. The difference between a quick fix and a sheet you can trust is the extra minute you spend validating “nper function excel”. Start on a copy or a tiny sample, keep the affected formula visible, and compare the result with the outcome you expected before you touch the real workbook. When a formula is involved, keep the inputs labelled beside it, reference cells instead of typing values, and apply number formatting only after the result checks out. The point is a calculation you can defend to a CFO or an auditor, but the practical win is that someone else can open the file and understand what happened without asking you.
A worked example
A 12,000 balance at 18 % paying 300 a month: =NPER(18%/12, -300, 12000) returns about 55 months. Raising the payment to 500 gives roughly 28 months — less than half the time for two thirds more per month. Saving 400 a month at 6 % to reach 25,000: =NPER(6%/12, -400, 0, 25000) returns about 53 months. NPER turns a payment plan into a date, which is the number that actually changes behaviour in a debt or savings decision. Check the referenced cells, argument order and result type in your workbook. Start with the worked example before changing an input, then compare the changed result with the calculation you expected. An error value or a result of a different type is a reason to inspect the inputs and arguments.
In Google Sheets
Google Sheets support for this task has not been verified. Check the function, arguments and workflow in the target product before transferring the example. Matching formula notation does not establish identical behaviour. Keep this page bookmarked for the next time the same question comes up. Better still, repeat the steps once in your own workbook — doing it yourself is what turns a copied answer into something you remember. For “nper function excel”, keep the input cells and the result visible while you check the formula in Excel. Follow the worked example and change one input at a time. The steps explain the workbook calculation; this page does not run a live calculator for that task.
Common mistakes
- Giving the payment and balance the same sign, which returns
#NUM!. - A payment smaller than the periodic interest, which also returns
#NUM!— correctly, because the balance never falls. - Reporting the raw decimal result; round up, because the final partial period is still a whole payment.
Frequently asked questions
How long will it take to pay off a debt?
=NPER(rate/12, -monthly_payment, balance), then round the answer up to whole months.
Why does NPER return #NUM!?
Either the signs of the payment and balance match, or the payment is too small to cover the interest, so the debt never clears.
Can NPER handle savings goals?
Yes — pass 0 as the present value and your target as fv: =NPER(rate/12, -deposit, 0, goal).