Use this calculator to estimate how much home you can afford based on your income, debts, and down payment.
Buying a home is a significant financial decision, and understanding your affordability is the crucial first step.
This calculator helps you get a realistic idea of the mortgage amount you might qualify for, considering several key factors.
How Mortgage Affordability Works
Lenders use several metrics to determine how much you can borrow. A common guideline is the Debt-to-Income (DTI) ratio.
There are typically two DTI ratios considered:
Front-end DTI (Housing Ratio): This ratio compares your estimated monthly housing expenses (principal, interest, taxes, and insurance – PITI) to your gross monthly income. A common target is below 28%.
Back-end DTI (Total Debt Ratio): This ratio compares all your monthly debt obligations (including the proposed mortgage payment, plus existing debts like car loans, student loans, and credit card payments) to your gross monthly income. A common target is below 36%.
This calculator provides an estimated maximum mortgage amount based on common lending guidelines, assuming a maximum back-end DTI of 36%. It does not include property taxes, homeowner's insurance, or HOA fees, which will increase your actual monthly housing cost and affect your PITI.
Your actual loan approval will depend on the lender's specific criteria, your credit score, employment history, and other financial factors.
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 = parseFloat(document.getElementById("loanTerm").value);
var resultDiv = document.getElementById("result");
resultDiv.innerHTML = ""; // Clear previous results
if (isNaN(annualIncome) || isNaN(monthlyDebtPayments) || isNaN(downPayment) || isNaN(interestRate) || isNaN(loanTerm) ||
annualIncome <= 0 || monthlyDebtPayments < 0 || downPayment < 0 || interestRate <= 0 || loanTerm <= 0) {
resultDiv.innerHTML = "Please enter valid positive numbers for all fields.";
return;
}
var monthlyIncome = annualIncome / 12;
// Common back-end DTI guideline is 36%
var maxTotalDebtPayment = monthlyIncome * 0.36;
var maxMortgagePayment = maxTotalDebtPayment – monthlyDebtPayments;
if (maxMortgagePayment 0 && numberOfPayments > 0) {
// Rearranging the formula to solve for P:
// P = M * [ (1 + i)^n – 1] / [ i(1 + i)^n ]
maxLoanAmount = maxMortgagePayment * (Math.pow(1 + monthlyInterestRate, numberOfPayments) – 1) / (monthlyInterestRate * Math.pow(1 + monthlyInterestRate, numberOfPayments));
} else if (monthlyInterestRate === 0 && numberOfPayments > 0) {
// Special case for 0 interest rate
maxLoanAmount = maxMortgagePayment * numberOfPayments;
}
var estimatedHomePrice = maxLoanAmount + downPayment;
resultDiv.innerHTML = "