Understanding how much house you can afford is a crucial first step in the home-buying process. This mortgage affordability calculator helps you estimate the maximum mortgage amount you might qualify for, based on your income, debts, and desired down payment.
Several factors influence how much a lender will offer you. Your gross monthly income is the primary determinant, as lenders typically want your total housing debt (including mortgage principal and interest, property taxes, and homeowner's insurance) to be no more than a certain percentage of your income. This is often referred to as the "front-end ratio" or "housing ratio." Additionally, your total monthly debt payments (including credit cards, auto loans, student loans, and your potential mortgage payment) are considered. Lenders usually cap this at a percentage of your gross monthly income, known as the "back-end ratio" or "debt-to-income ratio."
The down payment you plan to make also plays a significant role. A larger down payment reduces the loan amount needed, potentially making a higher-priced home affordable and often leading to better interest rates and avoiding private mortgage insurance (PMI).
Use this calculator as a guide to get a preliminary idea of your borrowing power. Remember, this is an estimate, and your actual mortgage pre-approval amount may vary based on the specific lender's criteria, credit score, and other financial details.
Mortgage Affordability Calculator
Estimated Maximum Mortgage Amount: $0.00
Note: This is an estimate. Actual loan approval depends on lender's underwriting and your specific financial situation.
function calculateMortgageAffordability() {
var grossMonthlyIncome = parseFloat(document.getElementById("grossMonthlyIncome").value);
var estimatedMonthlyDebtPayments = parseFloat(document.getElementById("estimatedMonthlyDebtPayments").value);
var downPayment = parseFloat(document.getElementById("downPayment").value);
var interestRate = parseFloat(document.getElementById("interestRate").value);
var loanTerm = parseFloat(document.getElementById("loanTerm").value);
var maxMortgageAmount = 0;
if (isNaN(grossMonthlyIncome) || grossMonthlyIncome <= 0) {
alert("Please enter a valid Gross Monthly Income.");
return;
}
if (isNaN(estimatedMonthlyDebtPayments) || estimatedMonthlyDebtPayments < 0) {
alert("Please enter a valid Estimated Monthly Debt Payments.");
return;
}
if (isNaN(downPayment) || downPayment < 0) {
alert("Please enter a valid Down Payment Amount.");
return;
}
if (isNaN(interestRate) || interestRate <= 0) {
alert("Please enter a valid Annual Interest Rate.");
return;
}
if (isNaN(loanTerm) || loanTerm <= 0) {
alert("Please enter a valid Loan Term.");
return;
}
// Typical DTI ratios (can vary by lender)
var maxHousingRatio = 0.28; // e.g., 28% of gross income for housing
var maxTotalDebtRatio = 0.36; // e.g., 36% of gross income for all debts
var maxMonthlyHousingPayment = grossMonthlyIncome * maxHousingRatio;
var maxTotalMonthlyDebtPayment = grossMonthlyIncome * maxTotalDebtRatio;
var maxAllowableMortgagePayment = maxTotalMonthlyDebtPayment – estimatedMonthlyDebtPayments;
// Ensure the allowable mortgage payment isn't negative
if (maxAllowableMortgagePayment < 0) {
maxAllowableMortgagePayment = 0;
}
// The actual maximum mortgage payment is the lower of what's allowed by housing ratio or total debt ratio.
// However, the prompt is to find max mortgage amount, so we'll use the total debt ratio constraint as it's typically more limiting.
// We'll also ensure the maximum payment doesn't exceed the housing ratio limit.
var actualMaxMonthlyMortgagePayment = Math.min(maxMonthlyHousingPayment, maxAllowableMortgagePayment);
if (actualMaxMonthlyMortgagePayment 0) {
var numerator = Math.pow(1 + monthlyInterestRate, numberOfPayments) – 1;
var denominator = monthlyInterestRate * Math.pow(1 + monthlyInterestRate, numberOfPayments);
maxMortgageAmount = actualMaxMonthlyMortgagePayment * (numerator / denominator);
} else {
// If interest rate is 0, the loan amount is simply monthly payment * number of payments
maxMortgageAmount = actualMaxMonthlyMortgagePayment * numberOfPayments;
}
}
document.getElementById("maxMortgageAmount").innerText = "$" + maxMortgageAmount.toFixed(2);
}