A Step by Step Guide to Understanding and Deriving the Loan Payment Formula

#loanpayment
By Kamyar M. Davoudi

Introduction

When taking out a loan, whether it's a mortgage, car loan, or personal loan, understanding how your monthly payments are calculated is crucial. In this article, we'll walk through the mathematical derivation of the loan payment formula, making it clear how financial institutions determine your regular payment amounts.

Full Derivation of Loan Payment Formula

  1. First, let's understand what happens in each payment period:
    • Initial loan amount is $L$
    • Each payment is $P$
    • Interest rate per period is $r/n$ (annual rate/periods per year)
    • Loan term (Total number of years of the loan) = $t$
      (for example, for a 30-year mortgage, $t = 30$)
    • Total number of periods is $N = nt$
  2. Let's track what the loan balance ($B$) is after each payment:

    After period 1:

    • Interest charged = $L (\frac{r}{n})$
    • New balance before payment = $L + L(\frac{r}{n}) = L(1 + \frac{r}{n})$
    • After payment: $B_1 = L(1 + \frac{r}{n}) - P$

    After period 2:

    • Interest charged = $B_1(\frac{r}{n})$
    • New balance before payment = $B_1(1 + \frac{r}{n})$
    • After payment: $B_2 = B_1(1 + \frac{r}{n}) - P$
  3. Let's substitute $B_1$ into $B_2$:
    $
    \begin{aligned}
    B_2 &= \left[L(1 + \frac{r}{n}) - P\right](1 + \frac{r}{n}) - P\\
    &= L(1 + \frac{r}{n})^2 - P(1 + \frac{r}{n}) - P
    \end{aligned}
    $
  4. After period 3:
    $
    \begin{aligned}
    B_3 &= \left[L\left(1 + \frac{r}{n}\right)^2 - P\left(1 + \frac{r}{n}\right) - P\right]\left(1 +\frac{r}{n}\right) - P\\
    &= L\left(1 + \frac{r}{n}\right)^3 - P\left(1 + \frac{r}{n}\right)^2 - P\left(1 +\frac{r}{n}\right) - P
    \end{aligned}
    $
  5. We can see a pattern forming. After k payments:
    $
    B_k = L\left(1 + \frac{r}{n}\right)^k - P\left[\left(1 +\frac{r}{n} \right)^{k-1} + \left(1 + \frac{r}{n}\right)^{k-2} + \cdots + \left(1 + \frac{r}{n}\right) + 1\right]
    $
  6. The sum in brackets is a geometric series with:
    • First term = 1
    • Ratio = $(1 + r/n)$
    • $k$ terms
  7. Using the geometric series sum formula:
    $
    \begin{aligned}
    \text{Sum}& = \frac{1 - \left(1 +\dfrac{r}{n}\right)^k}{1 - \left(1 + \dfrac{r}{n}\right)}\\[9pt]
    &= \frac{\left(1 + \dfrac{r}{n}\right)^k - 1}{\dfrac{r}{n}}
    \end{aligned}
    $
  8. Therefore, after $k$ payments:
    $
    B_k = L\left(1 + \frac{r}{n}\right)^k - P\left[\frac{\left(1 + \dfrac{r}{n}\right)^k - 1}{\dfrac{r}{n}}\right]
    $
  9. At the end of the loan ($k = N = nt$), the balance should be zero:
    $
    0 = L\left(1 + \frac{r}{n}\right)^{nt} - P\left[\frac{\left(1 + \dfrac{r}{n}\right)^{nt} - 1}{\dfrac{r}{n}}\right]
    $
  10. Solve for $P$:
    $
    \boxed{\begin{aligned}
    P &= L\left(\frac{r}{n}\right)\frac{\left(1 + \dfrac{r}{n}\right)^{nt}}{\left(1 + \dfrac{r}{n}\right)^{nt} - 1}\\[9pt]
    &= L\frac{\dfrac{r}{n}}{1 - \left(1 + \dfrac{r}{n}\right)^{-nt}}
    \end{aligned}}
    $

Verification with Simple Numbers

Let's verify with a one-period loan (N = 1):

  • Borrow $1000 at 12% for one period
  • P = 1000(0.12)/(1 - 1.12⁻¹) = 1120

After one period:

  • Interest charged = 1000 × 0.12 = 120
  • Balance before payment = 1120
  • Payment = 1120
  • Final balance = 0

This shows our formula works! For longer periods, the formula ensures:

  1. Each payment covers the interest due
  2. Remaining amount goes to principal reduction
  3. Loan is fully paid off at the end of the term

Example

Suppose you want to buy a car for $20,000 with an annual interest rate of 6%, to be repaid over 5 years with monthly payments. How much will be your monthly payments?

In this example,

  • $L=20,000$
  • $r=6\%=0.06$
  • $n=12$ (there will be 12 payments in a year)
  • $t=5$

Now we plug these numbers in the formula that we derived:
$
P=L\frac{\dfrac{r}{n}}{1 - \left(1 + \dfrac{r}{n}\right)^{-nt}}
$

$
P= 20,000 \frac{\frac{0.06}{12}}{1-\left(1+\frac{0.06}{12}\right)^{-5\times 12}}=386.66
$

So, in this example, your monthly payments will be $386.66.