Best Loan Amortization Calculator India

Best Loan Amortization Calculator India

Amortization Schedule

Month Principal Interest Total Payment Remaining Balance
function calculateLoanAmortization() { const loanAmount = parseFloat(document.getElementById(‘loanAmount’).value); const loanTerm = parseInt(document.getElementById(‘loanTerm’).value); const interestRate = parseFloat(document.getElementById(‘interestRate’).value); if (isNaN(loanAmount) || isNaN(loanTerm) || isNaN(interestRate) || loanAmount <= 0 || loanTerm <= 0 || interestRate <= 0) { alert("Please enter valid values."); return; } const monthlyRate = interestRate / 100 / 12; const numberOfPayments = loanTerm * 12; const monthlyPayment = loanAmount * monthlyRate / (1 – Math.pow(1 + monthlyRate, -numberOfPayments)); const amortizationTable = document.getElementById('amortizationTable').getElementsByTagName('tbody')[0]; let remainingBalance = loanAmount; for (let month = 1; month <= numberOfPayments; month++) { const interestPayment = remainingBalance * monthlyRate; const principalPayment = monthlyPayment – interestPayment; remainingBalance -= principalPayment; const row = amortizationTable.insertRow(); row.insertCell(0).textContent = month; row.insertCell(1).textContent = principalPayment.toFixed(2); row.insertCell(2).textContent = interestPayment.toFixed(2); row.insertCell(3).textContent = monthlyPayment.toFixed(2); row.insertCell(4).textContent = remainingBalance.toFixed(2); } document.getElementById('loanAmortizationResult').style.display = 'block'; }

Leave a Reply

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