function calculateDTIRatio() {
var grossIncome = parseFloat(document.getElementById('grossIncome').value) || 0;
var rent = parseFloat(document.getElementById('rentMortgage').value) || 0;
var car = parseFloat(document.getElementById('carLoan').value) || 0;
var student = parseFloat(document.getElementById('studentLoan').value) || 0;
var cards = parseFloat(document.getElementById('creditCards').value) || 0;
var others = parseFloat(document.getElementById('otherDebts').value) || 0;
if (grossIncome <= 0) {
alert("Please enter a valid gross monthly income greater than 0.");
return;
}
var totalMonthlyDebt = rent + car + student + cards + others;
var dtiRatio = (totalMonthlyDebt / grossIncome) * 100;
var resultDiv = document.getElementById('dtiResult');
var statusBox = document.getElementById('dtiStatusBox');
var scoreDisplay = document.getElementById('finalDTI');
var feedbackText = document.getElementById('dtiFeedbackText');
var debtDisplay = document.getElementById('totalDebtAmount');
resultDiv.style.display = 'block';
scoreDisplay.innerText = dtiRatio.toFixed(2) + "%";
debtDisplay.innerText = "$" + totalMonthlyDebt.toLocaleString();
statusBox.className = "dti-status";
if (dtiRatio 35 && dtiRatio <= 43) {
statusBox.innerText = "Fair (Moderate Risk)";
statusBox.classList.add("status-fair");
feedbackText.innerText = "This is a standard ratio. 43% is often the maximum DTI for a Qualified Mortgage.";
} else {
statusBox.innerText = "High (Caution)";
statusBox.classList.add("status-high");
feedbackText.innerText = "Your debt is high relative to your income. Lenders may require additional assets or may deny credit applications.";
}
}
Understanding Your Debt-to-Income (DTI) Ratio
The Debt-to-Income (DTI) ratio is a critical financial metric used by lenders, especially mortgage lenders, to determine your ability to manage monthly payments and repay borrowed money. It compares how much you owe every month to how much you earn.
How to Calculate DTI Ratio: The Formula
To calculate your DTI ratio manually, you divide your total monthly debt payments by your gross monthly income. Gross monthly income is the amount you earn before taxes and other deductions are taken out.
The Math: (Total Monthly Debt Payments รท Gross Monthly Income) x 100 = DTI %
What Should You Include in Monthly Debt?
When calculating DTI, you should only include recurring monthly debt obligations. Do not include living expenses like groceries, utilities, or health insurance premiums. Include the following:
Monthly mortgage or rent payments
Auto loan payments
Minimum monthly credit card payments
Student loan payments
Personal loan payments
Child support or alimony payments
Why DTI Ratio Matters
Lenders use this percentage to gauge your financial health. A lower DTI indicates a good balance between debt and income. Conversely, a high DTI suggests that an individual has too much debt for the amount of income they earn each month.
DTI Range
Lender Perception
35% or less
Good: Your debt is at a manageable level.
36% to 49%
Adequate: You have room for improvement; lenders may look at other factors.
50% or more
High Risk: You may have limited funds for savings or emergencies.
Example Calculation
Imagine you have a gross monthly income of $6,000. Your monthly expenses are:
Mortgage: $1,500
Car Loan: $400
Credit Card Minimum: $100
Total Debt = $2,000. To find the ratio: ($2,000 / $6,000) = 0.333, or 33.3% DTI. This is considered a healthy ratio for most mortgage applications.
How to Improve Your DTI Ratio
If your DTI is too high to qualify for a loan, there are two primary ways to fix it:
Reduce Monthly Debt: Pay down credit card balances or refinance high-interest loans to lower the monthly payment.
Increase Gross Income: Seek a raise, take on a side hustle, or add a co-signer to the loan application to boost the total income figure.