ExcelReady
CourseMock testsFunction guidesBlog
Start freeStart learning for free
ExcelReady

Be Excel-ready before day one. Hands-on practice in your browser, with instant feedback.

Learn

  • Course
  • Mock tests
  • Function guides
  • Blog

Test prep

  • Excel level test
  • Excel test practice
  • Free screening quiz
  • Certificate

Company

  • About
  • Editorial policy
  • Contact
  • Terms
  • Privacy

© 2026 ExcelReady. All rights reserved.

  1. Blog
  2. Math
  3. Excel NPER Function: How Long to Pay Off a Loan or Save

Excel NPER Function: How Long to Pay Off a Loan or Save

By ExcelReady Team·Updated November 3, 2026·7 min read

The short answer

NPER returns the number of payments needed to pay off a loan or reach a savings target. Write =NPER(rate, pmt, pv), with the rate per period, the payment as a negative number and the amount borrowed. For 20,000 at 6% a year, paying 500 a month, =NPER(6%/12,-500,20000) returns about 44.74 months, so 45 payments.

Key takeaways

  • The syntax is =NPER(rate, pmt, pv, [fv], [type]); NPER stands for number of periods.
  • Give the payment and the loan opposite signs: money you pay out is negative, money you receive is positive.
  • The result is usually a decimal. Wrap it in ROUNDUP to get the real number of payments.
  • If the payment doesn't cover the interest, the loan never ends and NPER returns #NUM!.
  • For savings, put 0 as pv and the target as fv: =NPER(3%/12,-200,0,10000).
On this page+
  1. What does the NPER function do?
  2. How to work out how long it takes to pay off a loan
  3. How to show the result in years and months
  4. How much faster do bigger payments pay off a loan?
  5. How long does it take to reach a savings goal?
  6. Why does NPER return #NUM! or a negative number?
  7. The type argument, and how NPER relates to NPV
  8. Practise it

The NPER function in Excel answers the question "how long?": how many payments it takes to pay off a loan, or how many deposits it takes to reach a savings goal. You give it the interest rate, the payment and the starting amount, and it returns the number of periods. This guide is for anyone planning a loan, a savings target or a finance test question, and it explains each result in plain numbers. It is a calculation guide, not financial advice.

What does the NPER function do?#

NPER stands for number of periods. It works out how many equal payments, at a fixed interest rate, bring a balance to a target. The syntax has three required parts and two optional ones:

Excel formula
=NPER(rate, pmt, pv, [fv], [type])
ArgumentMeaningExample
rateInterest rate per period6%/12 for monthly payments
pmtThe payment each period, as a negative number-500
pvPresent value: the amount you start with or borrow20000
fvOptional. The balance you want at the end. Default 010000 for a savings goal
typeOptional. 0 = pay at the end of each period (default), 1 = at the start0

NPER works in every version of Excel on Windows, Mac and the web. It belongs to the same family as PMT, PV, FV and RATE. Each one solves for a different unknown with the same arguments. The PMT function guide solves for the payment, and its short "how long" table is where NPER first appears. This guide goes deeper.

How to work out how long it takes to pay off a loan#

Put the inputs in cells, then point NPER at them. Here is a 20,000 loan at 6% a year with a 500 monthly payment:

AB
1Loan amount20,000
2Annual rate6%
3Monthly payment500
4Months (exact)=NPER(B2/12,-B3,B1)
5Payments needed=ROUNDUP(B4,0)

B4 returns 44.74. Here is what each part does:

  • B2/12 turns the yearly rate into a monthly rate (0.5%), because the payments are monthly.
  • -B3 is the payment. It is negative because it is money you pay out.
  • B1 is the loan. It is positive because it is money you received.

The decimal matters. 44.74 means 44 full payments of 500 and a smaller 45th payment of about 370. Nobody makes 0.74 of a payment, so B5 uses ROUNDUP to show 45. Don't use ROUND here: it would give 45 in this case, but a result like 44.2 would round down to 44 and leave a balance unpaid. The guide to ROUND, ROUNDUP and ROUNDDOWN explains the difference, and the ROUND function reference lists the syntax.

How to show the result in years and months#

Split the months into whole years and leftover months with INT and MOD. With 45 in B5:

Excel formula
=INT(B5/12)&" years "&MOD(B5,12)&" months"

The result is 3 years 9 months. INT(45/12) drops the decimal from 3.75 to give 3. MOD(45,12) returns the remainder, 9. The article on MOD and INT in Excel shows more ways to split numbers like this.

If your payments are yearly, use the yearly rate and a yearly payment instead. =NPER(6%,-5000,20000) returns about 4.71 years for a 20,000 loan paid at 5,000 a year.

How much faster do bigger payments pay off a loan?#

Bigger payments cut the time and the total interest, and NPER shows by how much. List some payment options in A9:A11 and fill one formula down:

Excel formula
=ROUNDUP(NPER($B$2/12,-A9,$B$1),0)

The $ signs keep the rate and the loan fixed while A9 moves down to A10 and A11. Press F4 on Windows (⌘T on a Mac) to add them, and fill down with Ctrl+D (⌘D on a Mac). See how the dollar sign locks a reference if this is new.

Monthly paymentNPER (exact)Payments neededInterest, roughly
40057.68583,072
50044.74452,370
60036.56371,933

The interest column is the payment times the exact NPER minus the loan, for example =500*44.74-20000. It is close to the real figure but not exact, because the last payment is smaller. For an exact split of interest and principal, build a full schedule. On this loan, paying 600 instead of 500 finishes 8 months sooner and saves about 437 in interest.

How long does it take to reach a savings goal?#

For savings, start from 0 and put the target in fv. To save 10,000 with 200 a month at 3% a year:

Excel formula
=NPER(3%/12,-200,0,10000)

The result is 47.17, so 48 deposits. The deposits are negative because the money leaves your account, and the target is positive because you get it back at the end. Without interest it would take exactly 50 months (10,000 ÷ 200), so interest saves two deposits here.

If you already have some savings, enter them as a negative pv, because that money also goes into the account. With 2,000 already saved, =NPER(3%/12,-200,-2000,10000) returns about 37.28, so 38 deposits.

Why does NPER return #NUM! or a negative number?#

NPER fails when the numbers describe a loan that can never end. These are the usual causes:

  1. The payment doesn't cover the interest. At 6% a year, 20,000 costs 100 a month in interest (20,000 × 0.5%). A payment of 100 or less never reduces the balance, so =NPER(6%/12,-100,20000) returns #NUM!. Raise the payment.
  2. The signs are the same. =NPER(6%/12,500,20000) treats both as money coming in. Excel returns a negative number of periods, about -36.56, which makes no sense. Make the payment negative.
  3. A yearly rate with monthly payments. =NPER(6%,-500,20000) treats 6% as the monthly rate, so the interest is 1,200 a month and the result is #NUM!. Divide the yearly rate by 12.
  4. The rate typed as 6 instead of 6%. Excel reads 6 as 600%. Type the % sign or use 0.06.

A rate of 0 is fine. NPER simply divides: =NPER(0,-200,2450) returns 12.25, which you round up to 13 payments.

The type argument, and how NPER relates to NPV#

Use type 1 when each payment is made at the start of the period instead of the end. Paying earlier means a little less interest: =NPER(6%/12,-500,20000,0,1) returns about 44.49 instead of 44.74. Most loans charge at the end of the period, so leave type out unless the terms say otherwise.

NPER assumes the same payment every period at one fixed rate. If the amounts change from year to year, NPER can't model them. For uneven cash flows, the NPV function guide shows how to value a series of different amounts. NPER also doesn't include fees, rate changes or missed payments, so treat it as a planning estimate and check the lender's own figures for a real decision.

Practise it#

NPER questions test whether you can match units, set the signs and round the result the right way. Practise relative and absolute references in a live spreadsheet: you type the formula and it checks it instantly. Then try the department budget practice, which combines SUM, AVERAGE, ROUND and locked references the way a finance sheet does, and finish with the finance Excel test when you're ready.

Try it yourself

This is a live spreadsheet. Type the formula in the green cell and press Enter.

A 0% store financing deal: you owe 2,450 and pay 200 a month. With a zero rate, NPER simply divides, and you still have to round up. In B5, use ROUNDUP to find how many monthly payments it takes, then press Enter.

fx
ABCD
1
Amount owed
2450
2
Monthly payment
200
3
Interest rate
0
4
5
Payments needed
6
7
8

Tip: =ROUNDUP(B1/B2,0). 2,450 divided by 200 is 12.25, and a part payment still counts as a payment, so round up to 13.

Practise this in a lesson

LessonPractice: department budgetCombine SUM, AVERAGE, ROUND and absolute references in a realistic budget sheet.LessonRelative vs absolute references ($)Lock a cell with $ so it doesn't move when you copy a formula, one of the most-tested Excel skills.Function guideROUNDRound to decimals, whole numbers or the nearest thousand with Excel's ROUND. Learn when formatting isn't enough, then practice live.

Frequently asked questions

What does NPER mean in Excel?

+

NPER means number of periods. The NPER function returns how many equal payments it takes to pay off a loan, or how many deposits it takes to reach a savings target, at a fixed interest rate.

How do I calculate how many months to pay off a loan in Excel?

+

Use =NPER(annual rate/12, -monthly payment, loan amount). For 20,000 at 6% with 500 a month, =NPER(6%/12,-500,20000) returns about 44.74, so it takes 45 monthly payments.

Why does NPER return #NUM!?

+

Usually the payment is too small to cover the interest, so the balance never goes down. It can also happen when the payment and the loan have the same sign. Check that the payment is negative and larger than the interest per period.

Why is the NPER result a decimal?

+

The last payment is usually smaller than the others. A result of 44.74 means 44 full payments and a smaller 45th one. Use =ROUNDUP(NPER(...),0) to show the number of payments you will actually make.

How do I convert NPER months into years?

+

Divide by 12 for decimal years, or split it into whole years and months with INT and MOD. For 45 months, =INT(45/12) gives 3 years and =MOD(45,12) gives 9 months.

Sources

  • PMT function - Microsoft Support
  • ROUNDUP function - Microsoft Support
  • MOD function - Microsoft Support

Written and checked by the ExcelReady Team. First published November 3, 2026. The practice exercise runs in the same formula engine as our lessons. Found a mistake? Read our editorial policy or email hello@excelready.app.

On this page

  1. What does the NPER function do?
  2. How to work out how long it takes to pay off a loan
  3. How to show the result in years and months
  4. How much faster do bigger payments pay off a loan?
  5. How long does it take to reach a savings goal?
  6. Why does NPER return #NUM! or a negative number?
  7. The type argument, and how NPER relates to NPV
  8. Practise it

Keep reading

Math· 6 min read

PMT Function in Excel: Calculate a Loan Payment

PMT returns the regular payment for a loan with a fixed interest rate. Write =PMT(rate, nper, pv): the interest rate per period, the number of payments and the loan amount. For a 20,000 loan at 6% a year over 5 years, paid monthly, =PMT(6%/12,5*12,20000) returns -386.66. The minus sign means money you pay out.

Math· 6 min read

NPV Function in Excel: Net Present Value Explained

NPV returns the net present value of future cash flows at a given discount rate. Write =NPV(rate, values) for the cash flows from year 1 onward, then add the upfront cost separately: =NPV(8%,B3:B7)+B2. NPV assumes every value arrives at the end of a period, so putting the year-0 cost inside the function discounts it by mistake.

Math· 6 min read

Absolute References and the $ Sign in Excel

An Excel absolute reference uses dollar signs, like $F$1, to lock a cell so it doesn't change when you copy or fill a formula. Use it for a value every row shares, such as a tax rate: =B2*(1+$F$1). Press F4 while editing to add the $ signs. $F1 locks only the column; F$1 locks only the row.

More on math

  • How to Calculate NPS (Net Promoter Score) in Excel
  • Calculate the Payback Period in Excel
  • Percent Change Formula in Excel (With Examples)
  • Percentage Formula in Excel: 5 Everyday Calculations
  • How to Calculate Percentage of Total in Excel
  • PERCENTILE and QUARTILE in Excel, Explained Simply
All math articles →

Don't just read about Excel. Do it.

Practise real formulas in a live spreadsheet with instant feedback, right in your browser. Nothing to download.

Start learning for free