DEV Community

Priya Patel
Priya Patel

Posted on

Amortization Tables Explained: The Math Behind Any Loan

Amortization Tables Explained: The Math Behind Any Loan

If you have ever wondered why your mortgage payment is mostly interest in year one and mostly principal in year twenty, this post breaks it down — with actual numbers and a plain-English explanation of how amortization works.

What Is Amortization?

Amortization is the process of spreading loan payments over time so that each payment covers:

  1. The interest accrued that period
  2. A reduction in the principal balance

Early in the loan is life, interest makes up most of the payment. As the principal shrinks, less interest accrues, so more of each payment goes toward the principal. This is why your balance drops slowly at first and accelerates toward the end.

The word "amortize" comes from the Latin admortire, meaning "to kill off" — as in, killing off the debt.

The Core Formula

Every amortizing loan uses this payment formula:

M = P * [r(1+r)^n] / [(1+r)^n - 1]
Enter fullscreen mode Exit fullscreen mode

Where:

  • M = monthly payment
  • P = principal (amount borrowed)
  • r = monthly interest rate (annual rate ÷ 12)
  • n = total number of payments (years × 12)

Here is the same formula in JavaScript:

function calculateMonthlyPayment(principal, annualRate, years) {
  const r = annualRate / 100 / 12;
  const n = years * 12;
  if (r === 0) return principal / n;
  const payment = principal * (r * Math.pow(1 + r, n)) / (Math.pow(1 + r, n) - 1);
  return Math.round(payment * 100) / 100;
}

// Example: $250,000 mortgage at 6.5% for 30 years
calculateMonthlyPayment(250000, 6.5, 30);
// → 1580.17
Enter fullscreen mode Exit fullscreen mode

That $1,580.17/month is the same regardless of how the balance changes. What is different each month is how that payment is split between interest and principal.

Building an Amortization Table

Here is how the split works for the first month of our example:

function buildAmortizationRow(balance, annualRate, payment) {
  const monthlyRate = annualRate / 100 / 12;
  const interest = Math.round(balance * monthlyRate * 100) / 100;
  const principal = Math.round((payment - interest) * 100) / 100;
  const newBalance = Math.round((balance - principal) * 100) / 100;
  return { interest, principal, newBalance };
}

// Month 1
buildAmortizationRow(250000, 6.5, 1580.17);
// → { interest: 1354.17, principal: 226.00, newBalance: 249773.00 }
Enter fullscreen mode Exit fullscreen mode

That month: $1,354 goes to interest, $226 goes to principal.

By month 180 (year 15), the split looks very different:

// Running the same function with a 15-year-old balance
buildAmortizationRow(199412.50, 6.5, 1580.17);
// → { interest: 1079.32, principal: 500.85, newBalance: 198911.65 }
Enter fullscreen mode Exit fullscreen mode

Now $1,079 goes to interest, $500 goes to principal. The principal portion has more than doubled.

The Interest-Principal Flip

This is the part that surprises most people:

Year Total Paid Interest Principal Balance
1 $18,962 $16,147 $2,815 $247,185
10 $189,620 $126,823 $62,797 $198,456
20 $189,620 $61,000 $128,620 $96,000
30 $189,620 $0 $189,620 $0

By year 10, you have paid $189,620 but only reduced the balance by $51,544. That is because $126,823 went to interest.

This is why extra payments early in the loan are so powerful — they skip the interest and go straight to principal, and that principal reduction compounds forward, skipping all future interest on that amount.

The Extra Payment Effect

An extra $100/month on our example loan:

  • Reduces total interest by $29,000+
  • Cuts the loan term by 4+ years

The math works because skipping $100 of principal in month 1 means you recalculate all future interest on a $100 lower balance — and that saving repeats for every remaining month.

Why Understanding This Matters

Most loan calculators show you a number. Understanding amortization lets you:

  • Know why your balance barely moved in year one
  • Decide whether extra payments make sense for your situation
  • Understand why 15-year mortgages cost less in total interest than 30-year mortgages
  • Recognize when a "low payment" deal is actually expensive

If you want to run your own numbers without building the table by hand, the Loan Calculator at Everyday Tools Hub generates a full amortization schedule for any loan amount, rate, and term.


All calculations use the standard amortizing loan formula. Results are illustrative — actual payments may vary slightly due to rounding and escrow.

Top comments (0)