Please fill in all required fields with valid numbers.
Maximum Home Price
$0
Est. Monthly Payment (PITI):$0
Loan Amount:$0
Down Payment Required:$0
Debt-to-Income Used:0%
How Much House Can I Afford?
Determining "how much house can I afford" is the critical first step in the home buying journey. This Mortgage Affordability Calculator estimates your purchasing power by analyzing your income, existing debts, and the current lending environment. Unlike a simple mortgage calculator that just outputs a payment, this tool works backward from your financial constraints to find the maximum property price you can reasonably target.
Understanding Debt-to-Income (DTI) Ratios
Lenders use the Debt-to-Income (DTI) ratio to measure your ability to manage monthly payments and repay debts. There are two types of DTI ratios calculated by this tool:
Front-End Ratio (28%): This looks at what percentage of your gross monthly income would go toward housing costs (Principal, Interest, Taxes, and Insurance). Most conventional loans prefer this to be under 28%.
Back-End Ratio (36%): This includes your housing costs plus all other monthly debts (credit cards, student loans, car payments). Lenders generally prefer this total not to exceed 36% of your gross income.
This calculator determines the maximum monthly payment allowed under both rules and uses the lower (more conservative) figure to ensure you don't overextend yourself.
Key Factors Affecting Your Affordability
Several variables impact your maximum home price:
Down Payment: A larger down payment reduces the loan amount needed, directly increasing your purchasing power. It also provides immediate equity in the home.
Interest Rates: Even a small increase in rates can significantly increase your monthly payment, lowering the total loan amount you qualify for.
Monthly Debts: High monthly obligations (like an expensive car lease) reduce the room in your budget for a mortgage, lowering your back-end DTI limit.
Loan Term: A 30-year term generally allows for a higher loan amount than a 15-year term because the payments are spread out over a longer period, though you will pay more interest in the long run.
Improving Your Home Buying Budget
If the results from the calculator are lower than expected, consider these strategies:
Pay Down Debt: Reducing monthly recurring debts frees up cash flow for a larger mortgage payment.
Boost Credit Score: A better credit score often qualifies you for lower interest rates, which increases affordability.
Save More for Down Payment: Increasing your upfront cash allows you to buy a more expensive home without increasing the monthly loan payment.
function calculateAffordability() {
// 1. Get input values
var annualIncome = parseFloat(document.getElementById('annualIncome').value);
var monthlyDebts = parseFloat(document.getElementById('monthlyDebts').value);
var downPayment = parseFloat(document.getElementById('downPayment').value);
var interestRate = parseFloat(document.getElementById('interestRate').value);
var loanTerm = parseInt(document.getElementById('loanTerm').value);
var propTaxRate = parseFloat(document.getElementById('propTaxRate').value);
// 2. Validation
var errorBox = document.getElementById('errorBox');
var resultBox = document.getElementById('resultBox');
if (isNaN(annualIncome) || isNaN(interestRate) || isNaN(loanTerm)) {
errorBox.style.display = 'block';
resultBox.style.display = 'none';
return;
}
// Handle optional fields that might be empty or NaN
if (isNaN(monthlyDebts)) monthlyDebts = 0;
if (isNaN(downPayment)) downPayment = 0;
if (isNaN(propTaxRate)) propTaxRate = 1.5;
errorBox.style.display = 'none';
// 3. Logic Configuration
var grossMonthlyIncome = annualIncome / 12;
var maxFrontEndDTI = 0.28; // 28% for housing
var maxBackEndDTI = 0.36; // 36% for total debt
// 4. Calculate Max Allowable Monthly Payment
// Option A: Based on Front End (Housing only)
var maxPaymentFront = grossMonthlyIncome * maxFrontEndDTI;
// Option B: Based on Back End (Total debt – existing debt)
var maxTotalDebtPayment = grossMonthlyIncome * maxBackEndDTI;
var maxPaymentBack = maxTotalDebtPayment – monthlyDebts;
// The limiting factor is the lower of the two
var maxMonthlyHousingBudget = Math.min(maxPaymentFront, maxPaymentBack);
if (maxMonthlyHousingBudget <= 0) {
document.getElementById('maxHomePrice').innerText = "$0";
document.getElementById('monthlyPayment').innerText = "$0";
document.getElementById('loanAmount').innerText = "$0";
document.getElementById('downPaymentUsed').innerText = "$" + downPayment.toLocaleString();
document.getElementById('dtiUsed').innerText = "N/A";
resultBox.style.display = 'block';
return;
}
// 5. Solve for Max Home Price
// Formula: MaxPayment = (LoanAmount * MortgageFactor) + (HomePrice * MonthlyTaxRate)
// LoanAmount = HomePrice – DownPayment
// MaxPayment = ((HomePrice – DownPayment) * MortgageFactor) + (HomePrice * MonthlyTaxRate)
// MaxPayment = (HomePrice * MortgageFactor) – (DownPayment * MortgageFactor) + (HomePrice * MonthlyTaxRate)
// MaxPayment + (DownPayment * MortgageFactor) = HomePrice * (MortgageFactor + MonthlyTaxRate)
// HomePrice = (MaxPayment + (DownPayment * MortgageFactor)) / (MortgageFactor + MonthlyTaxRate)
var r = (interestRate / 100) / 12; // Monthly interest rate
var n = loanTerm * 12; // Total payments
var mortgageFactor = 0;
if (interestRate === 0) {
mortgageFactor = 1 / n;
} else {
mortgageFactor = (r * Math.pow(1 + r, n)) / (Math.pow(1 + r, n) – 1);
}
var monthlyTaxRate = (propTaxRate / 100) / 12;
var numerator = maxMonthlyHousingBudget + (downPayment * mortgageFactor);
var denominator = mortgageFactor + monthlyTaxRate;
var maxHomePrice = numerator / denominator;
// Ensure Max Home Price doesn't drop below Down Payment (which would imply negative loan)
if (maxHomePrice < downPayment) {
maxHomePrice = downPayment;
// If home price is just down payment, no loan needed, but budget calculation holds.
}
var loanAmount = maxHomePrice – downPayment;
var pAndI = loanAmount * mortgageFactor;
var taxAndIns = maxHomePrice * monthlyTaxRate;
var totalMonthlyPayment = pAndI + taxAndIns;
// 6. Calculate Used DTI for display
var actualBackEndDTI = ((totalMonthlyPayment + monthlyDebts) / grossMonthlyIncome) * 100;
// 7. Output Formatting
document.getElementById('maxHomePrice').innerText = "$" + Math.floor(maxHomePrice).toLocaleString();
document.getElementById('monthlyPayment').innerText = "$" + Math.round(totalMonthlyPayment).toLocaleString();
document.getElementById('loanAmount').innerText = "$" + Math.floor(loanAmount).toLocaleString();
document.getElementById('downPaymentUsed').innerText = "$" + downPayment.toLocaleString();
document.getElementById('dtiUsed').innerText = actualBackEndDTI.toFixed(1) + "%";
resultBox.style.display = 'block';
}