Amortization Calculator Excel Sheet
Use this tool to calculate your loan amortization schedule over the term of the loan.
Amortization Schedule
| Payment Number |
Payment |
Principal |
Interest |
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;
if (isNaN(loanAmount) || isNaN(interestRate) || isNaN(loanTerm) || loanAmount <= 0 || interestRate <= 0 || loanTerm <= 0) {
alert('Please enter valid values for all fields.');
return;
}
const monthlyPayment = (loanAmount * interestRate) / (1 – Math.pow(1 + interestRate, -loanTerm));
let balance = loanAmount;
let amortizationSchedule = '';
for (let i = 1; i <= loanTerm; i++) {
const interestPayment = balance * interestRate;
const principalPayment = monthlyPayment – interestPayment;
balance -= principalPayment;
amortizationSchedule += `
| ${i} |
${monthlyPayment.toFixed(2)} |
${principalPayment.toFixed(2)} |
${interestPayment.toFixed(2)} |
${Math.max(balance, 0).toFixed(2)} |
`;
if (balance <= 0) break;
}
document.getElementById('amortizationTable').getElementsByTagName('tbody')[0].innerHTML = amortizationSchedule;
document.getElementById('amortizationResults').style.display = 'block';
}