Understanding how much house you can afford is a crucial first step in the home-buying process. Our Mortgage Affordability Calculator helps you estimate your potential borrowing power based on your income, debts, and down payment. This tool provides a starting point for your financial planning and can help you set realistic expectations for your home search.
How Mortgage Affordability Works
Lenders determine how much they are willing to lend you by assessing your Debt-to-Income (DTI) ratio, your creditworthiness, the size of your down payment, and current interest rates. Generally, lenders prefer a front-end DTI (housing costs only) of no more than 28% and a back-end DTI (all debts including housing) of no more than 36% to 43%, though this can vary.
The calculator takes into account your:
Gross Monthly Income: The total income you earn before taxes and other deductions.
Monthly Debt Payments: Existing recurring monthly debts such as car loans, student loans, and credit card minimum payments.
Down Payment: The initial amount of money you pay upfront towards the purchase price of the home.
Estimated Interest Rate: The annual interest rate you expect to pay on the mortgage.
Loan Term: The number of years you plan to repay the mortgage (typically 15 or 30 years).
By inputting these figures, the calculator estimates the maximum monthly mortgage payment you might qualify for, which then helps determine the maximum home price you can afford.
15 Years
30 Years
function calculateAffordability() {
var grossMonthlyIncome = parseFloat(document.getElementById("grossMonthlyIncome").value);
var monthlyDebtPayments = parseFloat(document.getElementById("monthlyDebtPayments").value);
var downPayment = parseFloat(document.getElementById("downPayment").value);
var interestRate = parseFloat(document.getElementById("interestRate").value);
var loanTerm = parseInt(document.getElementById("loanTerm").value);
var resultDiv = document.getElementById("result");
resultDiv.innerHTML = ""; // Clear previous results
if (isNaN(grossMonthlyIncome) || isNaN(monthlyDebtPayments) || isNaN(downPayment) || isNaN(interestRate) || isNaN(loanTerm)) {
resultDiv.innerHTML = "Please enter valid numbers for all fields.";
return;
}
// Calculate maximum PITI (Principal, Interest, Taxes, Insurance) based on DTI ratios
// Using a common guideline: Front-end DTI (PITI) max 28%, Back-end DTI (PITI + Debts) max 36%
var maxFrontEndDTI = 0.28;
var maxBackEndDTI = 0.36;
var maxPITI_fromFrontEnd = grossMonthlyIncome * maxFrontEndDTI;
var maxPITI_fromBackEnd = (grossMonthlyIncome * maxBackEndDTI) – monthlyDebtPayments;
var maxPITI = Math.min(maxPITI_fromFrontEnd, maxPITI_fromBackEnd);
if (maxPITI <= 0) {
resultDiv.innerHTML = "Based on your inputs, your estimated maximum housing payment is too low to afford a mortgage. You may want to review your income and debt levels.";
return;
}
// Estimate Taxes and Insurance (PITI components excluding Principal & Interest)
// These are rough estimates and can vary significantly by location and home value.
// A common estimation is 1.2% of home value for taxes and 0.5% for insurance annually.
// For affordability calculation, we'll use a percentage of the estimated PITI itself.
// Let's assume Taxes & Insurance are roughly 1.5% of the *home price* annually.
// This means PITI is approximately 1.5% of home price + Principal + Interest.
// A simpler approach for *this calculator* is to estimate that taxes and insurance might
// represent about 20-30% of the total PITI, or we can estimate it based on potential loan amount.
// For simplicity in this calculator, we'll assume roughly 1.2% for property taxes and 0.3% for homeowners insurance annually,
// which would be ~1.5% of the loan amount plus downpayment.
// Let's simplify this: Assume PITI (Principal, Interest, Taxes, Insurance)
// is what the DTI ratio applies to. We need to back-calculate the loan amount.
// We need to estimate PITI first to back-calculate loan amount.
// Let's make a simplifying assumption for taxes and insurance for this calculator.
// A common rule of thumb is that property taxes and homeowner's insurance might add
// around 1.5% of the property value annually.
// Let's assume PITI (Principal + Interest + Taxes + Insurance) is our target.
// We are calculating the maximum *loan amount*. The PITI calculation uses the loan amount.
// To back-calculate, we need to estimate the PI portion of the max PITI.
// Let's assume Taxes & Insurance are roughly 0.15% of the *Loan Amount* per month.
// This is a rough estimate for demonstration.
var estimatedMonthlyTaxesAndInsurance = maxPITI * 0.15; // Rough estimate as 15% of max PITI for T&I
var maxMonthlyPrincipalAndInterest = maxPITI – estimatedMonthlyTaxesAndInsurance;
if (maxMonthlyPrincipalAndInterest 0) {
var factor = Math.pow(1 + monthlyInterestRate, numberOfPayments);
principalLoanAmount = (maxMonthlyPrincipalAndInterest * (factor – 1)) / (monthlyInterestRate * factor);
} else {
// Handle zero interest rate case (though unlikely for mortgages)
principalLoanAmount = maxMonthlyPrincipalAndInterest * numberOfPayments;
}
var estimatedHomePrice = principalLoanAmount + downPayment;
resultDiv.innerHTML = `
Estimated Affordability Results:
Estimated Maximum Monthly PITI (Principal, Interest, Taxes, Insurance): $${maxPITI.toFixed(2)}
Estimated Monthly Principal & Interest Payment: $${maxMonthlyPrincipalAndInterest.toFixed(2)}
Estimated Maximum Mortgage Loan Amount: $${principalLoanAmount.toFixed(2)}
Estimated Maximum Home Price (Loan + Down Payment): $${estimatedHomePrice.toFixed(2)}
Note: These are estimates. Actual affordability depends on lender policies, credit score, property taxes, homeowners insurance, PMI (if applicable), and other factors. Consult with a mortgage professional for precise figures.
`;
}
#mortgageCalculatorForm {
margin: 20px 0;
padding: 20px;
border: 1px solid #ccc;
border-radius: 8px;
background-color: #f9f9f9;
}
#mortgageCalculatorForm div {
margin-bottom: 15px;
}
#mortgageCalculatorForm label {
display: block;
margin-bottom: 5px;
font-weight: bold;
}
#mortgageCalculatorForm input[type="number"],
#mortgageCalculatorForm select {
width: calc(100% – 12px);
padding: 8px;
border: 1px solid #ccc;
border-radius: 4px;
box-sizing: border-box; /* Include padding and border in the element's total width and height */
}
#mortgageCalculatorForm button {
padding: 10px 15px;
background-color: #007bff;
color: white;
border: none;
border-radius: 4px;
cursor: pointer;
font-size: 16px;
}
#mortgageCalculatorForm button:hover {
background-color: #0056b3;
}
#result {
margin-top: 20px;
padding: 15px;
border: 1px solid #d4edda;
background-color: #d4edda;
color: #155724;
border-radius: 4px;
}
#result h3 {
margin-top: 0;
}