Determine how much house you can afford based on your income, debts, and current interest rates.
30 Years
20 Years
15 Years
10 Years
Conservative (28% / 36%)
Aggressive (36% / 43%)
Please enter valid numbers for income and interest rate.
Maximum Home Price
–
Maximum Loan Amount:–
Monthly Principal & Interest:–
Est. Monthly Taxes:–
Est. Monthly Insurance:–
Total Monthly Payment (PITI):–
Understanding Your Mortgage Affordability
Before beginning your home search, it is crucial to understand specifically how much house you can afford. This calculator uses standard Debt-to-Income (DTI) ratios utilized by lenders to estimate your borrowing power.
How Lenders Calculate Affordability
Lenders typically look at two specific ratios to determine eligibility:
Front-End Ratio: The percentage of your gross annual income that goes towards housing costs (Principal, Interest, Taxes, and Insurance). In a conservative estimate, this should not exceed 28%.
Back-End Ratio: The percentage of your gross income that goes towards housing costs plus all other recurring monthly debts (student loans, credit cards, car payments). This typically caps at 36% for conventional loans, though FHA loans may allow up to 43% or higher.
The 28/36 Rule
The "Conservative" setting on this calculator applies the classic 28/36 rule. This means your mortgage payment shouldn't be more than 28% of your pre-tax income, and your total debt payments shouldn't exceed 36%. Sticking to these limits helps ensure you don't become "house poor," leaving room in your budget for maintenance, savings, and emergencies.
Factors That Lower Affordability
Even with a high income, your purchasing power can be significantly reduced by:
High Interest Rates: A 1% increase in rates can reduce your buying power by approximately 10%.
Significant Monthly Debt: Every $500 in monthly car or credit card payments reduces your mortgage qualification amount by roughly $70,000 to $80,000 (depending on rates).
Property Taxes: Buying in an area with high tax rates (e.g., 2.5% vs 1.0%) will drastically lower the maximum loan amount you qualify for.
How to Improve Your Affordability
If the result above is lower than home prices in your target area, consider paying down existing monthly debts to lower your DTI ratio, saving for a larger down payment to reduce the loan principal, or shopping for lower insurance rates.
function calculateAffordability() {
// 1. Get Input Values
var annualIncome = parseFloat(document.getElementById("annualIncome").value);
var monthlyDebts = parseFloat(document.getElementById("monthlyDebts").value);
var downPayment = parseFloat(document.getElementById("downPayment").value);
var interestRate = parseFloat(document.getElementById("interestRate").value);
var loanTerm = parseInt(document.getElementById("loanTerm").value);
var taxRate = parseFloat(document.getElementById("propertyTaxRate").value);
var homeInsuranceYearly = parseFloat(document.getElementById("homeInsurance").value);
var dtiSetting = document.getElementById("dtiLimit").value;
// 2. Validate Inputs
if (isNaN(annualIncome) || isNaN(interestRate) || annualIncome <= 0) {
document.getElementById("errorMsg").style.display = "block";
document.getElementById("resultsArea").style.display = "none";
return;
}
// Handle optional inputs defaulting to 0 if empty
if (isNaN(monthlyDebts)) monthlyDebts = 0;
if (isNaN(downPayment)) downPayment = 0;
if (isNaN(taxRate)) taxRate = 0;
if (isNaN(homeInsuranceYearly)) homeInsuranceYearly = 0;
document.getElementById("errorMsg").style.display = "none";
// 3. Set Ratios based on Strictness
var frontEndRatio = 0.28;
var backEndRatio = 0.36;
if (dtiSetting === "aggressive") {
frontEndRatio = 0.36;
backEndRatio = 0.43;
}
// 4. Calculate Max Allowable Monthly Payments
var monthlyGrossIncome = annualIncome / 12;
// Limit 1: Based on Housing Ratio (Front-End)
var maxHousingPaymentFront = monthlyGrossIncome * frontEndRatio;
// Limit 2: Based on Total Debt Ratio (Back-End)
// Max Total Allowed Debt – Existing Debts = Max Remaining for Housing
var maxTotalDebtPayment = monthlyGrossIncome * backEndRatio;
var maxHousingPaymentBack = maxTotalDebtPayment – monthlyDebts;
// The actual limit is the LOWER of the two
var maxAllowedPITI = Math.min(maxHousingPaymentFront, maxHousingPaymentBack);
if (maxAllowedPITI <= 0) {
// User has too much debt to afford any house
displayZeroResults();
return;
}
// 5. Reverse Engineering the Loan Amount
// PITI = (Loan * M) + (HomePrice * TaxRate/12) + (Insurance/12)
// Note: Property tax is based on Home Price, not Loan Amount.
// Home Price = Loan + Down Payment.
// Therefore: Taxes = (Loan + Down Payment) * (TaxRate/100) / 12
var monthlyTaxRateDecimal = (taxRate / 100) / 12;
var monthlyInsurance = homeInsuranceYearly / 12;
// Subtract fixed insurance cost first
var availableForPrincipalInterestAndTax = maxAllowedPITI – monthlyInsurance;
// Mortgage Constant (M) for P&I
var monthlyInterestRate = (interestRate / 100) / 12;
var numberOfPayments = loanTerm * 12;
// Amortization Factor: (r(1+r)^n) / ((1+r)^n – 1)
var mortgageFactor = 0;
if (monthlyInterestRate === 0) {
mortgageFactor = 1 / numberOfPayments;
} else {
mortgageFactor = (monthlyInterestRate * Math.pow(1 + monthlyInterestRate, numberOfPayments)) / (Math.pow(1 + monthlyInterestRate, numberOfPayments) – 1);
}
// Formula derivation:
// Available = (Loan * Factor) + ((Loan + Down) * MonthlyTaxRate)
// Available = (Loan * Factor) + (Loan * MonthlyTaxRate) + (Down * MonthlyTaxRate)
// Available – (Down * MonthlyTaxRate) = Loan * (Factor + MonthlyTaxRate)
// Loan = (Available – (Down * MonthlyTaxRate)) / (Factor + MonthlyTaxRate)
var taxOnDownPayment = downPayment * monthlyTaxRateDecimal;
var numerator = availableForPrincipalInterestAndTax – taxOnDownPayment;
var denominator = mortgageFactor + monthlyTaxRateDecimal;
var maxLoanAmount = numerator / denominator;
// Edge case: if max loan is negative (taxes on down payment exceed allowance)
if (maxLoanAmount < 0) maxLoanAmount = 0;
var maxHomePrice = maxLoanAmount + downPayment;
// 6. Calculate breakdown values based on the derived Max Home Price
var finalMonthlyTax = maxHomePrice * monthlyTaxRateDecimal;
var finalMonthlyPI = maxLoanAmount * mortgageFactor;
var totalMonthlyPayment = finalMonthlyPI + finalMonthlyTax + monthlyInsurance;
// 7. Format and Display Results
displayResults(maxHomePrice, maxLoanAmount, finalMonthlyPI, finalMonthlyTax, monthlyInsurance, totalMonthlyPayment);
}
function displayResults(homePrice, loanAmount, pi, tax, ins, total) {
var resultsDiv = document.getElementById("resultsArea");
document.getElementById("maxHomePrice").innerText = formatCurrency(homePrice);
document.getElementById("maxLoanAmount").innerText = formatCurrency(loanAmount);
document.getElementById("monthlyPI").innerText = formatCurrency(pi);
document.getElementById("monthlyTax").innerText = formatCurrency(tax);
document.getElementById("monthlyIns").innerText = formatCurrency(ins);
document.getElementById("totalMonthly").innerText = formatCurrency(total);
resultsDiv.style.display = "block";
// Scroll to results
resultsDiv.scrollIntoView({behavior: 'smooth'});
}
function displayZeroResults() {
var resultsDiv = document.getElementById("resultsArea");
resultsDiv.style.display = "block";
document.getElementById("maxHomePrice").innerText = "$0";
document.getElementById("maxLoanAmount").innerText = "$0";
document.getElementById("monthlyPI").innerText = "$0";
document.getElementById("monthlyTax").innerText = "$0";
document.getElementById("monthlyIns").innerText = "$0";
document.getElementById("totalMonthly").innerText = "$0";
alert("Based on the provided debts and income, you do not qualify for a mortgage under these ratios.");
}
function formatCurrency(num) {
return new Intl.NumberFormat('en-US', { style: 'currency', currency: 'USD', maximumFractionDigits: 0 }).format(num);
}