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 home price you can qualify for based on your income, debts, and desired loan terms.
Several factors influence your mortgage affordability:
Gross Monthly Income: This is your total income before taxes and deductions. Lenders typically want your total housing payment (principal, interest, taxes, and insurance) to be no more than 28% of your gross monthly income.
Existing Monthly Debt Payments: This includes all your recurring monthly debt obligations, such as credit card payments, student loans, auto loans, and personal loans. Lenders generally prefer your total debt payments (including your potential mortgage) to be no more than 36% of your gross monthly income.
Down Payment: The larger your down payment, the smaller your loan amount will be, increasing your affordability.
Interest Rate: A lower interest rate means a lower monthly payment, allowing you to afford a more expensive home.
Loan Term: The length of the loan (e.g., 15 or 30 years) affects your monthly payment. Longer terms result in lower monthly payments but more interest paid over time.
Property Taxes and Homeowner's Insurance: These costs are added to your monthly mortgage payment and should be factored into your affordability.
Use this calculator to get a realistic estimate of your borrowing power and start your home search with confidence. Remember, this is an estimate, and your actual loan approval will depend on a lender's detailed review of your financial situation.
Mortgage Affordability Calculator
function calculateAffordability() {
var grossMonthlyIncome = parseFloat(document.getElementById("grossMonthlyIncome").value);
var existingMonthlyDebt = parseFloat(document.getElementById("existingMonthlyDebt").value);
var downPayment = parseFloat(document.getElementById("downPayment").value);
var interestRate = parseFloat(document.getElementById("interestRate").value);
var loanTerm = parseFloat(document.getElementById("loanTerm").value);
var annualPropertyTaxes = parseFloat(document.getElementById("annualPropertyTaxes").value);
var annualHomeInsurance = parseFloat(document.getElementById("annualHomeInsurance").value);
var resultDiv = document.getElementById("result");
resultDiv.innerHTML = ""; // Clear previous results
// Input validation
if (isNaN(grossMonthlyIncome) || grossMonthlyIncome <= 0) {
resultDiv.innerHTML = "Please enter a valid Gross Monthly Income.";
return;
}
if (isNaN(existingMonthlyDebt) || existingMonthlyDebt < 0) {
resultDiv.innerHTML = "Please enter a valid Existing Monthly Debt Payments.";
return;
}
if (isNaN(downPayment) || downPayment < 0) {
resultDiv.innerHTML = "Please enter a valid Down Payment Amount.";
return;
}
if (isNaN(interestRate) || interestRate <= 0) {
resultDiv.innerHTML = "Please enter a valid Annual Interest Rate.";
return;
}
if (isNaN(loanTerm) || loanTerm <= 0) {
resultDiv.innerHTML = "Please enter a valid Loan Term in years.";
return;
}
if (isNaN(annualPropertyTaxes) || annualPropertyTaxes < 0) {
resultDiv.innerHTML = "Please enter a valid Annual Property Taxes.";
return;
}
if (isNaN(annualHomeInsurance) || annualHomeInsurance maxTotalMonthlyHousingPayment) {
maxAllowedMortgagePayment = maxTotalMonthlyHousingPayment;
}
var monthlyPropertyTaxes = annualPropertyTaxes / 12;
var monthlyHomeInsurance = annualHomeInsurance / 12;
var actualMaxMortgagePayment = maxAllowedMortgagePayment – monthlyPropertyTaxes – monthlyHomeInsurance;
if (actualMaxMortgagePayment <= 0) {
resultDiv.innerHTML = "Based on your inputs, you may not be able to afford a mortgage with current expenses and desired debt-to-income ratios.";
return;
}
var monthlyInterestRate = (interestRate / 100) / 12;
var numberOfPayments = loanTerm * 12;
// Mortgage payment formula: M = P [ i(1 + i)^n ] / [ (1 + i)^n – 1]
// We need to solve for P (Principal Loan Amount)
// P = M * [ (1 + i)^n – 1] / [ i(1 + i)^n ]
var principalLoanAmount = actualMaxMortgagePayment * (Math.pow(1 + monthlyInterestRate, numberOfPayments) – 1) / (monthlyInterestRate * Math.pow(1 + monthlyInterestRate, numberOfPayments));
var maxAffordableHomePrice = principalLoanAmount + downPayment;
// Display results
resultDiv.innerHTML = "
Estimated Affordability:
" +
"Maximum Principal Loan Amount: $" + principalLoanAmount.toFixed(2) + "" +
"Estimated Maximum Home Price: $" + maxAffordableHomePrice.toFixed(2) + "";
}