Understanding how much you can afford for a mortgage is a crucial first step in the home-buying process. This Mortgage Affordability Calculator helps you estimate your potential borrowing power by considering your income, existing debts, and the estimated monthly costs of homeownership.
How Mortgage Affordability Works
Lenders typically use a set of guidelines to determine how much they are willing to lend you. The most common metrics are:
Front-End Ratio (or Housing Ratio): This measures the percentage of your gross monthly income that would go towards housing expenses (principal, interest, property taxes, homeowner's insurance, and HOA fees). A common guideline is that this should not exceed 28% of your gross monthly income.
Back-End Ratio (or Debt-to-Income Ratio – DTI): This measures the percentage of your gross monthly income that would go towards all your monthly debt obligations, including your potential mortgage payment, car loans, student loans, credit card payments, and other recurring debts. A common guideline is that this should not exceed 36% of your gross monthly income, though this can vary by lender and loan type.
Our calculator uses these ratios to give you an estimated maximum monthly payment you might qualify for, and then works backward to estimate the maximum mortgage amount you could borrow.
Factors Affecting Affordability
Gross Monthly Income: Your total income before taxes and deductions.
Existing Monthly Debt Payments: All your recurring monthly debt obligations (credit cards, car loans, student loans, personal loans, etc.).
Estimated Monthly Property Taxes: The annual property taxes divided by 12.
Estimated Monthly Homeowner's Insurance: The annual homeowner's insurance premium divided by 12.
Estimated Monthly HOA Fees: If applicable, the monthly homeowners association fees.
Estimated Interest Rate: The current average interest rate for the type of mortgage you are considering.
Loan Term: The length of the mortgage, typically 15 or 30 years.
Remember, this calculator provides an estimate. Your actual borrowing capacity may differ based on lender-specific criteria, your credit score, down payment, and other financial factors.
Mortgage Affordability Calculator
15 Years
30 Years
function calculateMortgageAffordability() {
var grossMonthlyIncome = parseFloat(document.getElementById("grossMonthlyIncome").value);
var existingMonthlyDebt = parseFloat(document.getElementById("existingMonthlyDebt").value);
var propertyTaxesMonthly = parseFloat(document.getElementById("propertyTaxesMonthly").value);
var homeownersInsuranceMonthly = parseFloat(document.getElementById("homeownersInsuranceMonthly").value);
var hoaFeesMonthly = parseFloat(document.getElementById("hoaFeesMonthly").value);
var interestRate = parseFloat(document.getElementById("interestRate").value);
var loanTermYears = parseInt(document.getElementById("loanTermYears").value);
var resultDiv = document.getElementById("mortgageAffordabilityResult");
resultDiv.innerHTML = ""; // Clear previous results
if (isNaN(grossMonthlyIncome) || grossMonthlyIncome <= 0 ||
isNaN(existingMonthlyDebt) || existingMonthlyDebt < 0 ||
isNaN(propertyTaxesMonthly) || propertyTaxesMonthly < 0 ||
isNaN(homeownersInsuranceMonthly) || homeownersInsuranceMonthly < 0 ||
isNaN(hoaFeesMonthly) || hoaFeesMonthly < 0 ||
isNaN(interestRate) || interestRate <= 0 ||
isNaN(loanTermYears) || loanTermYears <= 0) {
resultDiv.innerHTML = "Please enter valid numbers for all fields.";
return;
}
var maxHousingRatio = 0.28; // 28% front-end ratio
var maxDTI = 0.36; // 36% back-end ratio
var maxHousingPayment = grossMonthlyIncome * maxHousingRatio;
var maxTotalDebtPayment = grossMonthlyIncome * maxDTI;
// Calculate maximum allowable mortgage payment (P&I)
var maxMortgagePAndI = maxTotalDebtPayment – existingMonthlyDebt;
var maxHousingPAndI = maxHousingPayment – propertyTaxesMonthly – homeownersInsuranceMonthly – hoaFeesMonthly;
var maxAllowedPAndI = Math.min(maxMortgagePAndI, maxHousingPAndI);
if (maxAllowedPAndI 0) {
maxLoanAmount = maxAllowedPAndI * (1 – Math.pow(1 + monthlyInterestRate, -numberOfPayments)) / monthlyInterestRate;
} else { // Handle case for 0% interest rate, though uncommon for mortgages
maxLoanAmount = maxAllowedPAndI * numberOfPayments;
}
// Cap loan amount at maxAllowedPAndI * numberOfPayments to avoid issues if maxAllowedPAndI is very large due to low interest rates/high income
maxLoanAmount = Math.min(maxLoanAmount, maxAllowedPAndI * numberOfPayments);
var estimatedMaxMonthlyPayment = maxAllowedPAndI;
// Display results
var htmlOutput = "
Your Estimated Mortgage Affordability:
";
htmlOutput += "Estimated Maximum Monthly P&I Payment: $" + estimatedMaxMonthlyPayment.toFixed(2) + "";
htmlOutput += "Estimated Maximum Mortgage Loan Amount: $" + maxLoanAmount.toFixed(2) + "";
htmlOutput += "This is an estimate based on a maximum DTI of " + (maxDTI * 100) + "% and a maximum Housing Ratio of " + (maxHousingRatio * 100) + "%. Lender approval depends on many factors including credit score and specific loan programs.";
resultDiv.innerHTML = htmlOutput;
}