Last updated
How Loan Amortization Works
A loan amortization schedule breaks down each payment into its interest and principal components. Early payments are mostly interest; later payments are mostly principal. This is because interest is calculated on the remaining balance — as you pay down the principal, less interest accrues each month.
Monthly Payment Formula
M = P × [r(1+r)ⁿ] / [(1+r)ⁿ - 1]
Where:
M = Monthly payment
P = Principal (loan amount)
r = Monthly interest rate (annual rate / 12 / 100)
n = Total number of payments (years × 12)
Example: $200,000 loan at 6.5% for 30 years
r = 6.5 / 12 / 100 = 0.005417
n = 360
M = $200,000 × [0.005417 × (1.005417)³⁶⁰] / [(1.005417)³⁶⁰ - 1]
M = $1,264.14/month
Total Cost Comparison
| Loan Term | Monthly Payment | Total Paid | Total Interest |
|---|---|---|---|
| 15 years | $1,742 | $313,560 | $113,560 |
| 20 years | $1,491 | $357,840 | $157,840 |
| 30 years | $1,264 | $455,040 | $255,040 |
Based on $200,000 at 6.5% interest.
JavaScript Amortization Calculator
function amortize(principal, annualRate, years) {
const r = annualRate / 100 / 12;
const n = years * 12;
const M = principal * (r * Math.pow(1+r, n)) / (Math.pow(1+r, n) - 1);
let balance = principal;
const schedule = [];
for (let i = 1; i <= n; i++) {
const interest = balance * r;
const pmt_princ = M - interest;
balance -= pmt_princ;
schedule.push({
month: i,
payment: M.toFixed(2),
interest: interest.toFixed(2),
principal: pmt_princ.toFixed(2),
balance: Math.max(0, balance).toFixed(2)
});
}
return { monthlyPayment: M.toFixed(2), schedule };
}