Understanding how much house you can afford is a crucial first step in the home-buying process. This mortgage affordability calculator helps you estimate the maximum mortgage loan you can qualify for based on your income, debts, and desired loan terms. It takes into account common lending criteria to give you a realistic picture of your borrowing power.
Key Factors to Consider:
Gross Monthly Income: This is your income before taxes and other deductions. Lenders use this to determine your debt-to-income ratio.
Monthly Debt Payments: This includes payments for credit cards, student loans, car loans, personal loans, and any other recurring debts. It does NOT include current rent or utilities.
Estimated Monthly Property Taxes: These are annual property taxes divided by 12.
Estimated Monthly Homeowner's Insurance: This is your annual homeowner's insurance premium divided by 12.
Down Payment: The amount of money you plan to pay upfront.
Interest Rate: The annual interest rate on the mortgage.
Loan Term (Years): The duration of the mortgage loan (e.g., 15, 30 years).
Lenders typically look at your front-end ratio (housing costs, including PITI – Principal, Interest, Taxes, Insurance – should not exceed a certain percentage of your gross monthly income, often around 28%) and your back-end ratio (total debt payments, including PITI, should not exceed a certain percentage of your gross monthly income, often around 36%). This calculator uses a simplified approach to estimate affordability.
Mortgage Affordability Calculator
function calculateAffordability() {
var grossMonthlyIncome = parseFloat(document.getElementById("grossMonthlyIncome").value);
var monthlyDebtPayments = parseFloat(document.getElementById("monthlyDebtPayments").value);
var monthlyTaxes = parseFloat(document.getElementById("monthlyTaxes").value);
var monthlyInsurance = parseFloat(document.getElementById("monthlyInsurance").value);
var downPayment = parseFloat(document.getElementById("downPayment").value);
var interestRate = parseFloat(document.getElementById("interestRate").value);
var loanTermYears = parseInt(document.getElementById("loanTermYears").value);
var resultDiv = document.getElementById("result");
resultDiv.innerHTML = ""; // Clear previous results
// Basic validation
if (isNaN(grossMonthlyIncome) || grossMonthlyIncome <= 0 ||
isNaN(monthlyDebtPayments) || monthlyDebtPayments < 0 ||
isNaN(monthlyTaxes) || monthlyTaxes < 0 ||
isNaN(monthlyInsurance) || monthlyInsurance < 0 ||
isNaN(downPayment) || downPayment < 0 ||
isNaN(interestRate) || interestRate <= 0 ||
isNaN(loanTermYears) || loanTermYears <= 0) {
resultDiv.innerHTML = "Please enter valid positive numbers for all fields.";
return;
}
// Lender's typical DTI limits (can be adjusted)
var maxDTI = 0.36; // Back-end Debt-to-Income Ratio
var maxHousingRatio = 0.28; // Front-end Housing Expense Ratio
// Calculate maximum total monthly debt payment allowed
var maxTotalMonthlyDebt = grossMonthlyIncome * maxDTI;
// Calculate maximum housing payment (PITI) allowed
var maxMonthlyPITI = grossMonthlyIncome * maxHousingRatio;
// The actual affordable housing payment is limited by both ratios.
// We'll aim for the more conservative limit.
var affordableMonthlyPITI = Math.min(maxTotalMonthlyDebt – monthlyDebtPayments, maxMonthlyPITI);
if (affordableMonthlyPITI <= 0) {
resultDiv.innerHTML = "Based on your income and existing debts, you may not qualify for a mortgage with these parameters. Consider increasing income, reducing debt, or adjusting your housing budget.";
return;
}
// Calculate affordable monthly P&I (Principal & Interest)
var affordableMonthlyPI = affordableMonthlyPITI – monthlyTaxes – monthlyInsurance;
if (affordableMonthlyPI 0) {
maxLoanAmount = affordableMonthlyPI * (Math.pow(1 + monthlyInterestRate, loanTermMonths) – 1) / (monthlyInterestRate * Math.pow(1 + monthlyInterestRate, loanTermMonths));
} else {
// Handle zero interest rate case (though unlikely for mortgages)
maxLoanAmount = affordableMonthlyPI * loanTermMonths;
}
// Calculate the maximum affordable home price
var maxHomePrice = maxLoanAmount + downPayment;
resultDiv.innerHTML =
"Estimated Maximum Mortgage Loan: $" + maxLoanAmount.toFixed(2) + "" +
"Estimated Maximum Home Price You Can Afford: $" + maxHomePrice.toFixed(2) + "" +
"Disclaimer: This is an estimate. Actual loan approval depends on lender's specific criteria, credit score, loan type, and other factors.";
}