# solving for time on a student loan with a given monthly payment

I am trying to calculate the amount of time it will take for me to pay off my student loan with a fixed monthly payment amount. I have been trying to solve this problem for a few days now to no avail. Using the information i have gathered from the internet and the various calculators online for calculating the monthly payment. I cant figure out the formula that is being used. Everywhere it states that student loans are simple interest but it seems like this is not the full truth.

So far iv been able to get "close" to the numbers that they provide by using this formula.

                       A = P ( (r/365) * (Q * (t*365) ) )
Simplified   A = P (rQt)
Total amount for t years = A + P
Solve for t  t = PrQ/A


where: A = monthly payment P = principle r = percent/100 t = time in years or * 12 for months Q = (2.729/5)*365t ~= 199.219 which has something to do with the amount of days you attend a year of schooling but from my research this number varies very slightly based on time and rate. This includes fall semester, spring semester, winter semester, and summer semester but excludes days off. My thinking is because this loan is given out specifically for those time periods only and not to be used throughout a full 365 days like an auto loan.

So my question is what is the equation for calculating how long it will take to pay off a student loan with (P) amount, (r) interest and (A) monthly payment amount? It seems as though this will not be an algebraic equation but a calculus one instead. Here is one the calculators i have used so far out of maybe 10 https://smartasset.com/student-loans/student-loan-calculator

• @311411 Where can i find the documentation for the loan? also if you still remember it can you please post or point me in the right direction? Jul 30 at 19:48
• @Andrey Please post a link to one of these calculators and a numerical example what you have input. Jul 30 at 20:59
• @callculus I just updated my post with a link to a pretty good calculator and Iv tried a few different test values. One example being: P = 10,000 r = 5% or 0.05 Q = 2.729/5 t = 365 for 1 year or 3650 for 10 years. Values I have tried for P are 1,000/10,000/100,000. Values Iv tried for r are 1%,5%,10%,15%. values Iv tried for t are 1 year and 10 years. Q has fluctuated from 2.563 for loans 1,000-100,000 with 1% interest and 10 years to Q = 3.12 for loans 1,000-100,000 with 15% interest and 10 years. Ultimately I can create a jank formula that will be close but Id rather not do that. Jul 30 at 21:23
• @Andrey I´ve posted an answer. I used the example of the website. Jul 31 at 4:57

I don´t know what you mean by $$Q$$. I will use the numbers which are mentioned the website you´ve posted. But first of all I solve the general formula for the time ($$n$$).

$$L\cdot\left( \left( 1+\frac{i}{m}\right)^{m}\right)^n=p\cdot \frac{\left(\left(1+\frac{i}{m}\right)^{m}\right)^n-1}{\frac{i}{m}}$$

$$L$$ is the loan amount. $$p$$ is the regular payment. $$i$$ is the yearly interest rate. $$n$$ is the number of years.

$$m$$ divides the year in $$m$$ equal parts. If the payment is made and compunded $$\color{orange}{\textrm{monthly}}$$ ($$\color{blue}{\textrm{daily}}$$, $$\color{green}{\textrm{semi-annually}}$$, $$\color{red}{\textrm{yearly}}$$) then $$m$$ is $$\color{orange}{\textrm{12}}$$ ($$\color{blue}{\textrm{365}}$$, $$\color{green}{\textrm{2}}$$, $$\color{red}{\textrm{1}}$$)

Dividing the equation by $$p$$ and multiplying it by $$\frac{i}{m}$$

$$\frac{L}{p}\cdot \frac{i}{m}\cdot \left( \left( 1+\frac{i}{m}\right)^{m}\right)^n= \left(\left(1+\frac{i}{m}\right)^{m}\right)^n-1$$

Adding $$1$$ and subtracting the whole left side.

$$1= \left(\left(1+\frac{i}{m}\right)^{m}\right)^n-\frac{L}{p}\cdot \frac{i}{m}\cdot \left( \left( 1+\frac{i}{m}\right)^{m}\right)^n$$

Factoring out the term in the brackets.

$$1= \left(\left(1+\frac{i}{m}\right)^{m}\right)^n\cdot \left( 1-\frac{L}{p}\cdot \frac{i}{m}\right)$$

$$\frac1{ 1-\frac{L}{p}\cdot \frac{i}{m}}= \left(\left(1+\frac{i}{m}\right)^{m}\right)^n$$

Taking logs. I use the logarithm naturalis here, which is based on $$e$$. But you can take other logarithms as well.

$$\ln\left(\frac1{ 1-\frac{L}{p}\cdot \frac{i}{m}}\right)=\ln\left(\left(\left(1+\frac{i}{m}\right)^{m}\right)^n\right)$$

The exponent n can be put infront of the $$\ln$$-function, due logarithm rule $$\ln(a^n)=n\cdot \ln(a)$$

$$\ln\left(\frac1{ 1-\frac{L}{p}\cdot \frac{i}{m}}\right)=n\cdot \ln\left(\left(1+\frac{i}{m}\right)^{m}\right)$$

For the left side we can use that $$\ln\left(\frac1a\right)=-\ln(a)$$

$$-\ln\left( 1-\frac{L}{p}\cdot \frac{i}{m}\right)=n\cdot \ln\left(\left(1+\frac{i}{m}\right)^{m}\right)$$

$$n=\frac{-\ln\left( 1-\frac{L}{p}\cdot \frac{i}{m}\right)}{\ln\left(\left(1+\frac{i}{m}\right)^{m}\right)}=-\frac{\ln\left( 1-\frac{L}{p}\cdot \frac{i}{m}\right)}{m\cdot\ln\left(1+\frac{i}{m}\right)}$$

The given numbers of the linked site $$L=28400, p=297, m=\color{orange}{\textrm{12}}$$ and $$i=0.0466$$ we obtain

$$n=-\frac{\ln\left( 1-\frac{28400}{297}\cdot \frac{0.0466}{12}\right)}{12\cdot\ln\left(1+\frac{0.0466}{12}\right)}=9.97979 \approx 10$$

Remark

At the calculator the payment of $$p=297$$ has been rounded to dollars, without cents. I have calculated with the formula above a payment of $$296.528$$. See here the equation and the result. If I use this value of $$p$$ the result for $$n$$ is even more closer to $$10$$. Nevertheless $$n$$ must be an integer.

• I really appreciate you going through all the effort and explaining this to me. Im not sure where on that website you found that formula but through my recent searches for a Daily Simple Interest formula I stumbled upon an Amortization formula which is also used for mortgage loans and it just so happens to be the exact same formula you used on wolfram alpha. So my search that started out with simple interest formula A = P * r * t as per Google. Became this M=P[r(1+r)^n/((1+r)^n)-1)] which is used for mortgage loans and is not a simple daily interest formula at all. Thank you so much once again Jul 31 at 5:06
• @Andrey You´re welcome. I haven´t found the formula. I know that formula from my university lectures in economics. If you have no further question accept this answer. Thanks in advance. Jul 31 at 16:44