.dti-calc-header { text-align: center; margin-bottom: 30px; }
.dti-calc-header h2 { color: #2c3e50; margin-bottom: 10px; }
.dti-row { display: flex; flex-wrap: wrap; gap: 20px; margin-bottom: 15px; }
.dti-col { flex: 1; min-width: 250px; }
.dti-label { display: block; font-weight: bold; margin-bottom: 5px; color: #34495e; font-size: 14px; }
.dti-input { width: 100%; padding: 10px; border: 1px solid #bdc3c7; border-radius: 4px; box-sizing: border-box; font-size: 16px; }
.dti-input:focus { border-color: #3498db; outline: none; }
.dti-btn-container { text-align: center; margin-top: 20px; }
.dti-btn { background-color: #3498db; color: white; border: none; padding: 12px 30px; font-size: 18px; border-radius: 5px; cursor: pointer; transition: background 0.3s; }
.dti-btn:hover { background-color: #2980b9; }
.dti-result-box { margin-top: 30px; padding: 20px; background-color: #ffffff; border-left: 5px solid #3498db; border-radius: 4px; display: none; }
.dti-metric { font-size: 24px; font-weight: bold; color: #2c3e50; margin-bottom: 10px; }
.dti-status { font-weight: bold; padding: 5px 10px; border-radius: 4px; color: white; display: inline-block; font-size: 14px; }
.status-green { background-color: #27ae60; }
.status-yellow { background-color: #f39c12; }
.status-red { background-color: #c0392b; }
.dti-article { margin-top: 50px; padding-top: 20px; border-top: 1px solid #ddd; line-height: 1.6; color: #444; }
.dti-article h3 { color: #2c3e50; margin-top: 25px; }
.dti-article p { margin-bottom: 15px; }
.dti-article ul { margin-bottom: 15px; padding-left: 20px; }
.dti-article li { margin-bottom: 8px; }
@media (max-width: 600px) { .dti-row { flex-direction: column; gap: 10px; } }
What is Debt-to-Income (DTI) Ratio?
Your Debt-to-Income (DTI) ratio is a personal finance measure that compares an individual's monthly debt payment to their monthly gross income. Lenders use this ratio to determine your ability to manage monthly payments and repay debts.
Why is DTI Important?
A low DTI demonstrates a good balance between debt and income. Conversely, a high DTI ratio can signal that an individual has too much debt for the amount of income earned. When applying for mortgages or auto loans, lenders typically require a DTI below a certain threshold (often 43%) to qualify.
How to Calculate Your DTI
The formula for calculating DTI is straightforward:
DTI = (Total Monthly Debt Payments / Gross Monthly Income) x 100
Example Calculation
Imagine your annual salary is $60,000. This equates to a monthly gross income of $5,000.
- Rent: $1,200
- Car Loan: $300
- Student Loan: $200
- Credit Cards: $100
Your total monthly debt is $1,800.
Calculation: ($1,800 / $5,000) x 100 = 36%.
Interpreting Your Score
- Under 36%: Excellent. Most lenders view you as a safe borrower.
- 36% – 43%: Good. You are likely to be approved for loans, though terms may vary.
- 43% – 50%: At Risk. You may face difficulties getting approved for a mortgage.
- Over 50%: Critical. You are spending more than half your income on debt payments. Debt relief or consolidation might be necessary.
function calculateDTI() {
var annualIncomeInput = document.getElementById('annualIncome');
var housingInput = document.getElementById('monthlyHousing');
var cardsInput = document.getElementById('monthlyCards');
var loansInput = document.getElementById('monthlyLoans');
var otherInput = document.getElementById('otherDebts');
var annualIncome = parseFloat(annualIncomeInput.value);
var housing = parseFloat(housingInput.value) || 0;
var cards = parseFloat(cardsInput.value) || 0;
var loans = parseFloat(loansInput.value) || 0;
var other = parseFloat(otherInput.value) || 0;
if (isNaN(annualIncome) || annualIncome <= 0) {
alert("Please enter a valid Annual Gross Income greater than zero.");
return;
}
var monthlyIncome = annualIncome / 12;
var totalMonthlyDebt = housing + cards + loans + other;
var dtiRatio = (totalMonthlyDebt / monthlyIncome) * 100;
var resultBox = document.getElementById('dtiResult');
var percentageSpan = document.getElementById('dtiPercentage');
var statusSpan = document.getElementById('dtiStatusText');
var resIncomeSpan = document.getElementById('resMonthlyIncome');
var resDebtSpan = document.getElementById('resTotalDebt');
percentageSpan.innerHTML = dtiRatio.toFixed(2);
resIncomeSpan.innerHTML = monthlyIncome.toFixed(2);
resDebtSpan.innerHTML = totalMonthlyDebt.toFixed(2);
var statusText = "";
var statusClass = "";
if (dtiRatio = 36 && dtiRatio 43 && dtiRatio <= 50) {
statusText = "At Risk";
statusClass = "status-yellow"; // Darker yellow conceptually, keeping class simple
statusSpan.style.backgroundColor = "#e67e22";
} else {
statusText = "Critical / Dangerous";
statusClass = "status-red";
}
// Reset inline style for the middle case override
if (dtiRatio 50) {
statusSpan.style.backgroundColor = "";
}
statusSpan.className = "dti-status " + statusClass;
statusSpan.innerHTML = statusText;
resultBox.style.display = "block";
// Smooth scroll to result
resultBox.scrollIntoView({ behavior: 'smooth', block: 'nearest' });
}