How it works · Math of money
How to Calculate How Long to Pay Off a Loan
Work out how many months a loan takes to pay off with the loan-term formula, a calculator, worked examples and what extra payments change.
Checked against 11 sources (9 textbook, course or government) · By Ambient Math editors
The short answer. Divide the interest charged each month by the payment, subtract that share from 1, and take the logarithm: n = −ln(1 − P×i/PMT) / ln(1 + i), rounded up to a whole payment2. A $140,000 mortgage at 6% paid at $1000 a month is gone in about 20 years1.
- Formula
- n = −ln(1 − P×i/PMT) / ln(1 + i)2
- Always
- Round n up to the next whole payment; the last payment may be smaller2
- Example
- $140,000 at 6% paid at $1000 a month: about 20 years1
- Credit cards
- Statements must show minimum-payment payoff time and the monthly payment for 36 months3
On this page
- How to calculate how long it takes to pay off a loan
- How to calculate the payoff period, step by step
- Worked example 1: a $140,000 mortgage paid at $1000 a month
- Worked example 2: a credit card balance
- How to pay off a 5 year loan in 4 years
- How do I pay off my 30 year loan in 15 years?
- What extra payments do
- In a spreadsheet
- Reading an amortization schedule
- Mistakes that spoil the answer
- Next steps
A loan has no built-in end date. The end date comes out of three numbers: what you owe, the interest rate, and the amount you pay each month. Change any of them and the finish line moves. Below you get the formula that turns those three numbers into a number of months, a calculator, worked examples from a mortgage and a credit card, and what extra payments really change. The arithmetic is the point. It does not tell you whether to borrow or prepay; for your own case, talk to a licensed counselor. The money section collects the neighboring formulas.
How to calculate how long it takes to pay off a loan
A standard loan works like a payout annuity: the lender hands you a lump sum and you pay it back in regular installments1. The loan formula assumes payments on a regular schedule and interest charged on the balance1. The compounding frequency follows how often you pay1. This holds for conventional, also called amortized or installment, loans such as auto loans and home mortgages1, and not for payday loans, add-on loans or other types where the interest is calculated up front1.
When the term is unknown, the first step is to calculate N, the number of payments, using a formula or a financial calculator2. The same method serves a loan, a retirement plan or a savings goal2. For a loan with a known balance, the textbook adjusts the present-value formula to isolate N: n = −ln(1 − P×i/PMT) / ln(1 + i)2. Here P is the balance, i the interest rate per month and PMT the monthly payment.
| Symbol | Meaning | How to get it |
|---|---|---|
| P | What you owe now | Statement or payoff quote |
| i | Interest rate per month | Yearly APR divided by 1211 |
| PMT | Payment each month, principal and interest only | Loan statement; no fees or taxes9 |
| n | Number of payments left | The formula; round up2 |
Dividing the APR by 12 is an appropriate way to get the monthly rate11. The payment counts principal and interest only, not fees or taxes9.
The condition: the payment must beat the interest
There is a minimum payment necessary to exceed the interest added to the loan and make progress to pay it off11. In the formula that shows up as P×i/PMT: when it reaches 1 the logarithm has nothing to work on and the loan never ends. Worked example (our arithmetic): a $1,000 balance at 12% a year has i = 0.01, so the monthly interest is 1,000 × 0.01 = 10.00. A payment of 10.00 only covers the interest, and the balance never moves1.
How to calculate the payoff period, step by step
- Write down P, the yearly rate and the payment. Use the payoff balance, not the original loan amount: the original amount is not needed to find a balance or a payoff time1.
- Convert the rate. Divide the APR by 12 to get i11.
- Compute the interest share. P × i is the first month's interest; divide it by the payment7.
- Subtract that share from 1 and take the natural logarithm. Take the log of both sides, the method the LibreTexts solution uses1.
- Divide by ln(1 + i) and flip the sign to get n2.
- Round n up to the next whole payment: the last payment may be smaller than the others2.
- Convert to years. Once N is known it can be used to work out the time2.
Try your own numbers
Loan payoff calculator
Fixed rate, equal monthly payments, no fees, taxes or insurance. Your numbers are processed locally in the browser and never uploaded.
- Payments needed
- –
- Time to pay off
- –
- Total interest
- –
It opens on the first worked example below, so you can see it match the textbook.
Worked example 1: a $140,000 mortgage paid at $1000 a month
A LibreTexts example takes a $140,000 mortgage at 6% over 30 years; the monthly payment is $839.371. It then asks how long the loan lasts if the homeowner increases the payment to $1000 per month1. The answer is about 20 years1. By raising the payment by about 20%, the borrower shortens the loan by about 33% and cuts interest by more than $60,0001.
Worked example (our arithmetic). Inputs from1: P = 140,000, APR 6%, PMT = 1,000. Formula from2.
| Step | Calculation | Result |
|---|---|---|
| Monthly rate i | 0.06 / 12 | 0.00511 |
| Interest in month 1 | 140,000 × 0.005 | 700.002 |
| Interest share of payment | 700 / 1,000 | 0.72 |
| 1 − share | 1 − 0.7 | 0.32 |
| ln(0.3) | natural log | −1.2039732 |
| ln(1.005) | natural log | 0.0049882 |
| n | −(−1.203973) / 0.004988 | 241.402 |
| Rounded up | next whole payment | 242 payments2 |
| In years | 242 / 12 | 20 years 2 months (20.12 years)2 |
| Total interest | 1,000 × 241.40 − 140,000 | 101,396.052 |
| 30-year plan interest | 839.37 × 360 − 140,000 | 162,173.201 |
| Interest saved | 162,173.20 − 101,396.05 | 60,777.152 |
The $60,777.15 matches the “more than $60,000” in the source1. Because 241.40 rounds up to 242, the 242nd payment is a small one, a fraction of the $10002.
Worked example 2: a credit card balance
Credit cards use the same formula with a monthly rate. Joel puts a $1,000 laptop on a card at 12% compounded monthly and pays $30 a month; the LibreTexts solution reads 3.396 years, about 3.4 years1.
Worked example (our arithmetic). Inputs from1: P = 1,000, APR 12%, PMT = 30. i = 0.12 / 12 = 0.01. Interest in month 1 = 1,000 × 0.01 = 10.00. n = −ln(1 − 10/30) / ln(1.01) = 0.405465 / 0.009950 = 40.75, rounded up to 41 payments, or 3.40 years2.
Now vary the payment on the same $1,000 balance1.
| Monthly payment | Payments (n) | Years | Total interest |
|---|---|---|---|
| $10 | Never (covers the interest only) | – | –11 |
| $20 | 69.66, so 70 | 5.8 | 393.211 |
| $25 | 51.34, so 52 | 4.3 | 283.441 |
| $30 | 40.75, so 41 | 3.4 | 222.471 |
| $40 | 28.91, so 29 | 2.4 | 156.471 |
| $50 | 22.43, so 23 | 1.9 | 121.291 |
Raising the payment from $20 to $50 more than halves the number of years and cuts the interest by about 272 (our arithmetic). A card statement reports the same thing. The Consumer Financial Protection Bureau explains that issuers must show how long it will take to pay off the balance with no further charges and only the minimum due each month3. They must also show the monthly payment that clears the current balance in 36 months3. Those figures use the balance as of the statement date and ignore future purchases3. If you pay only the minimum, it could take years3.
What the 36-month figure is
The federal rule that sets the 36-month figure calls for the monthly payment that would pay off the balance within 36 months, assuming the same amount each month5. That is the loan payment formula, run backwards. Worked example (our arithmetic): for the $1,000 at 12% above, the 36-month payment is 33.21 a month, with 195.72 of total interest5. The rule assumes no new purchases, fees or other charges5, applies the rates that apply to the account5, and treats an estimate as accurate when it is within 10 percent5.
How to pay off a 5 year loan in 4 years
Shortening a term is the loan formula with a smaller n, solved for the payment. Take the LibreTexts auto loan: $11,120 at 3% interest over 60 months, with a $200 monthly payment1. The $200 is a rounded figure, so the table uses the exact 60-month payment.
Worked example (our arithmetic). Inputs from1: P = 11,120, APR 3%, i = 0.03 / 12 = 0.0025.
| Term | Monthly payment | Total repaid | Interest |
|---|---|---|---|
| 60 months | 199.81 | 11,988.71 | 868.711 |
| 48 months | 246.13 | 11,814.42 | 694.421 |
| Difference | +46.32 (46.13 above the source’s $200) | −174.29 | −174.291 |
A longer term lowers the payment, and a shorter term lowers the interest paid over the life of the loan8. The saving here is about 174 (our arithmetic) on a loan with a low rate. At higher rates the same shortening saves much more.
How do I pay off my 30 year loan in 15 years?
Use the mortgage from the first example: $140,000 at 6%, with a 30-year payment of $839.371. Fifteen years is 180 payments.
Worked example (our arithmetic). Inputs from1: P = 140,000, i = 0.005, n = 180.
| Plan | Monthly payment | Total interest |
|---|---|---|
| 30 years, 360 payments | 839.371 | 162,173.201 |
| 15 years, 180 payments | 1,181.40 | 72,651.921 |
| Difference | +342.03 a month | −89,521.281 |
Half the time costs about 41% more each month and saves roughly 89,500 of interest (our arithmetic). Most of the saving comes from the early years, when the balance is high: at the beginning of the term you owe more interest because the balance is still high, and over time more of each payment goes to principal7.
What extra payments do
A payment larger than the required one shortens the loan as a larger fixed payment would, though nothing obliges you to keep it up. Here is the $140,000 mortgage1 again at several fixed payments.
Worked example (our arithmetic). Inputs from1: P = 140,000, APR 6%.
| Monthly payment | Payments | Years | Total interest |
|---|---|---|---|
| 900 | 302 | 25.1 | 131,410.201 |
| 1,000 | 242 | 20.1 | 101,396.051 |
| 1,100 | 203 | 16.9 | 83,108.121 |
| 1,181.40 | 180 | 15.0 | 72,651.871 |
| 1,500 | 127 | 10.5 | 49,053.661 |
The same pattern holds for the federal example loan of $100,000 over 30 years at 4%, which has a monthly principal and interest payment of $47710.
Worked example (our arithmetic). Inputs from10: P = 100,000, APR 4%, base payment 477.42 before rounding, extra amounts added every month.
| Extra per month | Payments | Years | Total interest |
|---|---|---|---|
| 0 | 360 | 30.0 | 71,869.5110 |
| 50 | 301 | 25.0 | 58,441.8310 |
| 100 | 259 | 21.6 | 49,404.8210 |
| 200 | 204 | 17.0 | 37,894.5910 |
Each extra $100 a month saves about 22,465 of interest here (our arithmetic). A caution from the same federal page: the total monthly payment you send is often higher than the principal and interest payment, because it can include taxes and insurance10. Extra money should go against the principal and interest part only.
Prepayment penalties
A prepayment penalty is a fee some lenders charge if you pay off all or part of your mortgage early4. Not all mortgages have one4. Typically it applies only if you pay off the entire balance within a specific number of years, usually three or five, for example because you sold the home or refinanced4. It could also apply when you pay a large amount all at once4. Prepayment penalties do not normally apply to extra principal paid in small chunks, but it is wise to double check with the lender4. Federal rules for most mortgages limit a penalty: it must not apply after three years, and it must not exceed 2 percent of the balance prepaid in the first two years or 1 percent in the third6. Ask for a quote on a similar loan without a penalty so you can compare total costs4.
In a spreadsheet
Excel’s NPER function returns the number of periods for an investment based on periodic, constant payments and a constant interest rate9. Rate is the interest rate per period, so for monthly payments divide the yearly rate by 12911. The payment cannot change over the life of the annuity, and it typically holds principal and interest but no other fees or taxes9. The future value is assumed to be 0 when you leave it out, because the future value of a loan is 09.
Worked example (our arithmetic). For the first example, enter the payment as a negative number and the balance as positive: =NPER(6%/12, -1000, 140000) returns 241.40, the same n as above1.
Reading an amortization schedule
The chart showing how much of each payment goes toward principal and interest is called an amortization schedule8. Each month part of the payment pays down principal and part pays interest7. The LibreTexts schedule for the 6% mortgage starts with $350.00 of interest and $489.37 of principal in month 1 from the $839.37 payment1. Notice that the interest charge decreases each month as the balance decreases1. Only part of each payment reduces the balance: with $1,000 monthly payments, you would not have paid off $12,000 of the balance after a year1. The remaining balance after any number of payments follows the same idea: it is what the remaining payments can pay off. For a mortgage at 6% with $1,000 payments and 10 years left, that balance is $90,073.451.
Mistakes that spoil the answer
- Using the yearly rate as the monthly rate. Divide by 12 first11.
- Forgetting to round up. N is rounded up to the next whole payment, and the last payment may be smaller2.
- A payment below the interest. It never pays the loan off11.
- Misdating the first payment. The first payment is due one full payment period into the loan, not on day one11.
- Including taxes and insurance in PMT. The formula uses principal and interest only9.
- Ignoring rate changes. An adjustable-rate loan’s initial payments assume the initial rate stays the same for the entire term10; when the rate changes, run the calculation again on the new balance.
Next steps
Pick one loan, find the payoff balance and run it through the calculator above, then once more with a higher payment. If the loan is a mortgage, read the prepayment terms before sending extra money. The payment itself comes from the loan payment formula page, and the savings side of the same math is on the compound interest formula page. A balance that falls fast at first and slowly later is the same curve as the rate of change in calculus in everyday life. For the federal view of loan paydown, see the CFPB explanation of paying down a mortgage and the LibreTexts loans chapter.
Common questions
How to calculate time to pay off a loan?
Find the monthly rate i, then apply n = −ln(1 − P×i/PMT) / ln(1 + i)2, where P is the balance and PMT the payment. Round n up to a whole payment, because the last payment may be smaller2. Divide n by 12 to get years2.
Read next
Loan payment formula, step by step
The fixed monthly loan payment formula, a calculator, where it comes from, worked examples and common mistakes.
Math of moneyCompound Interest Formula: Examples and Calculator
The compound interest formula A = P(1 + r/n)^(nt) with a calculator, worked examples, solving for rate and time, APY and the Rule of 72.
Core ideasDerivative rules cheat sheet
Derivative rules of a first calculus course on one page: all six trig functions, a^x, logs, inverse trig, with examples.
Sources
- 6.4: Loans, College Algebra · LibreTexts, Highline College (Lippman, Math in Society) · math.libretexts.org · checked October 21, 2026
- 3.10 Number of Payments and Time: Formula Approach · eCampusOntario, Mathematics of Finance open textbook · ecampusontario.pressbooks.pub · checked October 21, 2026
- A box on my credit card bill says that I will pay off the balance in three years if I pay a certain amount. What does that mean? · Consumer Financial Protection Bureau · consumerfinance.gov · checked October 21, 2026
- What is a prepayment penalty? · Consumer Financial Protection Bureau · consumerfinance.gov · checked October 21, 2026
- Appendix M1 to Part 1026, Repayment Disclosures (Regulation Z) · Electronic Code of Federal Regulations · ecfr.gov · checked October 21, 2026
- 12 CFR 1026.43, Minimum standards for transactions secured by a dwelling (Regulation Z) · Electronic Code of Federal Regulations · ecfr.gov · checked October 21, 2026
- How does paying down a mortgage work? · Consumer Financial Protection Bureau · consumerfinance.gov · checked October 21, 2026
- What is amortization and how could it affect my auto loan? · Consumer Financial Protection Bureau · consumerfinance.gov · checked October 21, 2026
- NPER function · Microsoft Support · support.microsoft.com · checked October 21, 2026
- How do mortgage lenders calculate monthly payments? · Consumer Financial Protection Bureau · consumerfinance.gov · checked October 21, 2026
- Amortization calculator · Wikipedia · en.wikipedia.org · checked October 21, 2026
Published . Every source shows the day it was read. Diagrams: original, by the editors. How we check facts · Report an error.