Debt-to-Income (DTI) Ratio Analyzer
Step 1: Your Income & Monthly Housing Expenses
Income
Monthly Housing Expenses
Step 2: Your Other Monthly Debt Payments
List all other recurring monthly debt payments (e.g., minimum credit card payments, car loans, student loans, personal loans, alimony, child support).
Step 3: Debt-to-Income (DTI) Analysis
Click 'Calculate DTI Ratios' to see your results.
Step 4: Summary & Download Report
Complete the DTI calculation on Tab 3 to view the summary.
Understanding Your DTI:
Your Debt-to-Income (DTI) ratio is a key factor lenders use to assess your ability to manage monthly payments and repay debts. A lower DTI generally indicates a better balance between debt and income.
Front-End DTI specifically looks at your housing costs relative to your income. Back-End DTI includes all your monthly debt obligations.
Improving your DTI can involve increasing your income, reducing your debts, or both. This can positively impact your financial health and borrowing capacity.
Opportunity to Improve (44% - 49%): This DTI suggests a significant portion of your income goes to debt. While some loans might still be possible, lenders may have concerns or offer less favorable terms. Reducing debt or increasing income is advisable.
"; } else { // 50% or more interpretation += "Action Recommended (50% or more): A DTI this high indicates a substantial debt burden. It may be difficult to qualify for new loans, and there might be little room for savings or unexpected costs. Consider strategies to significantly reduce debt or increase income.
"; } interpretation += "Note: These are general guidelines. Lenders consider many factors, and specific requirements can vary. Maximum DTI limits can sometimes be higher for certain loan programs (e.g., up to 50% for some Qualified Mortgages), but a lower DTI is generally better.
"; return interpretation; } function displayDtiOverallSummary() { const container = document.getElementById('dtiOverallSummaryContainer'); if (!dtiReportData.dtiCalculations.hasOwnProperty('backEndDti')) { // Check if calculation has been run container.innerHTML = "Please calculate your DTI on Tab 3 to view the summary.
"; document.getElementById('downloadDtiPdfButton').disabled = true; return; } const gmi = dtiReportData.income; const housingTotal = dtiReportData.housingExpenses.total || 0; const otherDebtsTotal = dtiReportData.dtiCalculations.totalOtherMonthlyDebts || 0; const frontEndDti = dtiReportData.dtiCalculations.frontEndDti || 0; const backEndDti = dtiReportData.dtiCalculations.backEndDti || 0; let summaryHTML = `Your DTI Ratio Summary:
Gross Monthly Income: $${gmi.toFixed(2)}
Total Monthly Housing Expenses: $${housingTotal.toFixed(2)}
Total Other Monthly Debt Payments: $${otherDebtsTotal.toFixed(2)}
Calculated Front-End DTI: ${frontEndDti.toFixed(1)}%
Calculated Back-End DTI: ${backEndDti.toFixed(1)}%
.*?<\/h4>/gi, '') // Remove h4 tag .replace(/
(.*?)<\/strong>(.*?)<\/p>/gi, '$1$2\n') // Strong tags with class
.replace(/ .*?(.*?)<\/strong>.*?<\/p>/gi, '$1\n') // For other strong tags
.replace(/(.*?)<\/strong>/gi, '$1') // Remaining strong tags
.replace(/(.*?)<\/small>/gi, '\n($1)')
.replace(/ (.*?)<\/p>/gi, '$1\n')
.replace(/\n\s*\n/g, '\n') // Remove multiple blank lines
.trim();
const splitText = doc.splitTextToSize(interpretationText, 180);
doc.setFontSize(9.5);
doc.text("Understanding Your Back-End DTI:", 14, yPos); yPos +=5;
splitText.forEach(line => {
checkYPdf(5);
doc.text(line, 14, yPos);
yPos += 5;
});
doc.save("DTI_Analysis_Report.pdf");
}
function getDtiPdfColor(dti, isFrontEnd) {
const classColor = getDtiClass(dti, isFrontEnd);
if (classColor === 'dti-good') return [40, 167, 69]; // Green
if (classColor === 'dti-fair') return [253, 126, 20]; // Orange
return [220, 53, 69]; // Red for high
}
// Initial calls
updateDtiNavButtons();
toggleHousingFields();
calculateFrontEndDti(false); // Calculate on load but don't force display update in the div until income is entered
