Student Loan Forgiveness Eligibility & Cost Planner (U.S. Federal Loans)
Step 1: Your Loan & Financial Profile
Federal Student Loans
Income & Household Information
Employment (for Public Service Loan Forgiveness - PSLF)
Step 2: Explore Forgiveness Programs
Public Service Loan Forgiveness (PSLF)
PSLF forgives the remaining balance on Direct Loans after 120 qualifying monthly payments under an eligible repayment plan while working full-time for a qualifying employer. Payments do not need to be consecutive.
Income-Driven Repayment (IDR) Forgiveness
IDR plans base your monthly payment on your income and family size. After 20 or 25 years of qualifying payments on an IDR plan, any remaining loan balance may be forgiven. The SAVE plan is often the most beneficial IDR plan.
Other Forgiveness/Discharge Programs (Mention Only)
- Teacher Loan Forgiveness: For teachers in low-income schools/agencies. Details
- Closed School Discharge: If your school closed while enrolled or shortly after. Details
- Total and Permanent Disability (TPD) Discharge: If you are totally and permanently disabled. Details
- Borrower Defense to Repayment: If your school misled you or engaged in misconduct. Details
Step 3: SAVE Plan - Payment & Forgiveness Projection
This projects your payments and potential forgiveness under the SAVE (Saving on a Valuable Education) plan, using the information from Tab 1. Ensure your AGI, family size, and FPL are correctly entered there.
Enter your details in Tab 1 and click "Calculate SAVE Plan Projection".
Step 4: Overall Summary & Download Your Plan
Complete your profile and explore programs to see a summary here.
Important Next Steps & Resources:
- To officially apply for IDR plans or PSLF, and to certify employment for PSLF, visit StudentAid.gov.
- Use the PSLF Help Tool on StudentAid.gov to generate PSLF forms.
- Regularly update your income and family size for IDR plans as required.
- Keep detailed records of your employment and payments.
- Student loan programs and forgiveness rules can change. Always refer to StudentAid.gov for the most current official information.
Tax Note: ${taxMessage}
`; } // --- Tab 4: Overall Summary --- function generateOverallForgivenessSummary() { collectProfileData(); // Ensure latest data const container = document.getElementById('overallForgivenessSummaryContainer'); let summaryHTML = "Your Personalized Loan Forgiveness Outlook
"; const totalInitialDebt = forgivenessPlannerData.loans.reduce((sum, l) => sum + l.balance, 0); summaryHTML += `Total Current Federal Loan Balance: $${totalInitialDebt.toFixed(2)}
`; if (forgivenessPlannerData.pslfResult) { summaryHTML += `Public Service Loan Forgiveness (PSLF) Potential:
`; forgivenessPlannerData.pslfResult.messages.forEach(m => summaryHTML += `${m}
`); } else { summaryHTML += `Public Service Loan Forgiveness (PSLF) Potential:
Run PSLF Eligibility Check on Tab 2.
`; } if (forgivenessPlannerData.saveResult) { summaryHTML += `SAVE Plan (IDR) Projection:
`; summaryHTML += `Estimated Initial Monthly Payment: $${forgivenessPlannerData.saveResult.initialMonthlyPayment.toFixed(2)}
`; summaryHTML += `Total Paid over ${forgivenessPlannerData.saveResult.forgivenessYears} years: $${forgivenessPlannerData.saveResult.totalPaid.toFixed(2)}
`; summaryHTML += `Estimated Amount Forgiven: $${forgivenessPlannerData.saveResult.forgivenAmount.toFixed(2)} (after ${forgivenessPlannerData.saveResult.forgivenessYears} years)
`; summaryHTML += `Projected Forgiveness Date: ${forgivenessPlannerData.saveResult.forgivenessDate}
`; summaryHTML += `Tax Note: ${forgivenessPlannerData.saveResult.taxMessage}
`; // If eligible for PSLF and also ran SAVE plan, compare if (forgivenessPlannerData.pslfResult && forgivenessPlannerData.pslfResult.potentiallyEligible && forgivenessPlannerData.pslfResult.paymentsNeeded < (forgivenessPlannerData.saveResult.forgivenessYears * 12)) { // Estimate total paid under PSLF on SAVE // This is complex as payments change. For simplicity, could use average SAVE payment. // Or, if we had monthly payment array from SAVE, sum up first 120 (or remaining). // For now, just state that PSLF is faster if eligible. summaryHTML += `PSLF on SAVE: If you qualify for PSLF and make payments on the SAVE plan, your loans could be forgiven much sooner (after 120 qualifying payments, typically 10 years) and likely with less total out-of-pocket cost than full-term IDR forgiveness.
`; } } else { summaryHTML += `SAVE Plan (IDR) Projection:
Run SAVE Plan Projection on Tab 3.
`; } container.innerHTML = summaryHTML; document.getElementById('downloadForgivenessPdfButton').disabled = !(forgivenessPlannerData.pslfResult || forgivenessPlannerData.saveResult); } // --- PDF Generation --- function downloadForgivenessPdf() { if (!forgivenessPlannerData.pslfResult && !forgivenessPlannerData.saveResult) { alert("Please run at least one analysis (PSLF or SAVE Projection) first."); return; } if (typeof window.jspdf === 'undefined' || typeof window.jspdf.jsPDF === 'undefined') { alert('PDF generation library (jsPDF) is not loaded.'); return; } const jsPDFConstructor = window.jspdf.jsPDF; const doc = new jsPDFConstructor(); if (typeof doc.autoTable !== 'function') { alert('jsPDF AutoTable plugin not loaded.'); return; } const data = forgivenessPlannerData; const primaryColor = '#007bff', textColor = '#212529', tableHeaderColor = '#e9ecef'; let yPos = 22; const pageHeight = doc.internal.pageSize.height; const margin = 20; function checkYPos(increment = 10) { if (yPos + increment > pageHeight - margin) { doc.addPage(); yPos = margin; } } doc.setFontSize(18); doc.setTextColor(primaryColor); doc.text("Student Loan Forgiveness & Cost Plan Summary (USA)", 14, yPos); yPos += 8; doc.setFontSize(10); doc.setTextColor(textColor); doc.text(`Report Date: ${new Date().toLocaleDateString()}`, 14, yPos); yPos += 10; // Profile Summary checkYPos(20); doc.setFontSize(12); doc.setTextColor(primaryColor); doc.text("Your Profile Summary", 14, yPos); yPos += 6; let profileBody = [ ['AGI:', `$${data.profile.agi.toFixed(2)} (Est. Growth: ${data.profile.incomeGrowth*100}%)`], ['Family Size:', `${data.profile.familySize}`], ['Filing Status:', data.profile.filingStatus], ['State of Residence:', data.profile.stateOfResidence], ['Federal Poverty Level (FPL) Used:', `$${data.profile.fplAmount.toFixed(2)}`], ['Employer Type (for PSLF):', data.profile.employerType], ['Full-Time at Qualifying Employer:', data.profile.isFullTimeQualifying ? 'Yes' : 'No'], ['PSLF Payments Made:', `${data.profile.pslfPaymentsMade}`] ]; doc.autoTable({ startY: yPos, body: profileBody, theme: 'plain', styles: {fontSize:9, cellPadding:1}, columnStyles: {0:{fontStyle:'bold'}}}); yPos = doc.lastAutoTable.finalY + 7; // Loan Summary checkYPos(20 + data.loans.length * 5); doc.setFontSize(12); doc.setTextColor(primaryColor); doc.text("Federal Loan Summary", 14, yPos); yPos += 6; const loanTableBody = data.loans.map(l => [l.type, `$${l.balance.toFixed(2)}`, `${(l.rate*100).toFixed(2)}%`, l.repayStartDate || 'N/A']); doc.autoTable({ startY: yPos, head: [['Loan Type', 'Current Balance', 'Interest Rate', 'Repay Start Date']], body: loanTableBody, theme: 'grid', headStyles: {fillColor: tableHeaderColor, textColor:textColor, fontStyle:'bold', fontSize:9}, styles: {fontSize:8, cellPadding:1.5} }); yPos = doc.lastAutoTable.finalY + 10; // PSLF Results if (data.pslfResult) { checkYPos(20 + data.pslfResult.messages.length * 5); doc.setFontSize(12); doc.setTextColor(primaryColor); doc.text("Public Service Loan Forgiveness (PSLF) Outlook", 14, yPos); yPos += 6; doc.setFontSize(9); doc.setTextColor(textColor); data.pslfResult.messages.forEach(msg => { checkYPos(5); doc.text(msg.replace(/<[^>]+>/g, ''), 14, yPos, {maxWidth: 180}); yPos += 5; }); yPos += 5; // Extra space } // SAVE Plan Results if (data.saveResult) { checkYPos(60); // Estimate space for SAVE summary doc.setFontSize(12); doc.setTextColor(primaryColor); doc.text("SAVE Plan Projection Summary", 14, yPos); yPos += 6; let saveBody = [ ['Est. Initial Monthly Payment:', `$${data.saveResult.initialMonthlyPayment.toFixed(2)}`], ['Est. Final Year Monthly Payment:', `~$${data.saveResult.finalMonthlyPayment.toFixed(2)} (Year ${data.saveResult.forgivenessYears})`], ['Total Paid Over Term:', `$${data.saveResult.totalPaid.toFixed(2)}`], ['Est. Amount Forgiven:', `$${data.saveResult.forgivenAmount.toFixed(2)} (after ${data.saveResult.forgivenessYears} years)`], ['Projected Forgiveness Date:', data.saveResult.forgivenessDate], [{content: 'Tax Note on Forgiveness:', styles:{fontStyle:'bold'}}, {content: data.saveResult.taxMessage.replace(/<[^>]+>/g, ''), styles:{cellWidth:'wrap'}}] ]; doc.autoTable({startY: yPos, body: saveBody, theme: 'plain', styles: {fontSize:9, cellPadding:1}, columnStyles: {0:{fontStyle:'bold'}}}); yPos = doc.lastAutoTable.finalY + 7; // SAVE Annual Payment Details Table (if it exists and has data) if (data.saveResult.annualPaymentDetails && data.saveResult.annualPaymentDetails.length > 0) { checkYPos(20 + data.saveResult.annualPaymentDetails.length * 5); doc.setFontSize(10); doc.setTextColor(textColor); doc.text("SAVE Plan - Estimated Annual Progression (Sample Years)", 14, yPos); yPos += 5; const annualHead = [['Year', 'Est. AGI', 'Family Size', 'FPL Used', 'Est. Monthly Payment']]; const annualBody = data.saveResult.annualPaymentDetails.map(yr => [ yr.year, `$${yr.agi.toFixed(0)}`, yr.familySize, `$${yr.fplUsed.toFixed(0)}`, `$${yr.monthlyPayment.toFixed(2)}` ]); doc.autoTable({ startY:yPos, head: annualHead, body: annualBody, theme:'grid', headStyles: {fillColor: tableHeaderColor,textColor:textColor, fontStyle:'bold',fontSize:8}, styles: {fontSize:7.5, cellPadding:1.2} }); yPos = doc.lastAutoTable.finalY + 7; } } checkYPos(30); doc.setFontSize(11); doc.setTextColor(primaryColor); doc.text("Important Next Steps & Official Resources", 14, yPos); yPos +=6; doc.setFontSize(9); doc.setTextColor(textColor); const officialLinks = [ "Always verify program details and eligibility on StudentAid.gov.", "Use the PSLF Help Tool on StudentAid.gov for PSLF forms and tracking.", "Apply for Income-Driven Repayment plans via StudentAid.gov.", "Keep your income and family size updated annually for IDR plans.", "Maintain thorough records of employment certifications and payments." ]; officialLinks.forEach(linkText => { checkYPos(5); doc.text(linkText, 14, yPos, {maxWidth:180}); yPos+=5; }); doc.save("Student_Loan_Forgiveness_Plan.pdf"); } // Initial calls updateForgivenessNavButtons(); checkIdrSuitability();