A mortgage is a significant financial commitment, and understanding how your loan is repaid over time is crucial. This is where mortgage amortization comes into play. An amortization schedule breaks down each payment into principal and interest components, showing how your loan balance decreases with each payment.
What is an Amortization Schedule?
An amortization schedule is a table that details the payments made on a loan over its entire term. For each payment, it shows:
Payment Number: The sequential number of the payment.
Payment Date: The scheduled date of the payment.
Starting Balance: The outstanding loan balance at the beginning of the payment period.
Monthly Payment: The fixed amount paid each month (principal + interest).
Principal Paid: The portion of the payment that reduces the actual loan amount borrowed.
Interest Paid: The portion of the payment that covers the cost of borrowing (interest).
Ending Balance: The loan balance remaining after the payment is applied.
How Mortgage Amortization Works (The Math)
The core of mortgage amortization lies in calculating the fixed monthly payment and then determining how much of that payment goes towards principal and interest for each period. The formulas used are:
Ending Balance = Starting Balance – Principal Paid
As the loan progresses, the starting balance decreases, meaning more of the fixed monthly payment is allocated to principal and less to interest, while the total monthly payment remains constant.
Key Takeaways from an Amortization Schedule:
Early Years: A larger portion of your payment goes towards interest.
Later Years: A larger portion of your payment goes towards principal.
Equity Building: As principal is paid down, your equity in the property increases.
Loan Payoff: The schedule clearly shows when the loan will be fully repaid.
Using This Calculator:
Enter the details of your mortgage: the total loan amount, the annual interest rate (as a percentage), and the loan term in years. Click "Calculate Amortization" to see your estimated monthly payment, the total principal and interest paid over the life of the loan, and a detailed amortization schedule. This tool helps you visualize your repayment journey and understand the impact of different loan terms and rates.
function calculateMortgage() {
var loanAmount = parseFloat(document.getElementById("loanAmount").value);
var annualInterestRate = parseFloat(document.getElementById("annualInterestRate").value);
var loanTermYears = parseFloat(document.getElementById("loanTermYears").value);
var errorMessageDiv = document.getElementById("errorMessage");
// Clear previous errors and results
errorMessageDiv.textContent = "";
document.getElementById("monthlyPayment").textContent = "–";
document.getElementById("totalPrincipal").textContent = "–";
document.getElementById("totalInterest").textContent = "–";
document.getElementById("totalCost").textContent = "–";
document.querySelector("#amortizationTable tbody").innerHTML = ""; // Clear previous table rows
// Input validation
if (isNaN(loanAmount) || loanAmount <= 0) {
errorMessageDiv.textContent = "Please enter a valid loan amount.";
return;
}
if (isNaN(annualInterestRate) || annualInterestRate < 0) {
errorMessageDiv.textContent = "Please enter a valid annual interest rate.";
return;
}
if (isNaN(loanTermYears) || loanTermYears 0) {
monthlyPayment = loanAmount * (monthlyInterestRate * Math.pow(1 + monthlyInterestRate, numberOfPayments)) / (Math.pow(1 + monthlyInterestRate, numberOfPayments) – 1);
} else {
monthlyPayment = loanAmount / numberOfPayments; // Simple division if interest rate is 0
}
// Format monthly payment to 2 decimal places
var formattedMonthlyPayment = monthlyPayment.toFixed(2);
document.getElementById("monthlyPayment").textContent = "$" + formattedMonthlyPayment;
var totalPrincipalPaid = loanAmount; // Initially, the total principal to be paid is the loan amount
var totalInterestPaid = 0;
var currentBalance = loanAmount;
var amortizationRows = "";
var today = new Date();
for (var i = 0; i currentBalance) {
principalPaid = currentBalance;
monthlyPayment = interestPaid + principalPaid; // Adjust monthly payment for the final payment if needed
}
currentBalance -= principalPaid;
// Ensure ending balance doesn't go negative due to minor floating point issues
if (currentBalance < 0) {
currentBalance = 0;
}
totalInterestPaid += interestPaid;
// Create a date for the payment
var paymentDate = new Date(today.getFullYear(), today.getMonth() + i, today.getDate());
var formattedPaymentDate = (paymentDate.getMonth() + 1) + "/" + paymentDate.getDate() + "/" + paymentDate.getFullYear();
amortizationRows += "