[Math] How to solve for n (number of periods) in a loan repayment formula

finance

enter image description here

Where

  • A = payment Amount per period
  • P = initial Principal (loan amount)
  • r = interest rate per period
  • n = total number of payments or periods

How can I rearrange the formula to solve for n?

Best Answer

$$A = P \frac{r(1+r)^n}{(1+r)^n -1} \Rightarrow$$

$$A [(1+r)^n -1]= rP (1+r)^n \Rightarrow$$

$$(A-rP)(1+r)^n = A \Rightarrow$$

$$(1+r)^n = \frac{A}{A-rP}\Rightarrow$$

$$n = \log_{1+r} (\frac{A}{A-rP})$$

Related Question