Determine your maximum home purchasing power based on income, debt, and current interest rates.
$
$
$
%
Years
%
Please enter valid numbers for income and interest rate.
Maximum Home Price
$0
Max Monthly Payment
$0
Loan Amount
$0
Est. Monthly Tax
$0
Debt-to-Income Used
0%
Understanding Your Mortgage Affordability
Before beginning your home search, it is crucial to understand exactly how much "house" you can realistically afford. This calculator uses the standard debt-to-income (DTI) ratios employed by most lenders to determine your maximum purchasing power.
How Lenders Calculate Affordability
Lenders primarily look at two ratios when deciding how much to lend you:
Front-End Ratio (28%): This rule suggests that your housing costs (mortgage principal, interest, taxes, and insurance) should not exceed 28% of your gross monthly income.
Back-End Ratio (36%): This rule states that your total monthly debt payments (housing costs + credit cards + student loans + car loans) should not exceed 36% of your gross monthly income.
This calculator determines the maximum monthly payment allowed under both rules and uses the lower (more conservative) figure to calculate your home budget.
Factors That Impact Your Budget
Several variables can significantly alter your buying power:
Interest Rates: Even a small increase in interest rates can reduce your purchasing power by tens of thousands of dollars, as more of your monthly payment goes toward interest rather than the loan principal.
Property Taxes: High property tax areas reduce the amount of mortgage you can carry, as lenders factor these taxes into your monthly liability.
Down Payment: A larger down payment not only reduces the loan amount but also immediately increases the price of the home you can buy dollar-for-dollar.
Note: This tool provides an estimate. For a pre-approval, please contact a licensed mortgage lender who can review your full credit profile and financial history.
function calculateAffordability() {
// 1. Get Inputs
var grossIncome = parseFloat(document.getElementById('afford_grossIncome').value);
var monthlyDebt = parseFloat(document.getElementById('afford_monthlyDebt').value);
var downPayment = parseFloat(document.getElementById('afford_downPayment').value);
var interestRate = parseFloat(document.getElementById('afford_interestRate').value);
var loanTerm = parseFloat(document.getElementById('afford_loanTerm').value);
var taxRate = parseFloat(document.getElementById('afford_taxRate').value);
// 2. Validation
var errorDiv = document.getElementById('affordError');
var resultDiv = document.getElementById('affordResult');
if (isNaN(grossIncome) || isNaN(interestRate) || grossIncome <= 0) {
errorDiv.style.display = 'block';
resultDiv.style.display = 'none';
return;
} else {
errorDiv.style.display = 'none';
}
// Handle optional empty fields as 0
if (isNaN(monthlyDebt)) monthlyDebt = 0;
if (isNaN(downPayment)) downPayment = 0;
if (isNaN(taxRate)) taxRate = 0;
if (isNaN(loanTerm)) loanTerm = 30;
// 3. Calculation Logic
// Monthly Income
var monthlyIncome = grossIncome / 12;
// DTI Limits
// Front-end: 28% of income for housing
var maxHousingFront = monthlyIncome * 0.28;
// Back-end: 36% of income for total debt, subtract existing debt
var maxTotalBack = monthlyIncome * 0.36;
var maxHousingBack = maxTotalBack – monthlyDebt;
// The limiting factor is the lower of the two
var maxMonthlyTotalAllowed = Math.min(maxHousingFront, maxHousingBack);
// Determine which DTI was the bottleneck
var dtiType = (maxHousingFront < maxHousingBack) ? "Front-End (28%)" : "Back-End (36%)";
if (maxMonthlyTotalAllowed <= 0) {
// Can't afford anything
displayResults(0, 0, 0, 0, dtiType);
resultDiv.style.display = 'block';
return;
}
// We need to reverse engineer the Home Price (H) from the Max Monthly Payment.
// Formula components:
// P (Principal) = H – DownPayment
// Monthly Payment M = P * Factor + (H * TaxRateMonthly) + (H * InsuranceRateMonthly)
// Insurance Estimation: Approx 0.5% yearly (0.005 / 12 monthly)
var insuranceRateYearly = 0.005;
var r = (interestRate / 100) / 12;
var n = loanTerm * 12;
// Mortgage Factor: (r(1+r)^n) / ((1+r)^n – 1)
var mortgageFactor = 0;
if (interestRate === 0) {
mortgageFactor = 1 / n;
} else {
mortgageFactor = (r * Math.pow(1 + r, n)) / (Math.pow(1 + r, n) – 1);
}
var monthlyTaxRate = (taxRate / 100) / 12;
var monthlyInsRate = insuranceRateYearly / 12;
// Algebra to solve for H (Home Price):
// MaxPayment = (H – Down) * mortgageFactor + H * monthlyTaxRate + H * monthlyInsRate
// MaxPayment = H(mortgageFactor) – Down(mortgageFactor) + H(monthlyTaxRate) + H(monthlyInsRate)
// MaxPayment + Down(mortgageFactor) = H (mortgageFactor + monthlyTaxRate + monthlyInsRate)
// H = (MaxPayment + Down * mortgageFactor) / (mortgageFactor + monthlyTaxRate + monthlyInsRate)
var numerator = maxMonthlyTotalAllowed + (downPayment * mortgageFactor);
var denominator = mortgageFactor + monthlyTaxRate + monthlyInsRate;
var maxHomePrice = numerator / denominator;
// Sanity check: Home price cannot be less than down payment (implies negative loan)
if (maxHomePrice < downPayment) {
maxHomePrice = downPayment;
// If we can only afford down payment, it means we can't service a loan.
}
var loanAmount = maxHomePrice – downPayment;
var calcMonthlyTax = maxHomePrice * monthlyTaxRate;
var calcMonthlyPI = loanAmount * mortgageFactor;
// 4. Update UI
displayResults(maxHomePrice, maxMonthlyTotalAllowed, loanAmount, calcMonthlyTax, dtiType);
resultDiv.style.display = 'block';
}
function displayResults(homePrice, monthlyPay, loanAmt, tax, dti) {
document.getElementById('result_homePrice').innerText = formatCurrency(homePrice);
document.getElementById('result_monthlyPayment').innerText = formatCurrency(monthlyPay);
document.getElementById('result_loanAmount').innerText = formatCurrency(loanAmt);
document.getElementById('result_monthlyTax').innerText = formatCurrency(tax);
document.getElementById('result_dtiUsed').innerText = dti;
}
function formatCurrency(num) {
return new Intl.NumberFormat('en-US', {
style: 'currency',
currency: 'USD',
maximumFractionDigits: 0
}).format(num);
}