to calculate how long to pay off student loan if x is original sum y is annual repayment z% is annual interest rate is there a simple formula to calculate length of repayments without doing annual calculations?
Let me see.
I'm going to use my own letters.
R is the yearly repayment.
A is the original amount of the loan
n = number of years
i = yearly interest rate as a decimal. For example if the rate is 6% per annum then i=6/100=0.06
$$A=R\times \frac{1-(1+i)^{-n}}{i}$$
Now the aim is to make n the subject
$$\begin{array}{rll}
\frac{Ai}{R}&=& 1-(1+i)^{-n}\\\\
(1+i)^{-n}&=& 1-\frac{Ai}{R}\\\\
log\left((1+i)^{-n}\right)&=& log\left(1-\frac{Ai}{R}\right)\\\\
-n\times log(1+i)&=& log\left(1-\frac{Ai}{R}\right)\\\\
n &=&\:\dfrac{-log\left(1-\frac{Ai}{R}\right)}{log(1+i)}\\\\
\end{array}$$
Let me see.
I'm going to use my own letters.
R is the yearly repayment.
A is the original amount of the loan
n = number of years
i = yearly interest rate as a decimal. For example if the rate is 6% per annum then i=6/100=0.06
$$A=R\times \frac{1-(1+i)^{-n}}{i}$$
Now the aim is to make n the subject
$$\begin{array}{rll}
\frac{Ai}{R}&=& 1-(1+i)^{-n}\\\\
(1+i)^{-n}&=& 1-\frac{Ai}{R}\\\\
log\left((1+i)^{-n}\right)&=& log\left(1-\frac{Ai}{R}\right)\\\\
-n\times log(1+i)&=& log\left(1-\frac{Ai}{R}\right)\\\\
n &=&\:\dfrac{-log\left(1-\frac{Ai}{R}\right)}{log(1+i)}\\\\
\end{array}$$