Include salary, bonuses, and other regular income.
2. Monthly Debt Payments
Total Monthly Income:$0.00
Total Monthly Debt:$0.00
Your Debt-to-Income Ratio
0.0%
function calculateDTI() {
// 1. Get Inputs
var incomeInput = document.getElementById('grossMonthlyIncome');
var housingInput = document.getElementById('rentOrMortgage');
var carInput = document.getElementById('carLoans');
var studentInput = document.getElementById('studentLoans');
var ccInput = document.getElementById('creditCards');
var otherInput = document.getElementById('otherDebts');
// 2. Parse Values (handle empty strings as 0)
var grossIncome = parseFloat(incomeInput.value) || 0;
var housing = parseFloat(housingInput.value) || 0;
var car = parseFloat(carInput.value) || 0;
var student = parseFloat(studentInput.value) || 0;
var cc = parseFloat(ccInput.value) || 0;
var other = parseFloat(otherInput.value) || 0;
// 3. Validation
if (grossIncome <= 0) {
alert("Please enter a valid Gross Monthly Income greater than 0.");
return;
}
// 4. Calculate Totals
var totalDebt = housing + car + student + cc + other;
var dtiRatio = (totalDebt / grossIncome) * 100;
// 5. Update UI Text
document.getElementById('displayIncome').innerText = "$" + grossIncome.toLocaleString('en-US', {minimumFractionDigits: 2, maximumFractionDigits: 2});
document.getElementById('displayDebt').innerText = "$" + totalDebt.toLocaleString('en-US', {minimumFractionDigits: 2, maximumFractionDigits: 2});
var percentEl = document.getElementById('dtiPercentage');
percentEl.innerText = dtiRatio.toFixed(2) + "%";
// 6. Determine Status and Color
var statusEl = document.getElementById('dtiStatus');
var messageEl = document.getElementById('dtiMessage');
var resultBox = document.getElementById('dtiResult');
// Reset classes
statusEl.className = 'dti-status';
if (dtiRatio 36 && dtiRatio 43 && dtiRatio <= 50) {
statusEl.innerText = "High Risk";
statusEl.classList.add('status-bad');
messageEl.innerText = "You may face difficulties getting approved for a qualified mortgage. Consider paying down debt.";
} else {
statusEl.innerText = "Critical / Very High Risk";
statusEl.classList.add('status-bad');
messageEl.innerText = "Your debt load is very high relative to your income. It is highly recommended to reduce debt before applying for new credit.";
}
// 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 bills, your DTI measures your capacity to repay new debt.
Simply put, it is the percentage of your gross monthly income that goes toward paying your monthly debt obligations.
Why is DTI Important for Home Loans?
When applying for a mortgage, lenders want to ensure you aren't "house poor." Most conventional loans (like those backed by Fannie Mae or Freddie Mac) prefer a DTI ratio below 36%, though they may accept up to 43% (or even 50% in specific cases with strong compensating factors).
If your DTI is too high, you might be:
Denied a mortgage loan.
Offered a higher interest rate.
Required to make a larger down payment.
The 28/36 Rule
Many financial experts and lenders follow the 28/36 rule:
Front-End Ratio (28%): Your housing costs (mortgage principal, interest, taxes, and insurance) should not exceed 28% of your gross monthly income.
Back-End Ratio (36%): Your total monthly debt (housing + cars + credit cards + student loans) should not exceed 36% of your gross monthly income.
What is Included in DTI?
DTI calculations generally include recurring monthly debts such as:
Rent or Mortgage payments (including HOA fees).
Car loan payments.
Student loan minimum payments.
Minimum credit card payments (not the total balance).
Alimony or child support payments.
Note: Routine household expenses like groceries, utilities, gas, and entertainment are not included in the DTI calculation.
How to Lower Your DTI Ratio
If your calculation shows a high risk percentage, 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 on the application.
Pay Down Principal: Use the "snowball" or "avalanche" method to eliminate small debts (like credit cards) entirely to remove the monthly minimum payment from the calculation.
Refinance Loans: extending the term of a car loan or student loan can lower the monthly payment, thereby improving your DTI (though you may pay more interest over time).