Auto Loan Interest Rate Comparison Tool

Enter the overall loan amount and the terms for two different loan offers.

$

Offer 1


Offer 2

Loan Comparison Results

Loan Amount: ${formatCurrency(loanAmount)}

Metric Offer 1 Offer 2
Annual Interest Rate ${rate1.toFixed(2)}% ${rate2.toFixed(2)}%
Loan Term (Months) ${term1} ${term2}
Monthly Payment ${formatCurrency(offer1.monthlyPayment)} ${formatCurrency(offer2.monthlyPayment)}
Total Interest Paid ${formatCurrency(offer1.totalInterest)} ${formatCurrency(offer2.totalInterest)}
Total Loan Cost ${formatCurrency(offer1.totalCost)} ${formatCurrency(offer2.totalCost)}
`; alc_resultsOutputEl.innerHTML = resultsHTML; if (alc_pdfDownloadBtn) alc_pdfDownloadBtn.style.display = 'block'; } function alc_resetForm() { if(alc_loanAmountEl) alc_loanAmountEl.value = "25000"; if(alc_interestRate1El) alc_interestRate1El.value = "5.0"; if(alc_loanTerm1El) alc_loanTerm1El.value = "60"; if(alc_interestRate2El) alc_interestRate2El.value = "4.5"; if(alc_loanTerm2El) alc_loanTerm2El.value = "48"; [alc_loanAmountErrorEl, alc_interestRate1ErrorEl, alc_loanTerm1ErrorEl, alc_interestRate2ErrorEl, alc_loanTerm2ErrorEl].forEach(el => { if (el) el.textContent = ''; }); if(alc_resultsOutputEl) alc_resultsOutputEl.innerHTML = ""; if(alc_pdfDownloadBtn) alc_pdfDownloadBtn.style.display = 'none'; if(alc_resultsTabButtonEl) alc_resultsTabButtonEl.disabled = true; // Reset to the first tab const firstTabButton = document.querySelector('#autoLoanComparerTool .tab-button'); if(firstTabButton) firstTabButton.click(); alc_updateNavButtons(); } function alc_downloadPDF() { if (!window.jspdf || !window.html2canvas) { alert("PDF generation library is not loaded. Please try again later or check your internet connection."); return; } const { jsPDF } = window.jspdf; const pdfContent = document.getElementById('alc-resultsOutput'); if (!pdfContent || !pdfContent.innerHTML.includes(' body { font-family: Arial, sans-serif; color: #333; } h3 { color: #007bff; text-align: center; font-size: 18pt; } p { font-size: 10pt; margin-bottom: 8px; } table { width: 100%; border-collapse: collapse; font-size: 9pt; margin-top: 15px; } th, td { border: 1px solid #ddd; padding: 6px; text-align: right; } th { background-color: #007bff; color: white; font-weight: bold; } td:first-child { text-align: left; font-weight: bold; } tr:nth-child(even) { background-color: #f2f2f2; } `; const originalTable = pdfContent.querySelector('#alc-resultsTable'); const loanAmountP = pdfContent.querySelector('p'); let contentToPrint = ` ${pdfStyles}

${toolTitle}

${loanAmountP ? loanAmountP.outerHTML : ''} ${originalTable ? originalTable.outerHTML : '

Error: Results table not found.

'} `; // Margin for the PDF const margins = { top: 40, bottom: 40, left: 40, right: 40 }; pdf.html(contentToPrint, { callback: function(doc) { doc.save('AutoLoanComparison.pdf'); }, x: margins.left, y: margins.top, width: 595 - margins.left - margins.right, // A4 width in points windowWidth: originalTable ? originalTable.scrollWidth : 600 // Width of the content to render }); } // Initialize first tab alc_openTab(null, 'alc-inputTab');
Scroll to Top