Buying a home is a significant financial decision, and understanding how much you can afford for a mortgage is a crucial first step. Our Mortgage Affordability Calculator helps you estimate the maximum loan amount you might qualify for based on your income, debts, and estimated housing expenses. This tool considers key factors that lenders use to assess your borrowing capacity, providing a valuable starting point for your home-buying journey.
How it Works:
Lenders typically look at two main ratios to determine your affordability:
Front-End Ratio (or Housing Ratio): This ratio compares your total monthly housing costs (principal, interest, property taxes, and homeowner's insurance – often called PITI) to your gross monthly income. A common guideline is that this ratio should not exceed 28%.
Back-End Ratio (or Debt-to-Income Ratio – DTI): This ratio compares your total monthly debt payments (including PITI, car loans, student loans, credit card minimums, etc.) to your gross monthly income. A typical maximum for this ratio is around 36%, though it can vary by lender and loan type.
This calculator uses these principles to give you an estimated affordable mortgage amount. Remember, this is an estimate, and your actual loan approval will depend on a lender's specific underwriting criteria, credit score, down payment, and other factors.
Estimate Your Mortgage Affordability
function calculateAffordability() {
var grossMonthlyIncome = parseFloat(document.getElementById("grossMonthlyIncome").value);
var currentMonthlyDebt = parseFloat(document.getElementById("currentMonthlyDebt").value);
var estimatedAnnualPropertyTaxes = parseFloat(document.getElementById("estimatedAnnualPropertyTaxes").value);
var estimatedAnnualHomeownersInsurance = parseFloat(document.getElementById("estimatedAnnualHomeownersInsurance").value);
var interestRate = parseFloat(document.getElementById("interestRate").value);
var loanTerm = parseFloat(document.getElementById("loanTerm").value);
var downPayment = parseFloat(document.getElementById("downPayment").value);
var resultDiv = document.getElementById("result");
resultDiv.innerHTML = ""; // Clear previous results
if (isNaN(grossMonthlyIncome) || grossMonthlyIncome <= 0 ||
isNaN(currentMonthlyDebt) || currentMonthlyDebt < 0 ||
isNaN(estimatedAnnualPropertyTaxes) || estimatedAnnualPropertyTaxes < 0 ||
isNaN(estimatedAnnualHomeownersInsurance) || estimatedAnnualHomeownersInsurance < 0 ||
isNaN(interestRate) || interestRate <= 0 ||
isNaN(loanTerm) || loanTerm <= 0 ||
isNaN(downPayment) || downPayment < 0) {
resultDiv.innerHTML = "Please enter valid positive numbers for all fields.";
return;
}
var monthlyPITI_max_percentage_of_income = 0.28; // Typical front-end ratio limit
var totalDTI_max_percentage_of_income = 0.36; // Typical back-end ratio limit
// Calculate maximum affordable monthly housing payment (PITI) based on front-end ratio
var maxMonthlyHousingPayment_frontend = grossMonthlyIncome * monthlyPITI_max_percentage_of_income;
// Calculate maximum affordable total monthly debt (including PITI) based on back-end ratio
var maxTotalMonthlyDebt_backend = grossMonthlyIncome * totalDTI_max_percentage_of_income;
// Calculate maximum affordable monthly PITI considering back-end ratio
var maxMonthlyPITI_backend = maxTotalMonthlyDebt_backend – currentMonthlyDebt;
// The more restrictive of the two limits determines the maximum affordable PITI
var affordableMonthlyPITI = Math.min(maxMonthlyHousingPayment_frontend, maxMonthlyPITI_backend);
if (affordableMonthlyPITI <= 0) {
resultDiv.innerHTML = "Based on your inputs, your affordable monthly housing payment is $0. Consider increasing income or reducing debt.";
return;
}
var monthlyPropertyTaxes = estimatedAnnualPropertyTaxes / 12;
var monthlyHomeownersInsurance = estimatedAnnualHomeownersInsurance / 12;
var affordableMonthlyPrincipalAndInterest = affordableMonthlyPITI – monthlyPropertyTaxes – monthlyHomeownersInsurance;
if (affordableMonthlyPrincipalAndInterest 0) {
// P&I = L [ i(1 + i)^n ] / [ (1 + i)^n – 1]
// L = P * [ (1 + i)^n – 1] / i(1 + i)^n
var numerator = Math.pow(1 + monthlyInterestRate, numberOfMonths) – 1;
var denominator = monthlyInterestRate * Math.pow(1 + monthlyInterestRate, numberOfMonths);
maxMortgageAmount = affordableMonthlyPrincipalAndInterest * (numerator / denominator);
} else {
// Handle case where interest rate is 0 (though unlikely for mortgages)
maxMortgageAmount = affordableMonthlyPrincipalAndInterest * numberOfMonths;
}
var estimatedMaxLoanAmount = maxMortgageAmount;
var estimatedMaxHomePrice = estimatedMaxLoanAmount + downPayment;
resultDiv.innerHTML =
"Estimated Maximum Monthly Housing Payment (PITI): $" + affordableMonthlyPITI.toFixed(2) + "" +
"Estimated Maximum Loan Amount: $" + estimatedMaxLoanAmount.toFixed(2) + "" +
"Estimated Maximum Home Price (with your down payment): $" + estimatedMaxHomePrice.toFixed(2);
}