Buying a home is likely the largest financial decision you will make in your lifetime. Before browsing listings, it is crucial to understand your borrowing power. This Mortgage Affordability Calculator uses the standard debt-to-income (DTI) ratios utilized by lenders to estimate your budget.
Quick Tip: Lenders typically look at your "Gross Income" (before taxes), but you should also consider your "Net Income" (take-home pay) to ensure you aren't "house poor."
Understanding the Calculation (The 28/36 Rule)
Most financial advisors and mortgage lenders use the 28/36 rule to determine affordability. This rule consists of two separate ratios:
Front-End Ratio (28%): Your estimated monthly housing costs (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, student loans, credit cards, etc.) should not exceed 36% of your gross monthly income.
Factors That Impact Your Buying Power
Several variables can significantly change how much house you can afford:
Interest Rates: A higher interest rate increases your monthly payment, which reduces the total loan amount you qualify for. Even a 1% increase can reduce your buying power by thousands.
Down Payment: A larger down payment reduces the loan principal. This not only lowers your monthly payment but often eliminates the need for Private Mortgage Insurance (PMI).
Existing Debt: High monthly obligations (like an expensive car payment) directly reduce the cash available for a mortgage, triggering the "Back-End Ratio" limit.
Property Taxes: High-tax areas increase your monthly PITI (Principal, Interest, Taxes, Insurance) costs, lowering the maximum home price you can target.
What is Included in PITI?
When lenders calculate affordability, they don't just look at the mortgage loan. They look at PITI:
P: Principal (Paying down the balance)
I: Interest ( The cost of borrowing)
T: Taxes (Property taxes)
I: Insurance (Homeowners insurance)
Our calculator estimates taxes and insurance based on the percentage input (defaulting to 1.5%) to give you a realistic "out the door" price.
function calculateHouseAffordability() {
// 1. Get Inputs
var incomeInput = document.getElementById('annualIncome').value;
var debtsInput = document.getElementById('monthlyDebt').value;
var downPaymentInput = document.getElementById('downPayment').value;
var rateInput = document.getElementById('interestRate').value;
var termInput = document.getElementById('loanTerm').value;
var taxRateInput = document.getElementById('propertyTaxRate').value;
// 2. Validate Inputs
if (incomeInput === "" || rateInput === "") {
alert("Please enter at least your Income and an Interest Rate.");
return;
}
var annualIncome = parseFloat(incomeInput) || 0;
var monthlyDebts = parseFloat(debtsInput) || 0;
var downPayment = parseFloat(downPaymentInput) || 0;
var annualRate = parseFloat(rateInput) || 0;
var years = parseInt(termInput) || 30;
var taxInsRate = parseFloat(taxRateInput) || 1.5;
// 3. Logic: Determine Max Allowable Monthly Payment (PITI)
var monthlyIncome = annualIncome / 12;
// Front-End Ratio (Housing only): 28% of Gross Income
var maxFrontEnd = monthlyIncome * 0.28;
// Back-End Ratio (Total Debt): 36% of Gross Income – Existing Debts
var maxBackEnd = (monthlyIncome * 0.36) – monthlyDebts;
// The lender will typically use the LOWER of the two
var maxMonthlyPayment = Math.min(maxFrontEnd, maxBackEnd);
var limitingFactor = (maxFrontEnd < maxBackEnd) ? "Front-End Ratio (Income Limit)" : "Back-End Ratio (Debt Limit)";
if (maxMonthlyPayment Loan = Price – DownPayment
// PITI = ((Price – Down) * M) + (Price * T)
// PITI = (Price * M) – (Down * M) + (Price * T)
// PITI + (Down * M) = Price * (M + T)
// Price = (PITI + (Down * M)) / (M + T)
var monthlyInterest = (annualRate / 100) / 12;
var numPayments = years * 12;
// Mortgage Factor formula: (r(1+r)^n) / ((1+r)^n – 1)
var mortgageFactor = 0;
if (monthlyInterest === 0) {
mortgageFactor = 1 / numPayments;
} else {
mortgageFactor = (monthlyInterest * Math.pow(1 + monthlyInterest, numPayments)) / (Math.pow(1 + monthlyInterest, numPayments) – 1);
}
var monthlyTaxInsFactor = (taxInsRate / 100) / 12;
// Calculate Max Price
var numerator = maxMonthlyPayment + (downPayment * mortgageFactor);
var denominator = mortgageFactor + monthlyTaxInsFactor;
var maxHomePrice = numerator / denominator;
// Safety check if down payment covers everything (edge case)
if (maxHomePrice < downPayment) {
maxHomePrice = downPayment; // You can at least buy what you have in cash, though calculator logic implies financing
}
var loanAmount = maxHomePrice – downPayment;
// 5. Output Results
var formatter = new Intl.NumberFormat('en-US', {
style: 'currency',
currency: 'USD',
maximumFractionDigits: 0
});
document.getElementById('maxPriceDisplay').innerHTML = formatter.format(maxHomePrice);
document.getElementById('maxMonthlyDisplay').innerHTML = formatter.format(maxMonthlyPayment);
document.getElementById('loanAmountDisplay').innerHTML = formatter.format(loanAmount);
document.getElementById('limitingFactorDisplay').innerHTML = limitingFactor;
document.getElementById('affordabilityResult').style.display = 'block';
}