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 the maximum loan amount you might qualify for
based on your income, debts, and desired monthly payment.
To determine your mortgage affordability, lenders typically consider several factors. The most important are:
Gross Monthly Income: This is your income before taxes and other deductions. Lenders often look at your stable income from employment.
Existing Monthly Debt Payments: This includes minimum payments on credit cards, student loans, auto loans, and any other recurring debts.
Estimated Monthly Property Taxes: These are taxes levied by local governments on your property.
Estimated Monthly Homeowners Insurance: This is the cost of insuring your home against damage or loss.
Estimated Monthly Private Mortgage Insurance (PMI): If your down payment is less than 20% of the home's price, you'll likely need to pay PMI.
Down Payment: The amount of cash you pay upfront towards the purchase price of the home.
Interest Rate: The annual interest rate on the mortgage loan.
Loan Term: The duration of the mortgage loan, typically 15 or 30 years.
Lenders use debt-to-income (DTI) ratios to assess your ability to manage monthly housing payments and all your other debt obligations.
Commonly, lenders prefer a front-end DTI (housing costs only) of no more than 28% of your gross monthly income and a back-end DTI
(housing costs plus all other debts) of no more than 36% to 43%, although this can vary.
Use our calculator below to get a personalized estimate. Remember that this is an estimate, and your actual loan approval
will depend on a full credit check and the specific requirements of the lender.
Mortgage Affordability Calculator
15 Years
30 Years
function calculateMortgageAffordability() {
var grossMonthlyIncome = parseFloat(document.getElementById("grossMonthlyIncome").value);
var existingMonthlyDebt = parseFloat(document.getElementById("existingMonthlyDebt").value);
var downPayment = parseFloat(document.getElementById("downPayment").value);
var estimatedAnnualPropertyTax = parseFloat(document.getElementById("estimatedAnnualPropertyTax").value);
var estimatedAnnualHomeownersInsurance = parseFloat(document.getElementById("estimatedAnnualHomeownersInsurance").value);
var estimatedAnnualPMI = parseFloat(document.getElementById("estimatedAnnualPMI").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
// Input validation
if (isNaN(grossMonthlyIncome) || grossMonthlyIncome <= 0 ||
isNaN(existingMonthlyDebt) || existingMonthlyDebt < 0 ||
isNaN(downPayment) || downPayment < 0 ||
isNaN(estimatedAnnualPropertyTax) || estimatedAnnualPropertyTax < 0 ||
isNaN(estimatedAnnualHomeownersInsurance) || estimatedAnnualHomeownersInsurance < 0 ||
isNaN(estimatedAnnualPMI) || estimatedAnnualPMI < 0 ||
isNaN(interestRate) || interestRate <= 0 ||
isNaN(loanTermYears) || loanTermYears <= 0) {
resultDiv.innerHTML = "Please enter valid positive numbers for all fields.";
return;
}
var monthlyPropertyTax = estimatedAnnualPropertyTax / 12;
var monthlyHomeownersInsurance = estimatedAnnualHomeownersInsurance / 12;
var monthlyPMI = estimatedAnnualPMI / 12;
// Calculate maximum allowed monthly housing payment based on a common front-end DTI of 28%
var maxHousingPayment = grossMonthlyIncome * 0.28;
// Calculate the maximum total monthly debt allowed based on a common back-end DTI of 36%
var maxTotalDebt = grossMonthlyIncome * 0.36;
// The maximum monthly PITI (Principal, Interest, Taxes, Insurance) + PMI payment is the lesser of:
// 1. Max Housing Payment (28% of Gross Monthly Income)
// 2. Max Total Debt minus Existing Monthly Debts
var maxPitimipmi = Math.min(maxHousingPayment, maxTotalDebt – existingMonthlyDebt);
// If the calculated max PITI+PMI is negative, it means existing debts are too high for the income.
if (maxPitimipmi < 0) {
resultDiv.innerHTML = "Based on your income and existing debts, it may be difficult to qualify for a mortgage. Your existing debts exceed the maximum allowed for your income.";
return;
}
// Subtract monthly taxes, insurance, and PMI to find the maximum allowable monthly principal & interest (P&I)
var maxPI = maxPitimipmi – monthlyPropertyTax – monthlyHomeownersInsurance – monthlyPMI;
// If P&I is negative, it means taxes, insurance, and PMI alone exceed the affordable housing payment.
if (maxPI 0) {
maxLoanAmount = maxPI * (Math.pow(1 + monthlyInterestRate, numberOfPayments) – 1) / (monthlyInterestRate * Math.pow(1 + monthlyInterestRate, numberOfPayments));
} else {
// Handle 0% interest rate scenario (though unlikely for mortgages)
maxLoanAmount = maxPI * numberOfPayments;
}
var estimatedAffordableHomePrice = maxLoanAmount + downPayment;
resultDiv.innerHTML = "Estimated Maximum Loan Amount: $" + maxLoanAmount.toFixed(2) + "" +
"Estimated Affordable Home Price (Loan + Down Payment): $" + estimatedAffordableHomePrice.toFixed(2);
}