Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I recently calculated how long it would take to pay off a loan, and I would like to have someone check my math to make sure I'm doing it right.

I used the formula below: (i = APR/12, b = total balance due today, p = monthly payment amount)

n = ln((1 - i) * (b / p)) / ln(1 + i)

to calculate how many payments it would take to pay off the loan. Is this formula correct?

Also, there are multiple loans with different interest rates that I want to calculate how long the payoff would take overall. Would summing the balances together and taking the mean of the interest rates provide an accurate calculation with the above formula?

This isn't homework, I'm doing this calculation for real-world purposes.

share|cite|improve this question
up vote 1 down vote accepted

For i, you should use the contract interest/12, not APR/12, as APR includes fees charged by the lender which are already in the balance. This assumes it is a loan that amortizes in the sense that interest is added based on the current balance. Some loans use the "rule of 78s" which is less favorable to the borrower who prepays.

But no, if you have several loans you can't just average the balances and interest rates. If they are not too different it will not be far off. It will depend upon which loans you repay first, and you should repay the highest interest ones first. For an extreme example, suppose you have borrowed \$1 at 100%/day=36500%/year and \$1,000,000 at no interest. The average interest rate (dollar averaged) is small. But if you pay on the million dollar loan for 20 days, the other loan will be larger and you will never get out.

share|cite|improve this answer
Instead of using the mean of the interest rates x,y, use $ln(e^{(1+0.01x)+(1+0.01y)})$. – Angela Richardson Sep 10 '11 at 4:35
I will be making one payment, which will be divided among all the loans. I don't have control over which loans get paid off first, but presumably the lower balance ones will get paid first. The interest rates range from 5.25% to 9.75% – Kyle Trauberman Sep 10 '11 at 4:37
The important thing is interest rate, not balance. You have to pay the balances, so you want to minimize the interest. If you are paying off in a few years it won't matter too much-the parameter you expand it is interest*duration. If that is <<1 (so duration is <<15) you will be close. I suspect it is better to make a spreadsheet model. Define how much you will pay in total each month, apply it to each loan (min payment for each loan, any excess on the highest rate), and as each loan pays off move it to other loans. – Ross Millikan Sep 10 '11 at 4:39
If you are making one payment, you need to assess whether the option you are presented is better or worse than being in control yourself. The spreadsheet suggested at the end of the last comment is your other option, so a comparison is in order. – Ross Millikan Sep 10 '11 at 4:46
If you don't know how much goes to each loan, you don't know when each pays off. It sounds like somebody is offering to take a payment every month for some number of months and satisfy all the loans. If so, you should calculate where you will be, making the same total payment every month, but allocating it the way you would like. If you still owe something, take the deal. If you pay it off earlier, refuse. – Ross Millikan Sep 10 '11 at 4:58

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.