Determining how much house you can afford is a crucial first step in the home-buying process.
Mortgage affordability isn't just about the sticker price of a home; it's about your overall
financial picture, including your income, existing debts, savings for a down payment, and the
prevailing interest rates and loan terms. Lenders use various metrics to assess your ability
to repay a mortgage, and understanding these can empower you to make informed decisions.
Key Factors in Mortgage Affordability:
Annual Household Income: This is the primary source of funds for making your mortgage payments. Lenders will look at your gross income (before taxes).
Total Monthly Debt Payments: This includes all your recurring monthly obligations like car loans, student loans, credit card payments, and personal loans. High existing debt can significantly reduce your borrowing capacity.
Down Payment: A larger down payment reduces the amount you need to borrow, lowers your Loan-to-Value (LTV) ratio, and can sometimes secure better interest rates. It also directly impacts your monthly payment.
Interest Rate: Even small changes in the interest rate can have a substantial impact on your monthly payment and the total cost of the loan over its lifetime.
Loan Term: The length of the mortgage (e.g., 15, 30 years) affects the size of your monthly payments. Shorter terms mean higher monthly payments but less interest paid overall.
How Lenders Assess Affordability (The 28/36 Rule):
While this calculator provides an estimate, lenders often use guidelines like the 28/36 rule:
Front-End Ratio (28%): Your total monthly housing expenses (principal, interest, taxes, insurance – PITI) should not exceed 28% of your gross monthly income.
Back-End Ratio (36%): Your total monthly debt obligations (including PITI) should not exceed 36% of your gross monthly income.
This calculator simplifies the process by focusing on income and debt to estimate potential mortgage payment capacity, and then deriving an estimated loan amount. It's important to remember that this is an estimate, and actual loan approval depends on a lender's specific criteria, credit score, employment history, and other factors.
Example Calculation:
Let's say you have an annual household income of $80,000. Your total monthly debt payments (car loan, credit cards) are $1,000. You have saved a down payment of $40,000. The estimated annual interest rate is 5.5%, and you are considering a 30-year loan term.
Based on these figures, the calculator will estimate the maximum monthly mortgage payment you might afford and then work backward to suggest a potential loan amount you could qualify for, considering your down payment.
function calculateMortgageAffordability() {
var annualIncome = parseFloat(document.getElementById("annualIncome").value);
var monthlyDebt = parseFloat(document.getElementById("monthlyDebt").value);
var downPayment = parseFloat(document.getElementById("downPayment").value);
var interestRate = parseFloat(document.getElementById("interestRate").value);
var loanTerm = parseFloat(document.getElementById("loanTerm").value);
var resultDiv = document.getElementById("result");
resultDiv.innerHTML = ""; // Clear previous results
// Validate inputs
if (isNaN(annualIncome) || annualIncome <= 0 ||
isNaN(monthlyDebt) || monthlyDebt < 0 ||
isNaN(downPayment) || downPayment < 0 ||
isNaN(interestRate) || interestRate <= 0 ||
isNaN(loanTerm) || loanTerm <= 0) {
resultDiv.innerHTML = "Please enter valid positive numbers for all fields.";
return;
}
// Calculate maximum monthly housing payment (using 28% of gross monthly income as a guideline)
var grossMonthlyIncome = annualIncome / 12;
var maxHousingPayment = grossMonthlyIncome * 0.28;
// Calculate maximum total debt payment (using 36% of gross monthly income as a guideline)
var maxTotalDebt = grossMonthlyIncome * 0.36;
// Calculate affordable monthly mortgage payment (P&I only, excluding taxes/insurance for simplicity in this estimator)
// This is the maximum housing payment minus existing debts.
var affordableMonthlyMortgage = maxHousingPayment – monthlyDebt;
// Ensure affordable monthly mortgage is not negative
if (affordableMonthlyMortgage 0 && numberOfPayments > 0) {
var factor = Math.pow(1 + monthlyInterestRate, numberOfPayments);
maxLoanAmount = affordableMonthlyMortgage * (factor – 1) / (monthlyInterestRate * factor);
} else if (affordableMonthlyMortgage > 0) { // Case for 0% interest (though unlikely for mortgages)
maxLoanAmount = affordableMonthlyMortgage * numberOfPayments;
}
// Total potential home price = Max Loan Amount + Down Payment
var estimatedHomePrice = maxLoanAmount + downPayment;
// Format results for display
var formattedMaxLoanAmount = maxLoanAmount.toLocaleString(undefined, { style: 'currency', currency: 'USD' });
var formattedEstimatedHomePrice = estimatedHomePrice.toLocaleString(undefined, { style: 'currency', currency: 'USD' });
var formattedAffordableMonthlyMortgage = affordableMonthlyMortgage.toLocaleString(undefined, { style: 'currency', currency: 'USD' });
var formattedMaxHousingPayment = maxHousingPayment.toLocaleString(undefined, { style: 'currency', currency: 'USD' });
var formattedMaxTotalDebt = maxTotalDebt.toLocaleString(undefined, { style: 'currency', currency: 'USD' });
resultDiv.innerHTML =
"Estimated Maximum Loan Amount: " + formattedMaxLoanAmount + "" +
"Estimated Maximum Home Purchase Price (incl. down payment): " + formattedEstimatedHomePrice + "" +
"(Based on an estimated max monthly mortgage payment of " + formattedAffordableMonthlyMortgage + "/month)" +
"Note: This estimation uses the 28% rule for housing costs and 36% for total debt. Actual affordability depends on lender criteria, credit score, property taxes, insurance, HOA fees, and other factors.";
}