Interest Rate Calculator for Savings Account

Mortgage Amortization Calculator

This calculator helps you understand how your mortgage payments are broken down over time into principal and interest, and how your loan balance decreases with each payment. Understanding amortization is key to managing your home loan effectively.

Monthly (12) Bi-monthly (24) Bi-weekly (26) Weekly (52)

Amortization Schedule

Use the inputs above to generate a detailed breakdown of your mortgage payments.

function calculateAmortization() { var loanAmount = parseFloat(document.getElementById("loanAmount").value); var annualInterestRate = parseFloat(document.getElementById("annualInterestRate").value); var loanTermYears = parseInt(document.getElementById("loanTermYears").value); var paymentFrequency = parseInt(document.getElementById("paymentFrequency").value); var resultDiv = document.getElementById("amortization-schedule"); resultDiv.innerHTML = '

Amortization Schedule

'; // Clear previous results if (isNaN(loanAmount) || isNaN(annualInterestRate) || isNaN(loanTermYears) || loanAmount <= 0 || annualInterestRate < 0 || loanTermYears 0) { monthlyPayment = loanAmount * (monthlyInterestRate * Math.pow(1 + monthlyInterestRate, numberOfPayments)) / (Math.pow(1 + monthlyInterestRate, numberOfPayments) – 1); } else { monthlyPayment = loanAmount / numberOfPayments; // Handle 0% interest rate } var remainingBalance = loanAmount; var totalInterestPaid = 0; var totalPrincipalPaid = 0; var scheduleHtml = ''; scheduleHtml += ''; scheduleHtml += ''; for (var i = 1; i <= numberOfPayments; i++) { var interestPayment = remainingBalance * monthlyInterestRate; var principalPayment = monthlyPayment – interestPayment; // Adjust the last payment to account for any small rounding differences if (i === numberOfPayments) { principalPayment = remainingBalance; monthlyPayment = interestPayment + principalPayment; } remainingBalance -= principalPayment; totalInterestPaid += interestPayment; totalPrincipalPaid += principalPayment; // Ensure balance doesn't go negative due to rounding if (remainingBalance < 0) { remainingBalance = 0; } // Simple date simulation (can be improved with Date objects for more accuracy) var paymentDate = "Payment " + i; scheduleHtml += ''; scheduleHtml += ''; scheduleHtml += ''; scheduleHtml += ''; // Beginning balance of this period is ending balance of previous scheduleHtml += ''; scheduleHtml += ''; scheduleHtml += ''; scheduleHtml += ''; scheduleHtml += ''; } scheduleHtml += '
Payment #Payment DateBeginning BalancePaymentInterest PaidPrincipal PaidEnding Balance
' + i + '' + paymentDate + '$' + remainingBalance.toFixed(2) + '$' + monthlyPayment.toFixed(2) + '$' + interestPayment.toFixed(2) + '$' + principalPayment.toFixed(2) + '$' + remainingBalance.toFixed(2) + '
'; resultDiv.innerHTML += scheduleHtml; resultDiv.innerHTML += 'Total Principal Paid: $' + totalPrincipalPaid.toFixed(2) + "; resultDiv.innerHTML += 'Total Interest Paid: $' + totalInterestPaid.toFixed(2) + "; resultDiv.innerHTML += 'Total Amount Paid: $' + (totalPrincipalPaid + totalInterestPaid).toFixed(2) + "; }

Leave a Comment