Buying a home is a significant financial decision, and understanding how much you can afford to borrow is crucial. A mortgage affordability calculator helps you estimate the maximum loan amount you might qualify for based on your income, existing debts, and other financial factors. This tool provides a starting point for your home-buying journey, allowing you to set realistic expectations and focus your search on properties within your budget.
Key Factors Influencing Mortgage Affordability:
Annual Income: Lenders primarily look at your stable income to determine your ability to repay the loan. Higher income generally translates to a higher borrowing capacity.
Monthly Debt Payments: This includes all your recurring monthly debt obligations, such as credit card payments, student loans, car loans, and personal loans. Lenders use these figures to calculate your debt-to-income (DTI) ratio.
Down Payment: The amount of money you put down upfront significantly impacts your loan amount and the overall price of the home you can afford. A larger down payment reduces the loan amount needed and can also lead to better interest rates and lower private mortgage insurance (PMI) costs.
Interest Rate: The annual interest rate on the mortgage directly affects your monthly payments. A lower interest rate means you can borrow more money for the same monthly payment, or have a lower payment for the same loan amount.
Loan Term: The length of the mortgage (e.g., 15, 20, or 30 years) influences your monthly payments. Longer terms result in lower monthly payments but more interest paid over the life of the loan. Shorter terms have higher monthly payments but less total interest.
How the Calculator Works:
This calculator uses common lending guidelines to estimate your affordability. A widely used rule of thumb is that your total monthly housing expenses (including principal, interest, property taxes, and homeowner's insurance) should not exceed 28% of your gross monthly income, and your total debt obligations (including housing) should not exceed 36% of your gross monthly income. This calculator simplifies these principles to provide a quick estimate.
Example Calculation:
Let's say you have:
Annual Income: $90,000
Total Monthly Debt Payments (excluding mortgage): $500
Down Payment: $20,000
Annual Interest Rate: 6.5%
Loan Term: 30 years
The calculator would first determine your gross monthly income ($90,000 / 12 = $7,500). It would then estimate the maximum monthly housing payment you could afford, keeping your total debt payments within a certain ratio of your income. Based on these figures, it calculates the maximum loan amount you could likely secure and, by adding your down payment, the maximum home price you might be able to afford.
Disclaimer: This calculator provides an estimation only and should not be considered a pre-approval or guarantee of loan approval. Actual mortgage approvals depend on various factors, including your credit score, lender-specific policies, and a full underwriting process. It is always recommended to speak with a mortgage lender for a precise assessment of your borrowing capacity.
function calculateMortgageAffordability() {
var annualIncome = parseFloat(document.getElementById("annualIncome").value);
var monthlyDebtPayments = parseFloat(document.getElementById("monthlyDebtPayments").value);
var downPayment = parseFloat(document.getElementById("downPayment").value);
var interestRate = parseFloat(document.getElementById("interestRate").value);
var loanTerm = parseFloat(document.getElementById("loanTerm").value);
var resultsDiv = document.getElementById("results");
var maxMortgageAmountPara = document.getElementById("maxMortgageAmount");
var maxHomePricePara = document.getElementById("maxHomePrice");
if (isNaN(annualIncome) || isNaN(monthlyDebtPayments) || isNaN(downPayment) || isNaN(interestRate) || isNaN(loanTerm)) {
resultsDiv.innerHTML = "
Please enter valid numbers for all fields.
";
return;
}
// Define lender's maximum debt-to-income ratio (DTI) and housing expense ratio (Front-end Ratio)
// These are common benchmarks, actual lender ratios may vary.
var maxDTI = 0.36; // 36%
var maxHousingRatio = 0.28; // 28%
var grossMonthlyIncome = annualIncome / 12;
var maxTotalMonthlyDebt = grossMonthlyIncome * maxDTI;
var maxMonthlyHousingPayment = grossMonthlyIncome * maxHousingRatio;
// Calculate the maximum allowable monthly debt payment excluding current debts
var maxMortgagePaymentAllowed = maxTotalMonthlyDebt – monthlyDebtPayments;
// Ensure the maximum mortgage payment allowed is not negative
if (maxMortgagePaymentAllowed < 0) {
maxMortgagePaymentAllowed = 0;
}
// Use the more restrictive of the two limits: maxHousingRatio or maxDTI minus other debts
var actualMaxMonthlyPayment = Math.min(maxMonthlyHousingPayment, maxMortgagePaymentAllowed);
// If actualMaxMonthlyPayment is still zero or negative, it means affordability is very low or zero.
if (actualMaxMonthlyPayment <= 0) {
maxMortgageAmountPara.textContent = "$0.00";
maxHomePricePara.textContent = "$" + downPayment.toLocaleString(undefined, { minimumFractionDigits: 2, maximumFractionDigits: 2 });
resultsDiv.innerHTML = "
Your Estimated Maximum Mortgage Affordability:
Based on your income and debt, your maximum affordable monthly mortgage payment is very low or zero. You may not be able to afford a mortgage at this time." + actualMaxMonthlyPayment.toLocaleString(undefined, { style: 'currency', currency: 'USD' }) + "Estimated Maximum Home Price (with down payment): $" + downPayment.toLocaleString(undefined, { minimumFractionDigits: 2, maximumFractionDigits: 2 }) + "";
return;
}
// Calculate the maximum mortgage principal
// M = P [ (1 + r)^n – 1 ] / [ (1 + r)^n ]
// P = M * [ (1 + r)^n ] / [ (1 + r)^n – 1 ]
// Where:
// P = Principal loan amount
// M = Monthly payment
// r = Monthly interest rate
// n = Total number of payments
var monthlyInterestRate = (interestRate / 100) / 12;
var numberOfPayments = loanTerm * 12;
var maxMortgagePrincipal = 0;
if (monthlyInterestRate > 0 && numberOfPayments > 0) {
var numerator = Math.pow(1 + monthlyInterestRate, numberOfPayments);
var denominator = numerator – 1;
if (denominator > 0) {
maxMortgagePrincipal = actualMaxMonthlyPayment * (numerator / denominator);
} else {
// This handles cases where the denominator is zero or negative (e.g., 0% interest rate, though unlikely for mortgage)
// For 0% interest, principal is just payment * number of periods.
if (monthlyInterestRate === 0) {
maxMortgagePrincipal = actualMaxMonthlyPayment * numberOfPayments;
} else {
maxMortgagePrincipal = 0; // Cannot calculate or principal is effectively zero
}
}
} else if (monthlyInterestRate === 0 && numberOfPayments > 0) {
// Special case for 0% interest rate
maxMortgagePrincipal = actualMaxMonthlyPayment * numberOfPayments;
}
var maxHomePrice = maxMortgagePrincipal + downPayment;
maxMortgageAmountPara.textContent = maxMortgagePrincipal.toLocaleString(undefined, { style: 'currency', currency: 'USD' });
maxHomePricePara.textContent = maxHomePrice.toLocaleString(undefined, { style: 'currency', currency: 'USD' });
resultsDiv.innerHTML = "
Your Estimated Maximum Mortgage Affordability:
Estimated Maximum Mortgage Amount: " + maxMortgagePrincipal.toLocaleString(undefined, { style: 'currency', currency: 'USD' }) + "Estimated Maximum Home Price (with down payment): " + maxHomePrice.toLocaleString(undefined, { style: 'currency', currency: 'USD' }) + "";
}