Loan Payoff Timeline Analyzer

Your Current Loan and Payment Plans

$
%
$
$

Loan Payoff Analysis

Results are estimates based on your inputs and assume consistent payments and interest rates. Actual payoff times and interest may vary if rates change or payments are missed/altered.

Enter a 'Proposed Higher Monthly Payment' to see the potential impact on your loan payoff timeline and interest savings.

"; } if(lpa_el.summaryHighlights) lpa_el.summaryHighlights.innerHTML = summaryHTML; if(lpa_el.pdfDownloadBtn && lpa_el.pdfDownloadBtn.style) lpa_el.pdfDownloadBtn.style.display = 'block'; } function lpa_resetForm() { if(lpa_el.loanBalance) lpa_el.loanBalance.value = "10000"; if(lpa_el.annualInterestRate) lpa_el.annualInterestRate.value = "8.0"; if(lpa_el.currentPayment) lpa_el.currentPayment.value = "200"; if(lpa_el.proposedPayment) lpa_el.proposedPayment.value = "300"; document.querySelectorAll('#loanPayoffAnalyzer .lpa-error-message').forEach(el => el.textContent = ''); if(lpa_el.resultsOutput) lpa_el.resultsOutput.innerHTML = ""; if(lpa_el.summaryHighlights) lpa_el.summaryHighlights.innerHTML = ""; if(lpa_el.pdfDownloadBtn && lpa_el.pdfDownloadBtn.style) lpa_el.pdfDownloadBtn.style.display = 'none'; if(lpa_el.resultsTabButton) lpa_el.resultsTabButton.disabled = true; lpa_currentTab = 0; lpa_openTab(null, 'lpa-inputTab'); } function lpa_downloadPDF() { if (typeof window.jspdf === 'undefined' || typeof window.jspdf.jsPDF !== 'function' || typeof window.jspdf.jsPDF.API.autoTable !== 'function') { alert("PDF generation library not loaded. Check CDN links & internet connection."); return; } const jsPDFConstructor = window.jspdf.jsPDF; const resultsTableElement = document.getElementById('lpa-resultsTable'); const summaryHighlightsContent = lpa_el.summaryHighlights; if (!resultsTableElement || !summaryHighlightsContent || !summaryHighlightsContent.textContent.trim()) { alert("No results to download. Please calculate first."); return; } const pdf = new jsPDFConstructor('p', 'pt', 'a4'); const toolTitle = "Loan Payoff Timeline Analysis"; const margins = { top: 40, bottom: 40, left: 30, right: 30 }; let yPos = margins.top; pdf.setFontSize(18); pdf.text(toolTitle, pdf.internal.pageSize.getWidth() / 2, yPos, { align: 'center' }); yPos += 25; pdf.setFontSize(10); pdf.text(`Loan Balance: ${lpa_formatCurrency(parseFloat(lpa_el.loanBalance.value))}, APR: ${lpa_el.annualInterestRate.value}%`, margins.left, yPos); yPos += 20; pdf.setFontSize(11); pdf.text("Payoff Comparison:", margins.left, yPos); pdf.autoTable({ html: '#lpa-resultsTable', startY: yPos + 15, theme: 'grid', headStyles: { fillColor: [0, 123, 255], textColor: 255, fontSize: 9 }, styles: { fontSize: 8, cellPadding: 3 }, columnStyles: { 0: { fontStyle: 'bold' }, 3: {fontStyle: 'bold'} }, // Style for Metric and Difference didParseCell: function(data) { if (data.column.index === 3 && data.row.section === 'body') { // Difference column styling const cellText = data.cell.raw?.textContent || ""; if (cellText.includes("Sooner") || cellText.includes("Saved")) { data.cell.styles.textColor = [21, 87, 36]; // Green } } }, tableWidth: 'auto', margin: { left: margins.left, right: margins.right } }); yPos = pdf.lastAutoTable.finalY + 25; if (summaryHighlightsContent.innerHTML.trim()) { if (yPos > pdf.internal.pageSize.getHeight() - margins.bottom - 60) { pdf.addPage(); yPos = margins.top; } pdf.setFontSize(11); pdf.text("Summary Highlights:", margins.left, yPos); yPos += 15; pdf.setFontSize(9); const summaryLines = pdf.splitTextToSize(summaryHighlightsContent.innerText.trim(), pdf.internal.pageSize.getWidth() - margins.left - margins.right - 5); pdf.text(summaryLines, margins.left + 5, yPos); yPos += (summaryLines.length * 11) + 10; } // Disclaimer Note from page const disclaimerPageNote = document.querySelector('#loanPayoffAnalyzer .lpa-note'); if (disclaimerPageNote && disclaimerPageNote.textContent.trim()) { if (yPos > pdf.internal.pageSize.getHeight() - margins.bottom - 30) { pdf.addPage(); yPos = margins.top; } pdf.setFontSize(7.5); pdf.setTextColor(108, 117, 125); // Gray const discLines = pdf.splitTextToSize(disclaimerPageNote.textContent.trim(), pdf.internal.pageSize.getWidth() - margins.left - margins.right); pdf.text(discLines, margins.left, yPos); } pdf.save('Loan_Payoff_Analysis.pdf'); }
Scroll to Top