Loan Amortization Calculator Extra Payments

Loan Amortization Calculator with Extra Payments

Calculate your loan amortization schedule including extra payments.

Amortization Schedule

Payment # Payment Amount Principal Payment Interest Payment Remaining Balance
function calculateAmortization() { const loanAmount = parseFloat(document.getElementById(“loanAmount”).value); const interestRate = parseFloat(document.getElementById(“interestRate”).value) / 100 / 12; const loanTerm = parseInt(document.getElementById(“loanTerm”).value) * 12; const extraPayment = parseFloat(document.getElementById(“extraPayment”).value); let monthlyPayment = (loanAmount * interestRate) / (1 – Math.pow(1 + interestRate, -loanTerm)); monthlyPayment += extraPayment; let balance = loanAmount; let paymentNumber = 0; let tableBody = document.querySelector(“#scheduleTable tbody”); tableBody.innerHTML = ”; while (balance > 0) { paymentNumber++; const interestPayment = balance * interestRate; const principalPayment = monthlyPayment – interestPayment; if (balance < monthlyPayment) { monthlyPayment = balance + interestPayment; } balance -= principalPayment; const row = document.createElement("tr"); row.innerHTML = ` ${paymentNumber} ${monthlyPayment.toFixed(2)} ${principalPayment.toFixed(2)} ${interestPayment.toFixed(2)} ${Math.max(balance, 0).toFixed(2)} `; tableBody.appendChild(row); } }

Leave a Reply

Your email address will not be published. Required fields are marked *