Understanding how much house you can afford is a crucial first step in the home-buying process. This Mortgage Affordability Calculator helps you estimate your maximum loan amount based on your income, existing debts, and desired down payment. Remember, this is an estimate, and your actual loan approval will depend on a lender's detailed assessment of your financial situation.
How Mortgage Affordability is Calculated
Lenders typically use debt-to-income (DTI) ratios to determine how much you can borrow. There are two common DTI ratios:
Front-end DTI (Housing Ratio): This ratio looks at the percentage of your gross monthly income that would go towards housing costs (principal, interest, taxes, and insurance – PITI). Lenders often prefer this to be around 28% or less.
Back-end DTI (Total Debt Ratio): This ratio considers all your monthly debt obligations, including your potential new mortgage payment, divided by your gross monthly income. Lenders often prefer this to be around 36% or less, though some may go up to 43% or even higher depending on your creditworthiness.
Our calculator uses a simplified approach by estimating your maximum PITI based on the back-end DTI, assuming a target of 36% of your gross monthly income for total debt payments. It then works backward to estimate the maximum loan amount you could qualify for, considering your down payment, interest rate, and loan term.
Important Considerations:
PITI: Property taxes and homeowner's insurance vary significantly by location and property type. These costs can substantially increase your monthly payment.
PMI: If your down payment is less than 20%, you'll likely have to pay Private Mortgage Insurance (PMI), adding to your monthly costs.
Closing Costs: These are fees associated with finalizing your mortgage, typically ranging from 2% to 5% of the loan amount, and are paid at closing.
Credit Score: Your credit score significantly impacts your interest rate and loan approval chances.
Lender Specifics: Different lenders have different underwriting criteria and DTI limits. This calculator provides a general estimate.
function calculateMortgageAffordability() {
var grossMonthlyIncome = parseFloat(document.getElementById("grossMonthlyIncome").value);
var monthlyDebtPayments = parseFloat(document.getElementById("monthlyDebtPayments").value);
var downPayment = parseFloat(document.getElementById("downPayment").value);
var interestRatePercent = parseFloat(document.getElementById("estimatedInterestRate").value);
var loanTermYears = parseInt(document.getElementById("loanTermYears").value);
var resultDiv = document.getElementById("result");
resultDiv.innerHTML = ""; // Clear previous results
if (isNaN(grossMonthlyIncome) || grossMonthlyIncome <= 0) {
resultDiv.innerHTML = "Please enter a valid Gross Monthly Income.";
return;
}
if (isNaN(monthlyDebtPayments) || monthlyDebtPayments < 0) {
resultDiv.innerHTML = "Please enter a valid Total Monthly Debt Payments.";
return;
}
if (isNaN(downPayment) || downPayment < 0) {
resultDiv.innerHTML = "Please enter a valid Down Payment Amount.";
return;
}
if (isNaN(interestRatePercent) || interestRatePercent <= 0) {
resultDiv.innerHTML = "Please enter a valid Estimated Annual Interest Rate.";
return;
}
if (isNaN(loanTermYears) || loanTermYears <= 0) {
resultDiv.innerHTML = "Please enter a valid Loan Term in Years.";
return;
}
// Target maximum total debt (including estimated mortgage payment) as 36% of gross income
var maxTotalDebtPayment = grossMonthlyIncome * 0.36;
var estimatedMaxMortgagePayment = maxTotalDebtPayment – monthlyDebtPayments;
if (estimatedMaxMortgagePayment 0) {
principal = estimatedMaxMortgagePayment * (Math.pow(1 + monthlyInterestRate, numberOfPayments) – 1) / (monthlyInterestRate * Math.pow(1 + monthlyInterestRate, numberOfPayments));
} else {
// Handle zero interest rate case (though unlikely for mortgages)
principal = estimatedMaxMortgagePayment * numberOfPayments;
}
var maxLoanAmount = principal; // This 'principal' is the maximum loan amount we can afford
// Calculate estimated maximum home price
var estimatedMaxHomePrice = maxLoanAmount + downPayment;
resultDiv.innerHTML =
"Based on your inputs:" +
"Estimated Maximum Mortgage Payment (Principal & Interest): $" + estimatedMaxMortgagePayment.toFixed(2) + "" +
"Estimated Maximum Loan Amount: $" + maxLoanAmount.toFixed(2) + "" +
"Estimated Maximum Home Price (including down payment): $" + estimatedMaxHomePrice.toFixed(2) + "" +
"This is an estimate. Actual affordability depends on lender approval, PITI, PMI, closing costs, and your credit score.";
}