Navy Federal Auto Loan Refinance Calculator

Auto Loan Refinance Calculator – Navy Federal

Estimated New Monthly Payment:

Monthly Savings:

Total Interest Savings:

function calculateRefinance() { const currentLoanBalance = parseFloat(document.getElementById(‘currentLoanBalance’).value); const interestRate = parseFloat(document.getElementById(‘interestRate’).value) / 100; const loanTerm = parseInt(document.getElementById(‘loanTerm’).value) * 12; // months const newRate = parseFloat(document.getElementById(‘newRate’).value) / 100; const newTerm = parseInt(document.getElementById(‘newTerm’).value) * 12; // months const currentMonthlyPayment = parseFloat(document.getElementById(‘monthlyPayment’).value); if (isNaN(currentLoanBalance) || isNaN(interestRate) || isNaN(loanTerm) || isNaN(newRate) || isNaN(newTerm) || isNaN(currentMonthlyPayment)) { alert(‘Please fill in all fields with valid values.’); return; } // Current loan calculations const currentMonthlyRate = interestRate / 12; const currentMonthlyPaymentCalc = currentLoanBalance * currentMonthlyRate / (1 – Math.pow(1 + currentMonthlyRate, -loanTerm)); // New loan calculations const newMonthlyRate = newRate / 12; const newMonthlyPayment = currentLoanBalance * newMonthlyRate / (1 – Math.pow(1 + newMonthlyRate, -newTerm)); // Calculate savings const monthlySavings = currentMonthlyPaymentCalc – newMonthlyPayment; const interestSavings = (currentMonthlyPaymentCalc * loanTerm – currentLoanBalance) – (newMonthlyPayment * newTerm – currentLoanBalance); // Display results document.getElementById(‘newPayment’).innerText = newMonthlyPayment.toFixed(2); document.getElementById(‘monthlySavings’).innerText = monthlySavings.toFixed(2); document.getElementById(‘interestSavings’).innerText = interestSavings.toFixed(2); }

Leave a Reply

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