Commbank Repayment Calculator Personal Loan

CommBank Personal Loan Repayment Calculator

Calculate your personal loan repayments with ease.

How the Repayments are Calculated:

The monthly repayment is calculated based on your loan amount, interest rate, and loan term. The total repayment is the sum of all monthly repayments over the entire loan term.

function calculateRepayment() { const loanAmount = parseFloat(document.getElementById(‘loanAmount’).value); const interestRate = parseFloat(document.getElementById(‘interestRate’).value) / 100; const loanTerm = parseFloat(document.getElementById(‘loanTerm’).value) * 12; // Convert years to months if (isNaN(loanAmount) || isNaN(interestRate) || isNaN(loanTerm) || loanAmount <= 0 || interestRate <= 0 || loanTerm <= 0) { alert('Please enter valid values for all fields.'); return; } const monthlyInterestRate = interestRate / 12; const monthlyRepayment = (loanAmount * monthlyInterestRate) / (1 – Math.pow(1 + monthlyInterestRate, -loanTerm)); const totalRepayment = monthlyRepayment * loanTerm; document.getElementById('monthlyRepayment').value = monthlyRepayment.toFixed(2); document.getElementById('totalRepayment').value = totalRepayment.toFixed(2); } function resetForm() { document.getElementById('commbank-loan-calculator').reset(); document.getElementById('monthlyRepayment').value = ''; document.getElementById('totalRepayment').value = ''; }

Leave a Reply

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