How Much House Can I Afford? (Mortgage Affordability Calculator)
Determining "how much house can I afford" is the crucial first step in the home buying process. This mortgage affordability calculator estimates your maximum purchase price based on key financial factors like your income, existing debt obligations, potential down payment, and current mortgage interest rates.
Understanding the Affordability Factors
Lenders primarily look at your Debt-to-Income (DTI) ratio to determine affordability. This calculator uses a standard 36% "back-end" DTI ratio constraint. This means your prospective total monthly debt payments (including the new mortgage principal, interest, estimated taxes, insurance, plus your current existing debt payments like car loans or student debt) should generally not exceed 36% of your gross monthly income.
Gross Annual Income: Your total income before taxes.
Monthly Debt Payments: The minimum payments on credit cards, car loans, student loans, etc. (excluding current rent).
Down Payment: The cash you have available to put towards the home purchase immediately. A larger down payment reduces loan size and increases affordability.
Interest Rate & Term: Lower rates and longer terms typically increase your purchasing power.
Note: This tool estimates property taxes and insurance as approximately 20% of your total monthly housing payment for calculation purposes. Actual amounts vary significantly by location.
Affordability Calculator
30 Years
20 Years
15 Years
10 Years
Estimated Maximum Home Price:
Based on a maximum total monthly mortgage payment (PITI) of approximately:
function calculateAffordability() {
// Get inputs
var annualIncomeStr = document.getElementById('macIncome').value;
var monthlyDebtStr = document.getElementById('macMonthlyDebt').value;
var downPaymentStr = document.getElementById('macDownPayment').value;
var interestRateStr = document.getElementById('macInterestRate').value;
var loanTermYearsStr = document.getElementById('macLoanTerm').value;
// Validate and parse inputs
var annualIncome = parseFloat(annualIncomeStr);
var monthlyDebt = parseFloat(monthlyDebtStr);
var downPayment = parseFloat(downPaymentStr);
var interestRateAnnual = parseFloat(interestRateStr);
var loanTermYears = parseInt(loanTermYearsStr);
var resultDiv = document.getElementById('macResult');
var maxPriceSpan = document.getElementById('macMaxPrice');
var maxMonthlySpan = document.getElementById('macMaxMonthly');
if (isNaN(annualIncome) || annualIncome <= 0 || isNaN(interestRateAnnual) || interestRateAnnual <= 0) {
alert("Please enter valid annual income and interest rate values.");
return;
}
monthlyDebt = isNaN(monthlyDebt) ? 0 : monthlyDebt;
downPayment = isNaN(downPayment) ? 0 : downPayment;
// Calculation Logic based on 36% Back-End DTI
var monthlyGrossIncome = annualIncome / 12;
// Max allowed total debt spending (36% rule)
var maxTotalMonthlyDebtAllowed = monthlyGrossIncome * 0.36;
// Max allowed for housing expenses (PITI) after paying existing debts
var maxAffordablePITI = maxTotalMonthlyDebtAllowed – monthlyDebt;
if (maxAffordablePITI <= 0) {
resultDiv.style.display = "block";
maxPriceSpan.innerHTML = "$0";
maxMonthlySpan.innerHTML = "$0 (Debt levels too high relative to income)";
return;
}
// Estimate P&I portion. We assume Taxes & Insurance are roughly 20% of the total PITI,
// leaving 80% for Principal & Interest.
var estimatedAvailablePI = maxAffordablePITI * 0.80;
// Mortgage Math to find Max Loan Amount from Max PI
var monthlyInterestRate = (interestRateAnnual / 100) / 12;
var totalLoanMonths = loanTermYears * 12;
// Formula: LoanAmount = PI * [ ( (1+r)^n ) – 1 ] / [ r * (1+r)^n ]
var maxLoanAmount = estimatedAvailablePI * ((Math.pow(1 + monthlyInterestRate, totalLoanMonths) – 1) / (monthlyInterestRate * Math.pow(1 + monthlyInterestRate, totalLoanMonths)));
var maxHomePrice = maxLoanAmount + downPayment;
// Format Output
var formatter = new Intl.NumberFormat('en-US', {
style: 'currency',
currency: 'USD',
minimumFractionDigits: 0,
maximumFractionDigits: 0,
});
maxPriceSpan.innerHTML = formatter.format(maxHomePrice);
maxMonthlySpan.innerHTML = formatter.format(maxAffordablePITI);
resultDiv.style.display = "block";
}