Mortgage Amortization Schedule
Generate a detailed month-by-month payment schedule showing principal, interest, and remaining balance for your mortgage.
Understanding Amortization
| Year | Principal % | Interest % | Remaining Balance |
|---|---|---|---|
| 1 | 25% | 75% | 98% |
| 10 | 45% | 55% | 82% |
| 20 | 70% | 30% | 48% |
| 30 | 98% | 2% | 0% |
Sample Amortization
For a $300,000 mortgage at 7% for 30 years:
| Month | Payment | Principal | Interest | Balance |
|---|---|---|---|---|
| 1 | $1,996 | $246 | $1,750 | $299,754 |
| 12 | $1,996 | $264 | $1,732 | $296,989 |
| 60 | $1,996 | $339 | $1,657 | $282,556 |
| 180 | $1,996 | $598 | $1,398 | $238,574 |
| 360 | $1,996 | $1,984 | $12 | $0 |
Implementation
``javascript
function generateAmortization(principal, annualRate, months) {
const schedule = [];
const monthlyRate = annualRate / 100 / 12;
const payment = principal * (monthlyRate * Math.pow(1 + monthlyRate, months)) /
(Math.pow(1 + monthlyRate, months) - 1);
let balance = principal;
for (let month = 1; month <= months; month++) {
const interest = balance * monthlyRate;
const principalPaid = payment - interest;
balance -= principalPaid;
schedule.push({ month, payment, principal: principalPaid, interest, balance: Math.max(0, balance) });
}
return schedule;
}
``