Estimate how much house you can afford based on your income, debts, and desired down payment.
(Credit cards, student loans, car loans, etc.)
5%
Understanding Mortgage Affordability
Determining how much house you can afford is a crucial step in the home-buying process. It's not just about the maximum amount a lender is willing to give you; it's about finding a mortgage payment that fits comfortably within your budget and allows you to maintain your lifestyle without undue financial stress. This calculator provides an estimate based on common financial metrics.
Key Factors in Affordability:
Annual Household Income: This is the primary driver of your borrowing capacity. Lenders look at your total income to assess your ability to repay a loan.
Existing Monthly Debt Payments: These include payments for credit cards, student loans, car loans, personal loans, and any other recurring debts. Lenders use these to calculate your Debt-to-Income (DTI) ratio, a key indicator of financial health. A lower DTI generally means you can qualify for a larger loan.
Down Payment: A larger down payment reduces the amount you need to borrow, lowers your Loan-to-Value (LTV) ratio, and can help you avoid Private Mortgage Insurance (PMI) if it's 20% or more of the home's price. It also reduces your monthly payment.
Interest Rate: The interest rate significantly impacts your monthly payment and the total cost of the loan over time. Even a small difference in rate can lead to substantial savings or increased costs.
Loan Term: Shorter loan terms (e.g., 15 years) result in higher monthly payments but less interest paid overall. Longer terms (e.g., 30 years) have lower monthly payments but more interest paid over the life of the loan.
How the Calculator Works:
This calculator uses a common rule of thumb and some basic financial principles:
Maximum Monthly Payment Estimation: It first estimates your maximum affordable monthly housing payment. A common guideline is that your total housing costs (including principal, interest, taxes, and insurance – often called PITI) should not exceed 28% of your gross monthly income. The calculator focuses on the P&I (Principal & Interest) portion that the mortgage itself covers.
Debt-to-Income (DTI) Consideration: Lenders often have DTI limits, with a common upper limit around 43% of your gross monthly income for the total debt (including the new mortgage payment). This calculator simplifies by considering your existing debt payments.
Loan Amount Calculation: Based on your estimated maximum affordable monthly payment (P&I only), the loan term, and the interest rate, the calculator determines the maximum loan amount you could potentially afford.
Maximum Home Price: The maximum affordable home price is then calculated by adding your down payment to the maximum loan amount.
Disclaimer: This calculator provides an estimate for educational purposes only. It does not constitute financial advice. Actual mortgage approval depends on many factors, including your credit score, lender specific guidelines, employment history, and a full underwriting process.
function calculateAffordability() {
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) / 100;
var loanTerm = parseInt(document.getElementById("loanTerm").value);
var resultDiv = document.getElementById("result");
if (isNaN(annualIncome) || annualIncome <= 0 ||
isNaN(monthlyDebtPayments) || monthlyDebtPayments < 0 ||
isNaN(downPayment) || downPayment < 0 ||
isNaN(interestRate) || interestRate <= 0 ||
isNaN(loanTerm) || loanTerm <= 0) {
resultDiv.innerHTML = "Please enter valid positive numbers for all fields.";
return;
}
var grossMonthlyIncome = annualIncome / 12;
// Conservative estimate for maximum P&I payment (often around 28% of gross income)
// We will use a slightly more flexible approach and cap total debt including P&I at around 36-43%
// For simplicity, let's estimate max P&I based on what's left after existing debts, capped by a reasonable percentage of income.
// A common guideline is PITI <= 28% of gross monthly income, and total debt <= 36-43%.
// Let's focus on determining max loan based on a target monthly P&I payment.
// We'll set a target maximum P&I that leaves room for taxes, insurance, and fits within a DTI of ~40% for simplicity.
var maxTotalDebtPayment = grossMonthlyIncome * 0.40; // Cap total debt (existing + P&I) at 40% of gross monthly income
var maxPrincipalInterestPayment = maxTotalDebtPayment – monthlyDebtPayments;
if (maxPrincipalInterestPayment 0) {
// Formula for maximum loan amount based on monthly payment (M), interest rate (r), and term (n)
// M = P * [r(1 + r)^n] / [(1 + r)^n – 1]
// P = M * [(1 + r)^n – 1] / [r(1 + r)^n]
maxLoanAmount = maxPrincipalInterestPayment * (Math.pow(1 + monthlyInterestRate, numberOfMonths) – 1) / (monthlyInterestRate * Math.pow(1 + monthlyInterestRate, numberOfMonths));
} else {
// If interest rate is 0 (highly unlikely but for completeness)
maxLoanAmount = maxPrincipalInterestPayment * numberOfMonths;
}
var maxAffordableHomePrice = maxLoanAmount + downPayment;
// Format results
var formattedMaxLoan = maxLoanAmount.toLocaleString(undefined, { minimumFractionDigits: 0, maximumFractionDigits: 0 });
var formattedHomePrice = maxAffordableHomePrice.toLocaleString(undefined, { minimumFractionDigits: 0, maximumFractionDigits: 0 });
var formattedMonthlyPaymentEstimate = maxPrincipalInterestPayment.toLocaleString(undefined, { minimumFractionDigits: 2, maximumFractionDigits: 2 });
resultDiv.innerHTML =
"Estimated Maximum Loan Amount: $" + formattedMaxLoan + "" +
"Estimated Maximum Affordable Home Price (with down payment): $" + formattedHomePrice + "" +
"Estimated Principal & Interest (P&I) Monthly Payment: $" + formattedMonthlyPaymentEstimate + "" +
"Note: This estimate excludes property taxes, homeowner's insurance, and potential HOA fees, which will increase your total monthly housing cost.";
}