Buying a home is often the largest financial decision a person makes, and understanding how your mortgage is structured is crucial for long-term financial health. This Mortgage Amortization Calculator helps you visualize exactly how your monthly payments are distributed between paying off your loan balance (principal) and paying the lender's fee (interest) over the life of the loan.
What is Mortgage Amortization?
Amortization refers to the process of spreading out a loan into a series of fixed payments over time. While your total monthly payment amount remains consistent for fixed-rate mortgages, the composition of that payment changes drastically over time.
In the early years of your mortgage, a significant majority of your payment goes toward interest. As time passes and the principal balance decreases, a larger portion of your payment is applied to the principal. This shift is clearly visible in the amortization schedule generated by our calculator above.
How to Use This Calculator
To get the most accurate results, input the following details:
Loan Amount: The total amount of money you are borrowing (Home Price minus Down Payment).
Interest Rate: The annual percentage rate (APR) offered by your lender.
Loan Term: The duration of the loan, typically 15 or 30 years.
Start Date: When you expect to make your first payment.
Once calculated, you will see your estimated monthly principal and interest payment, the total cost of the loan including interest, and a breakdown of your yearly progress.
Why the Loan Term Matters
Choosing between a 15-year and a 30-year mortgage impacts both your monthly budget and your total long-term costs:
30-Year Term: Lower monthly payments, but you will pay significantly more interest over the life of the loan.
15-Year Term: Higher monthly payments, but you build equity faster and pay far less in total interest.
Factors That Affect Your Amortization
Making extra payments toward your principal is the most effective way to change your amortization schedule. Even a small additional payment of $100 per month can shave years off your loan term and save you tens of thousands of dollars in interest. Check with your lender to ensure there are no prepayment penalties before making extra payments.
// Set default date to current month
(function() {
var today = new Date();
var month = (today.getMonth() + 1).toString().padStart(2, '0');
var year = today.getFullYear();
document.getElementById('macStartDate').value = year + "-" + month;
})();
function calculateMortgage() {
// 1. Get Inputs
var loanAmount = parseFloat(document.getElementById('macLoanAmount').value);
var interestRate = parseFloat(document.getElementById('macInterestRate').value);
var termYears = parseInt(document.getElementById('macLoanTerm').value);
var startDateValue = document.getElementById('macStartDate').value;
var errorDiv = document.getElementById('macErrorMessage');
var resultsDiv = document.getElementById('macResults');
// 2. Validate Inputs
if (isNaN(loanAmount) || isNaN(interestRate) || isNaN(termYears) || loanAmount <= 0 || interestRate < 0) {
errorDiv.style.display = 'block';
resultsDiv.style.display = 'none';
return;
}
errorDiv.style.display = 'none';
// 3. Calculation Logic
var monthlyRate = interestRate / 100 / 12;
var totalPayments = termYears * 12;
var monthlyPayment = 0;
// Handle 0% interest edge case
if (interestRate === 0) {
monthlyPayment = loanAmount / totalPayments;
} else {
// Standard Amortization Formula: M = P [ i(1 + i)^n ] / [ (1 + i)^n – 1 ]
var x = Math.pow(1 + monthlyRate, totalPayments);
monthlyPayment = (loanAmount * x * monthlyRate) / (x – 1);
}
var totalPaymentAmount = monthlyPayment * totalPayments;
var totalInterest = totalPaymentAmount – loanAmount;
// Calculate Payoff Date
var startYear = parseInt(startDateValue.split('-')[0]);
var startMonth = parseInt(startDateValue.split('-')[1]) – 1; // JS months are 0-11
var dateObj = new Date(startYear, startMonth);
dateObj.setMonth(dateObj.getMonth() + totalPayments);
var payoffMonth = dateObj.toLocaleString('default', { month: 'long' });
var payoffYear = dateObj.getFullYear();
// 4. Update Summary UI
document.getElementById('macMonthlyPayment').innerText = formatCurrency(monthlyPayment);
document.getElementById('macTotalInterest').innerText = formatCurrency(totalInterest);
document.getElementById('macTotalPayment').innerText = formatCurrency(totalPaymentAmount);
document.getElementById('macPayoffDate').innerText = payoffMonth + " " + payoffYear;
// 5. Generate Amortization Schedule
generateSchedule(loanAmount, monthlyRate, monthlyPayment, totalPayments, startYear);
// Show results
resultsDiv.style.display = 'block';
}
function generateSchedule(principal, monthlyRate, monthlyPayment, totalPayments, startYear) {
var tbody = document.getElementById('macScheduleBody');
tbody.innerHTML = ""; // Clear previous
var balance = principal;
var yearlyInterest = 0;
var yearlyPrincipal = 0;
var currentYear = startYear;
var paymentCounter = 0;
// We will loop through every month, but only write rows for Years to save space/performance
for (var i = 1; i <= totalPayments; i++) {
var interestPart = balance * monthlyRate;
var principalPart = monthlyPayment – interestPart;
// Handle last payment precision issues
if (balance < principalPart) {
principalPart = balance;
// Last payment might be slightly different, but for schedule aggregation we approximate
}
balance -= principalPart;
yearlyInterest += interestPart;
yearlyPrincipal += principalPart;
paymentCounter++;
// If it's the 12th month of the cycle or the very last payment
if (i % 12 === 0 || i === totalPayments) {
var row = "
";
row += "
" + currentYear + "
";
row += "
" + formatCurrency(yearlyInterest) + "
";
row += "
" + formatCurrency(yearlyPrincipal) + "
";
row += "
" + formatCurrency(Math.max(0, balance)) + "
";
row += "
";
tbody.innerHTML += row;
// Reset yearly counters and increment year
yearlyInterest = 0;
yearlyPrincipal = 0;
currentYear++;
}
}
}
function formatCurrency(num) {
return "$" + num.toFixed(2).replace(/\d(?=(\d{3})+\.)/g, '$&,');
}