Understanding how much mortgage you can afford is a crucial first step in the home-buying process. This calculator helps you estimate your maximum affordable mortgage amount based on your income, debts, and desired monthly payment.
How Mortgage Affordability Works
Lenders typically consider several factors when determining how much they're willing to lend you. The two most common ratios they use are:
Front-end Ratio (Housing Ratio): This ratio compares your potential monthly housing costs (principal, interest, taxes, and insurance – PITI) to your gross monthly income. A common guideline is that PITI should not exceed 28% of your gross monthly income.
Back-end Ratio (Debt-to-Income Ratio – DTI): This ratio compares all your monthly debt obligations (including your potential PITI, car loans, student loans, credit card payments, etc.) to your gross monthly income. A common guideline is that DTI should not exceed 36% of your gross monthly income, though this can vary depending on the lender and your creditworthiness.
This calculator focuses on the DTI ratio, as it provides a more comprehensive view of your overall debt burden. By inputting your financial details, you can get a personalized estimate of your borrowing capacity.
Using the Mortgage Affordability Calculator
To use the calculator, please provide the following information:
Gross Monthly Income: Your total income before taxes and deductions.
Total Monthly Debt Payments (excluding potential mortgage): This includes minimum payments for credit cards, car loans, student loans, personal loans, alimony, child support, 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.
Maximum Desired Monthly Payment (PITI): The highest amount you are comfortable paying each month for your mortgage, including principal, interest, taxes, and insurance.
Interest Rate: The estimated annual interest rate for the mortgage.
Loan Term (Years): The duration of the mortgage in years (e.g., 30).
The calculator will then estimate your maximum affordable mortgage amount and the corresponding loan amount.
Mortgage Affordability Calculator Inputs
function calculateMortgageAffordability() {
var grossMonthlyIncome = parseFloat(document.getElementById("grossMonthlyIncome").value);
var totalMonthlyDebt = parseFloat(document.getElementById("totalMonthlyDebt").value);
var monthlyTaxes = parseFloat(document.getElementById("monthlyTaxes").value);
var monthlyInsurance = parseFloat(document.getElementById("monthlyInsurance").value);
var maxMonthlyPayment = parseFloat(document.getElementById("maxMonthlyPayment").value);
var interestRate = parseFloat(document.getElementById("interestRate").value) / 100;
var loanTerm = parseInt(document.getElementById("loanTerm").value);
var resultDiv = document.getElementById("result");
resultDiv.innerHTML = ""; // Clear previous results
if (isNaN(grossMonthlyIncome) || isNaN(totalMonthlyDebt) || isNaN(monthlyTaxes) || isNaN(monthlyInsurance) || isNaN(maxMonthlyPayment) || isNaN(interestRate) || isNaN(loanTerm)) {
resultDiv.innerHTML = "Please enter valid numbers for all fields.";
return;
}
// Constants for DTI (using common lender guidelines)
var maxDtiRatio = 0.36; // 36%
// Calculate maximum total monthly debt allowed
var maxTotalMonthlyDebtAllowed = grossMonthlyIncome * maxDtiRatio;
// Calculate the maximum PITI payment allowed based on DTI
var maxPitiAllowedByDti = maxTotalMonthlyDebtAllowed – totalMonthlyDebt;
// The actual maximum monthly payment is the lesser of the user's desired max or what DTI allows
var actualMaxPiti = Math.min(maxMonthlyPayment, maxPitiAllowedByDti);
if (actualMaxPiti <= (monthlyTaxes + monthlyInsurance)) {
resultDiv.innerHTML = "Based on your inputs, your desired maximum monthly payment is too low to cover taxes and insurance, or your existing debt is too high for your income. Cannot calculate affordable mortgage amount.";
return;
}
var maxPrincipalAndInterest = actualMaxPiti – monthlyTaxes – monthlyInsurance;
if (maxPrincipalAndInterest 0) {
maxLoanAmount = maxPrincipalAndInterest * (Math.pow(1 + monthlyInterestRate, numberOfMonths) – 1) / (monthlyInterestRate * Math.pow(1 + monthlyInterestRate, numberOfMonths));
} else {
// Handle 0% interest rate scenario (though unlikely for mortgages)
maxLoanAmount = maxPrincipalAndInterest * numberOfMonths;
}
// Display results
resultDiv.innerHTML = "
Estimated Affordability
";
resultDiv.innerHTML += "Maximum Total Monthly Debt Allowed (36% DTI): $" + maxTotalMonthlyDebtAllowed.toFixed(2) + "";
resultDiv.innerHTML += "Maximum PITI Allowed by DTI: $" + maxPitiAllowedByDti.toFixed(2) + "";
resultDiv.innerHTML += "Your Maximum Affordable PITI (lesser of desired or DTI-limited): $" + actualMaxPiti.toFixed(2) + "";
resultDiv.innerHTML += "Maximum Principal & Interest Payment: $" + maxPrincipalAndInterest.toFixed(2) + "";
resultDiv.innerHTML += "Estimated Maximum Mortgage Loan Amount: $" + maxLoanAmount.toFixed(2) + "";
resultDiv.innerHTML += "Note: This is an estimate. Lender approval depends on many factors including credit score, down payment, and specific loan programs.";
}