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 loan amount based on your income, debts, and desired monthly payment. Remember, this is an estimate, and lenders will consider many other factors, including your credit score, down payment, and overall financial health.
How Mortgage Affordability Works
Lenders typically look at two main debt-to-income ratios (DTI) when assessing affordability:
Front-end DTI (Housing Ratio): This ratio compares your proposed total monthly housing costs (principal, interest, taxes, insurance, and HOA fees – often called PITI) to your gross monthly income. A common guideline is for this ratio to be no more than 28%.
Back-end DTI (Total Debt Ratio): This ratio compares your total monthly debt obligations (including housing costs, credit card payments, car loans, student loans, etc.) to your gross monthly income. Lenders often prefer this ratio to be no more than 36%, though it can sometimes go up to 43% or even higher depending on the loan program and lender.
This calculator focuses on helping you determine the maximum loan amount based on your desired monthly payment, considering your existing debts and income. You'll input your gross monthly income, your total monthly debt payments (excluding the proposed mortgage), and your estimated total monthly housing payment for the property you're considering.
Factors Affecting Affordability
Interest Rate: Higher interest rates mean a larger portion of your monthly payment goes towards interest, reducing the principal you can pay down and thus the loan amount you can afford.
Loan Term: Longer loan terms (e.g., 30 years vs. 15 years) result in lower monthly payments, potentially allowing you to borrow more.
Property Taxes: These vary by location and can significantly increase your total monthly housing cost.
Homeowner's Insurance: Required by lenders, this cost also adds to your monthly payment.
Private Mortgage Insurance (PMI): If your down payment is less than 20%, you'll likely have to pay PMI, which increases your monthly housing expense.
HOA Fees: If applicable, these mandatory fees are part of your housing costs.
Down Payment: A larger down payment reduces the loan amount needed, making the home more affordable.
Credit Score: A higher credit score generally leads to lower interest rates, improving affordability.
Use the calculator below to get a personalized estimate. Remember to consult with a mortgage lender for a precise pre-approval.
Mortgage Affordability Calculator
function calculateMortgageAffordability() {
var grossMonthlyIncome = parseFloat(document.getElementById("grossMonthlyIncome").value);
var monthlyDebtPayments = parseFloat(document.getElementById("monthlyDebtPayments").value);
var desiredMonthlyPayment = parseFloat(document.getElementById("desiredMonthlyPayment").value);
var annualInterestRate = parseFloat(document.getElementById("interestRate").value);
var loanTermYears = parseFloat(document.getElementById("loanTerm").value);
var resultDiv = document.getElementById("result");
resultDiv.innerHTML = ""; // Clear previous results
// Basic validation
if (isNaN(grossMonthlyIncome) || grossMonthlyIncome <= 0) {
resultDiv.innerHTML = "Please enter a valid gross monthly income.";
return;
}
if (isNaN(monthlyDebtPayments) || monthlyDebtPayments < 0) {
resultDiv.innerHTML = "Please enter valid monthly debt payments.";
return;
}
if (isNaN(desiredMonthlyPayment) || desiredMonthlyPayment <= 0) {
resultDiv.innerHTML = "Please enter a desired total monthly housing payment.";
return;
}
if (isNaN(annualInterestRate) || annualInterestRate < 0) {
resultDiv.innerHTML = "Please enter a valid annual interest rate.";
return;
}
if (isNaN(loanTermYears) || loanTermYears 0) {
var numerator = Math.pow(1 + monthlyInterestRate, loanTermMonths) – 1;
var denominator = monthlyInterestRate * Math.pow(1 + monthlyInterestRate, loanTermMonths);
maxLoanAmount = desiredMonthlyPayment * (numerator / denominator);
} else { // Handle 0% interest rate case
maxLoanAmount = desiredMonthlyPayment * loanTermMonths;
}
// Optional: Check against DTI ratios for a more conservative estimate
var maxHousingPaymentAllowedByFrontEndDTI = grossMonthlyIncome * 0.28;
var maxTotalDebtAllowedByBackEndDTI = grossMonthlyIncome * 0.36;
var maxTotalHousingPaymentAllowedByBackEndDTI = maxTotalDebtAllowedByBackEndDTI – monthlyDebtPayments;
// The actual maximum loan amount is limited by the desired monthly payment calculation
// but we can also show the maximum housing payment allowed by DTI guidelines.
var affordableLoanAmount = Math.min(maxLoanAmount, desiredMonthlyPayment * loanTermMonths); // This is essentially the same as maxLoanAmount if desiredMonthlyPayment is the target.
// To refine this, we should calculate the max loan that *fits* the desired payment.
// The DTI checks can be used to *inform* the desired monthly payment, but the core request
// is to find the loan amount for a given desired payment.
// Let's calculate the maximum loan amount that would result in a monthly payment *up to* the desired monthly payment,
// while also respecting the DTI guidelines for the *total* housing payment.
var actualMaxLoanAmountBasedOnDesiredPayment = maxLoanAmount;
// Now, let's consider the DTI. If the desired monthly payment *exceeds* what 28% of income allows,
// or if the total debt including this payment exceeds 36%, we should flag it or adjust.
// For simplicity of this calculator, we'll assume the desiredMonthlyPayment is a target
// and show the loan amount derived from it. We'll also show DTI warnings.
var loanAmountForDesiredPayment = 0;
if (monthlyInterestRate > 0) {
var numerator = Math.pow(1 + monthlyInterestRate, loanTermMonths) – 1;
var denominator = monthlyInterestRate * Math.pow(1 + monthlyInterestRate, loanTermMonths);
loanAmountForDesiredPayment = desiredMonthlyPayment * (numerator / denominator);
} else {
loanAmountForDesiredPayment = desiredMonthlyPayment * loanTermMonths;
}
// Calculate the maximum allowed total housing payment based on DTI
var maxHousingPayment28 = grossMonthlyIncome * 0.28;
var maxTotalDebt36 = grossMonthlyIncome * 0.36;
var maxHousingPayment36 = maxTotalDebt36 – monthlyDebtPayments;
var finalMaxHousingPayment = Math.min(desiredMonthlyPayment, maxHousingPayment28, maxHousingPayment36);
if (finalMaxHousingPayment < desiredMonthlyPayment) {
resultDiv.innerHTML = "Warning: Your desired monthly housing payment may exceed typical DTI guidelines. Your estimated affordable loan amount based on your desired payment is: $" + loanAmountForDesiredPayment.toFixed(2).replace(/\d(?=(\d{3})+\.)/g, '$&,') + ".";
resultDiv.innerHTML += "Based on a 28% front-end DTI, your maximum housing payment should be around: $" + maxHousingPayment28.toFixed(2).replace(/\d(?=(\d{3})+\.)/g, '$&,') + ".";
resultDiv.innerHTML += "Based on a 36% back-end DTI, your maximum housing payment should be around: $" + maxHousingPayment36.toFixed(2).replace(/\d(?=(\d{3})+\.)/g, '$&,') + ".";
} else {
resultDiv.innerHTML = "Estimated Maximum Affordable Loan Amount: $" + loanAmountForDesiredPayment.toFixed(2).replace(/\d(?=(\d{3})+\.)/g, '$&,') + "";
}
}