Debt-to-Income (DTI) Ratio Calculator
body {
font-family: Arial, sans-serif;
margin: 0;
padding: 0;
background-color: #f4f4f9;
}
header {
background-color: #000000; /* Changed from green to black */
color: white;
text-align: center;
padding: 10px;
}
.container {
max-width: 900px;
margin: 0 auto;
padding: 20px;
}
.form-group {
margin-bottom: 15px;
}
input[type="number"], input[type="text"], input[type="range"] {
width: 100%;
padding: 10px;
margin-top: 5px;
border: 1px solid #ccc;
border-radius: 4px;
}
.results {
margin-top: 20px;
padding: 10px;
background-color: #fff;
border-radius: 5px;
border: 1px solid #ddd;
}
.result-item {
margin-bottom: 10px;
}
.result-item span {
font-weight: bold;
}
canvas {
max-width: 100%;
margin-top: 20px;
}
.description, .instructions {
margin-top: 20px;
font-size: 16px;
}
footer {
text-align: center;
padding: 10px;
background-color: #000000; /* Changed from green to black */
color: white;
font-size: 14px;
}
.disclaimer {
margin-top: 30px;
font-size: 14px;
color: #777;
background-color: #f8f8f8;
padding: 15px;
border-radius: 5px;
border: 1px solid #ddd;
}
Debt-to-Income (DTI) Ratio Calculator
Enter Your Financial Information
Monthly Housing Expense (Mortgage + PMI)
Property Taxes / Month
Home & Flood Insurance / Month
HOA Fees / Month
Credit Card Debt / Month
Auto Loan / Lease Payment / Month
Student Loan Payment / Month
Other Monthly Debts
Total Monthly Income
Calculate DTI
Front-End DTI Ratio (Housing Expense / Income): 0%
Back-End DTI Ratio (Total Debt / Income): 0%
What is DTI?
The Debt-to-Income (DTI) ratio is a financial measure used by lenders to determine the percentage of a person's income that goes toward paying monthly debts. This calculator helps you understand how your debt obligations compare to your income.
How to Use This Calculator
Enter your monthly housing expense, debt payments, and total monthly income into the fields above. Click "Calculate DTI" to see your front-end and back-end DTI ratios. These ratios help assess your ability to manage additional debt, such as a mortgage.
Disclaimer
The Debt-to-Income (DTI) Ratio Calculator is provided for informational purposes only. The real estate broker is not responsible for the accuracy of the results. These calculations should not be used as a sole basis for mortgage approval. For accurate and personalized mortgage advice, we strongly recommend consulting with a licensed mortgage lender or financial professional.
function calculateDTI() {
// Get input values
const housingExpense = parseFloat(document.getElementById('housingExpense').value);
const propertyTaxes = parseFloat(document.getElementById('propertyTaxes').value);
const homeInsurance = parseFloat(document.getElementById('homeInsurance').value);
const hoaFees = parseFloat(document.getElementById('hoaFees').value);
const creditCardDebt = parseFloat(document.getElementById('creditCardDebt').value);
const autoLoan = parseFloat(document.getElementById('autoLoan').value);
const studentLoan = parseFloat(document.getElementById('studentLoan').value);
const otherDebt = parseFloat(document.getElementById('otherDebt').value);
const income = parseFloat(document.getElementById('income').value);
// Calculate total housing expense (B)
const totalHousingExpense = housingExpense + propertyTaxes + homeInsurance + hoaFees;
// Calculate total debt payments (C)
const totalDebtPayments = creditCardDebt + autoLoan + studentLoan + otherDebt;
// Calculate Front-End DTI (B / A)
const frontEndDTI = (totalHousingExpense / income) * 100;
// Calculate Back-End DTI (D / A)
const totalMonthlyPayments = totalHousingExpense + totalDebtPayments;
const backEndDTI = (totalMonthlyPayments / income) * 100;
// Display results
document.getElementById('frontEndDTI').innerText = frontEndDTI.toFixed(2) + '%';
document.getElementById('backEndDTI').innerText = backEndDTI.toFixed(2) + '%';
// Display results section
document.getElementById('results').style.display = 'block';
// Render DTI Chart
const ctx = document.getElementById('dtiChart').getContext('2d');
new Chart(ctx, {
type: 'pie',
data: {
labels: ['Front-End DTI', 'Back-End DTI'],
datasets: [{
label: 'DTI Ratios',
data: [frontEndDTI, backEndDTI],
backgroundColor: ['#FF0000', '#33FF57'] // Changed orange to red
}]
}
});
}