Estimate how much house you can afford based on the 28/36 rule.
Please enter valid positive numbers for Income and Interest Rate.
Maximum Home Price You Can Afford
$0
Max Loan Amount:$0
Monthly Principal & Interest:$0
Est. Monthly Taxes & Insurance:$0
Total Monthly Payment:$0
Understanding How Much House You Can Afford
Buying a home is one of the largest financial decisions you will make. Determining your budget before you start shopping is crucial to ensure you don't overextend yourself financially. This Mortgage Affordability Calculator uses standard lender guidelines to estimate a safe purchase price based on your income, debts, and down payment.
The 28/36 Rule Explanation
Most financial advisors and mortgage lenders use the 28/36 rule to determine affordability. This rule consists of two separate calculations:
Front-End Ratio (28%): Your monthly housing costs (principal, interest, taxes, insurance, and HOA fees) should not exceed 28% of your gross monthly income.
Back-End Ratio (36%): Your total monthly debt payments (housing costs plus credit cards, car loans, student loans, etc.) should not exceed 36% of your gross monthly income.
Our calculator computes both ratios and uses the lower limiting factor to determine the maximum loan amount you qualify for.
Factors That Impact Your Affordability
Several variables can significantly change how much house you can afford:
Interest Rates: A higher interest rate increases your monthly payment, which reduces the loan amount you can afford for the same monthly budget. Even a 1% difference can change your buying power by tens of thousands of dollars.
Down Payment: A larger down payment reduces the loan amount required, lowering your monthly payments and potentially allowing you to purchase a more expensive home.
Existing Debt: High monthly debt obligations (like car payments or student loans) increase your back-end ratio, strictly limiting the amount of income available for a mortgage.
Tips for Increasing Your Home Buying Power
If the result from the calculator is lower than you hoped, consider these strategies:
Pay down existing consumer debt to improve your Debt-to-Income (DTI) ratio.
Save for a larger down payment to reduce the principal loan amount.
Improve your credit score to qualify for lower interest rates.
Shop for homes in areas with lower property taxes or no HOA fees.
function calculateAffordability() {
// 1. Get Input Values
var annualIncome = parseFloat(document.getElementById('grossAnnualIncome').value);
var monthlyDebt = parseFloat(document.getElementById('monthlyDebt').value) || 0;
var downPayment = parseFloat(document.getElementById('downPayment').value) || 0;
var interestRate = parseFloat(document.getElementById('interestRate').value);
var loanTermYears = parseFloat(document.getElementById('loanTerm').value) || 30;
var annualTax = parseFloat(document.getElementById('annualTax').value) || 0;
var annualInsurance = parseFloat(document.getElementById('annualInsurance').value) || 0;
var hoaFees = parseFloat(document.getElementById('hoaFees').value) || 0;
var errorMsg = document.getElementById('errorMsg');
var resultsSection = document.getElementById('resultsSection');
// 2. Validation
if (isNaN(annualIncome) || annualIncome <= 0 || isNaN(interestRate)) {
errorMsg.style.display = 'block';
resultsSection.style.display = 'none';
return;
} else {
errorMsg.style.display = 'none';
}
// 3. Calculation Logic
var monthlyIncome = annualIncome / 12;
var monthlyTax = annualTax / 12;
var monthlyInsurance = annualInsurance / 12;
var monthlyEscrowAndHOA = monthlyTax + monthlyInsurance + hoaFees;
// Calculate Max Allowed Payment based on Front-End Ratio (28%)
// Housing payment (PITI + HOA) <= 28% of Income
var maxPaymentFrontEnd = monthlyIncome * 0.28;
// Calculate Max Allowed Payment based on Back-End Ratio (36%)
// Total Debt (Housing + Other) <= 36% of Income
// Housing Payment <= (36% of Income) – Other Debts
var maxPaymentBackEnd = (monthlyIncome * 0.36) – monthlyDebt;
// The limiting factor is the lower of the two
var maxTotalHousingPayment = Math.min(maxPaymentFrontEnd, maxPaymentBackEnd);
// If debts are too high, maxHousingPayment could be negative
if (maxTotalHousingPayment <= 0) {
maxTotalHousingPayment = 0;
}
// Subtract fixed monthly housing costs (Taxes, Insurance, HOA) to find budget for Principal & Interest
var maxPrincipalAndInterest = maxTotalHousingPayment – monthlyEscrowAndHOA;
// If fixed costs (taxes/HOA) exceed the budget, affordablity is 0
if (maxPrincipalAndInterest < 0) {
maxPrincipalAndInterest = 0;
}
// Calculate Max Loan Amount derived from P&I payment
// Formula: Loan = (Payment * (1 – (1+r)^-n)) / r
var r = (interestRate / 100) / 12; // Monthly interest rate
var n = loanTermYears * 12; // Total number of payments
var maxLoanAmount = 0;
if (r === 0) {
maxLoanAmount = maxPrincipalAndInterest * n;
} else {
maxLoanAmount = (maxPrincipalAndInterest * (1 – Math.pow(1 + r, -n))) / r;
}
// Total Home Price = Loan Amount + Down Payment
var maxHomePrice = maxLoanAmount + downPayment;
// 4. Update UI
// Helper for currency formatting
var formatter = new Intl.NumberFormat('en-US', {
style: 'currency',
currency: 'USD',
maximumFractionDigits: 0
});
document.getElementById('maxHomePrice').innerText = formatter.format(maxHomePrice);
document.getElementById('maxLoanAmount').innerText = formatter.format(maxLoanAmount);
document.getElementById('monthlyPI').innerText = formatter.format(maxPrincipalAndInterest);
document.getElementById('monthlyEscrow').innerText = formatter.format(monthlyEscrowAndHOA);
document.getElementById('totalMonthlyPayment').innerText = formatter.format(maxTotalHousingPayment);
resultsSection.style.display = 'block';
}