Determining "how much house can I afford" is the first critical step in the home buying journey. This calculator helps you estimate your purchasing power based on your income, existing debts, and current interest rates.
The 28/36 Rule Explained
Lenders typically use debt-to-income (DTI) ratios to decide how much they will lend you. The standard qualification rule is known as 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 payments (housing costs + car loans + credit cards + student loans) should not exceed 36% of your gross monthly income.
Our calculator determines your maximum monthly payment based on the lower of these two limits to ensure you don't overstretch your budget.
Factors That Impact Your Affordability
Several key variables change how much home you can buy:
Interest Rates: Even a 1% increase in rates can significantly reduce your buying power by increasing the monthly cost of borrowing.
Down Payment: A larger down payment reduces the loan amount needed, lowering your monthly payments and potentially avoiding Private Mortgage Insurance (PMI).
Debt Load: High monthly debts (like an expensive car payment) directly reduce the amount of income available for a mortgage, drastically lowering your maximum home price.
Tips for Increasing Your Budget
If the result isn't what you hoped for, consider paying down high-interest credit card debt to improve your back-end ratio, or saving for a larger down payment to reduce the loan principal. Improving your credit score can also qualify you for lower interest rates, which boosts affordability.
function calculateAffordability() {
// Get Input Values
var incomeInput = document.getElementById('annualIncome');
var debtsInput = document.getElementById('monthlyDebts');
var downInput = document.getElementById('downPayment');
var rateInput = document.getElementById('interestRate');
var termInput = document.getElementById('loanTerm');
var resultDiv = document.getElementById('result');
var annualIncome = parseFloat(incomeInput.value);
var monthlyDebts = parseFloat(debtsInput.value);
var downPayment = parseFloat(downInput.value);
var interestRate = parseFloat(rateInput.value);
var years = parseFloat(termInput.value);
// Validation
if (isNaN(annualIncome) || annualIncome <= 0 || isNaN(interestRate) || isNaN(years)) {
resultDiv.style.display = "block";
resultDiv.innerHTML = "Please enter valid numbers for Income, Interest Rate, and Term.";
return;
}
// Default values for empty non-critical fields
if (isNaN(monthlyDebts)) monthlyDebts = 0;
if (isNaN(downPayment)) downPayment = 0;
// 1. Calculate Monthly Gross Income
var monthlyGross = annualIncome / 12;
// 2. Calculate Max Allowable Housing Payment based on 28/36 Rule
// Rule 1: Front-end (Housing only) <= 28% of Gross
var limitFront = monthlyGross * 0.28;
// Rule 2: Back-end (Total Debt) <= 36% of Gross
// Max Housing = (Gross * 36%) – Other Debts
var limitBack = (monthlyGross * 0.36) – monthlyDebts;
// The limiting factor is the lower of the two
var maxMonthlyPayment = Math.min(limitFront, limitBack);
// Check if debts are too high
if (maxMonthlyPayment <= 0) {
resultDiv.style.display = "block";
resultDiv.innerHTML = "Your current monthly debts are too high relative to your income to qualify for a standard mortgage based on the 28/36 rule.";
return;
}
// 3. Calculate Max Loan Amount from Max Monthly Payment
// Formula: P = M * ( ( (1+r)^n – 1 ) / ( r * (1+r)^n ) )
var monthlyRate = interestRate / 100 / 12;
var numberOfPayments = years * 12;
// Handle zero interest rate edge case
var maxLoanAmount = 0;
if (interestRate === 0) {
maxLoanAmount = maxMonthlyPayment * numberOfPayments;
} else {
var mathPower = Math.pow(1 + monthlyRate, numberOfPayments);
maxLoanAmount = maxMonthlyPayment * ((mathPower – 1) / (monthlyRate * mathPower));
}
// 4. Calculate Total Home Price
var maxHomePrice = maxLoanAmount + downPayment;
// Formatting Numbers
var currencyFormatter = new Intl.NumberFormat('en-US', {
style: 'currency',
currency: 'USD',
maximumFractionDigits: 0
});
// 5. Output Results
resultDiv.style.display = "block";
resultDiv.innerHTML = `
Maximum Home Price
${currencyFormatter.format(maxHomePrice)}
Maximum Loan Amount: ${currencyFormatter.format(maxLoanAmount)}
Down Payment Included: ${currencyFormatter.format(downPayment)}
Max Monthly P&I Payment: ${currencyFormatter.format(maxMonthlyPayment)}
*Calculation based on the 28/36 qualifying rule. This estimates Principal & Interest only. Taxes and insurance will reduce this amount further.