function calculateDTI() {
// Get inputs
var grossIncome = parseFloat(document.getElementById('grossIncome').value) || 0;
var rentMortgage = parseFloat(document.getElementById('rentMortgage').value) || 0;
var carLoans = parseFloat(document.getElementById('carLoans').value) || 0;
var studentLoans = parseFloat(document.getElementById('studentLoans').value) || 0;
var creditCards = parseFloat(document.getElementById('creditCards').value) || 0;
var otherDebt = parseFloat(document.getElementById('otherDebt').value) || 0;
// Validation
if (grossIncome <= 0) {
alert("Please enter a valid Gross Monthly Income greater than 0.");
return;
}
// Calculations
var totalMonthlyDebt = rentMortgage + carLoans + studentLoans + creditCards + otherDebt;
var dtiRatio = (totalMonthlyDebt / grossIncome) * 100;
var housingRatio = (rentMortgage / grossIncome) * 100;
// DOM Elements
var resultBox = document.getElementById('dtiResult');
var finalRatioSpan = document.getElementById('finalRatio');
var analysisDiv = document.getElementById('dtiAnalysis');
var incomeDisplay = document.getElementById('totalIncomeDisplay');
var debtDisplay = document.getElementById('totalDebtDisplay');
var housingRatioSpan = document.getElementById('housingRatio');
// Update DOM
finalRatioSpan.innerText = dtiRatio.toFixed(2);
incomeDisplay.innerText = grossIncome.toLocaleString(undefined, {minimumFractionDigits: 2, maximumFractionDigits: 2});
debtDisplay.innerText = totalMonthlyDebt.toLocaleString(undefined, {minimumFractionDigits: 2, maximumFractionDigits: 2});
housingRatioSpan.innerText = housingRatio.toFixed(2);
// Analysis Logic
var analysisText = "";
var analysisColor = "";
var borderColor = "";
if (dtiRatio <= 36) {
analysisText = "Excellent! Your DTI is below 36%. Lenders view you as a low-risk borrower. You are in a great position to get approved for new credit or a mortgage.";
analysisColor = "#e8f5e9";
borderColor = "#27ae60";
analysisDiv.style.color = "#2e7d32";
} else if (dtiRatio > 36 && dtiRatio <= 43) {
analysisText = "Good / Manageable. Your DTI is between 36% and 43%. This is generally acceptable for most mortgages, though you may not qualify for the absolute best rates.";
analysisColor = "#fff3e0";
borderColor = "#f39c12";
analysisDiv.style.color = "#e67e22";
} else if (dtiRatio > 43 && dtiRatio <= 50) {
analysisText = "Concerning. Your DTI is between 43% and 50%. Many lenders (specifically for Qualified Mortgages) set the limit at 43%. You may face difficulties getting approved.";
analysisColor = "#ffebee";
borderColor = "#c0392b";
analysisDiv.style.color = "#c0392b";
} else {
analysisText = "Critical. Your DTI is over 50%. This suggests you may have more debt than you can comfortably handle. Lenders are unlikely to approve new loans.";
analysisColor = "#ffcdd2";
borderColor = "#c0392b";
analysisDiv.style.color = "#b71c1c";
}
analysisDiv.innerHTML = analysisText;
analysisDiv.style.backgroundColor = analysisColor;
resultBox.style.borderLeftColor = borderColor;
// Show Result
resultBox.style.display = "block";
}
Understanding Your Debt-to-Income (DTI) Ratio
Your Debt-to-Income (DTI) ratio is one of the most critical metrics lenders use to assess your financial health. Unlike your credit score, which measures your history of paying debts, your DTI measures your capacity to repay new debt. It is a simple percentage that represents how much of your gross monthly income goes toward paying debts.
How is DTI Calculated?
The DTI calculation involves summing your recurring monthly debt payments and dividing that total by your gross monthly income (income before taxes). The formula is:
For example, if your gross monthly income is $5,000 and your total monthly debt payments (rent, car, student loans) equal $2,000, your DTI is 40%.
Front-End vs. Back-End Ratio
Lenders often look at two different types of DTI ratios:
Front-End Ratio (Housing Ratio): This only calculates the percentage of your income that goes toward housing costs (rent or mortgage principal, interest, taxes, and insurance). Ideally, this should be 28% or lower.
Back-End Ratio (Total DTI): This includes housing costs plus all other recurring debt like credit cards, student loans, and auto loans. This is the number calculated by the tool above. Ideally, this should be 36% or lower.
What is a Good DTI Ratio?
Different loan types have different DTI requirements, but general guidelines are:
DTI Ratio
Financial Health Status
Lender Perception
0% – 35%
Excellent
Borrower has plenty of disposable income. Highly likely to be approved.
36% – 43%
Good / OK
Acceptable risk. Often the cutoff for "Qualified Mortgages" is 43%.
44% – 49%
High Risk
Borrower may struggle to make payments. Approval is difficult, interest rates may be higher.
50%+
Critical
High likelihood of default. Most lenders will decline new credit applications.
Items Included vs. Excluded in DTI
Included: Mortgage/Rent, HOA fees, Minimum credit card payments, Student loan payments, Auto loans, Personal loans, Alimony/Child Support.
Excluded: Utilities (electricity, water), Groceries, Gas/Transportation costs, Entertainment, Insurance premiums (unless included in mortgage escrow).
How to Lower Your DTI
If your DTI is higher than 43%, consider these strategies before applying for a major loan:
Increase Income: Take on a side hustle, ask for a raise, or include a co-borrower's income.
Pay Down Debt: Focus on high-interest credit cards or paying off small installment loans to eliminate the monthly payment entirely.
Refinance: Extending the term of a loan (like a student loan) can lower the monthly payment, thereby lowering your DTI, even if the total interest paid increases over time.
{
"@context": "https://schema.org",
"@type": "FAQPage",
"mainEntity": [{
"@type": "Question",
"name": "What is a good Debt-to-Income ratio?",
"acceptedAnswer": {
"@type": "Answer",
"text": "A DTI ratio of 36% or less is considered excellent. Most lenders prefer a DTI below 43% for mortgage approval. Ratios above 50% are considered critical and make it very difficult to obtain new credit."
}
}, {
"@type": "Question",
"name": "Does DTI affect credit score?",
"acceptedAnswer": {
"@type": "Answer",
"text": "Directly, no. Credit bureaus do not know your income, so DTI is not part of your credit score calculation. However, high debt balances (credit utilization) do hurt your score, and high DTI can lead to missed payments."
}
}, {
"@type": "Question",
"name": "What debts are included in DTI?",
"acceptedAnswer": {
"@type": "Answer",
"text": "DTI includes monthly recurring debts such as rent/mortgage, car payments, student loans, minimum credit card payments, child support, and personal loans. It generally excludes living expenses like food, utilities, and gas."
}
}]
}