Please enter valid positive numbers for Income and Interest Rate.
Maximum Home Price You Can Afford
$0
$0
Max Monthly Payment
$0
Loan Amount
0%
DTI Ratio Used
How Much House Can I Afford?
Determining "how much house can I afford" is the first critical step in the home buying journey. This Mortgage Affordability Calculator uses the standard debt-to-income (DTI) ratios utilized by most lenders to provide a realistic estimate of your purchasing power.
Understanding the 28/36 Rule
Most financial advisors and mortgage lenders rely on the 28/36 rule to determine affordability:
Front-End Ratio (28%): Your monthly housing costs (principal, interest, taxes, and insurance) should not exceed 28% of your gross monthly income.
Back-End Ratio (36%): Your total monthly debt payments (housing costs plus credit cards, student loans, car payments, etc.) should not exceed 36% of your gross monthly income.
This calculator evaluates both ratios based on your inputs and uses the lower limit to ensure you don't overstretch your budget.
Factors That Impact Your Affordability
Several variables can significantly change the price of the home you can buy:
Interest Rates: Even a 1% increase in interest rates can reduce your buying power by tens of thousands of dollars because more of your monthly payment goes toward interest rather than principal.
Down Payment: A larger down payment reduces the loan amount required, allowing you to purchase a more expensive home for the same monthly payment. It may also help you avoid Private Mortgage Insurance (PMI).
Existing Debt: High monthly debt obligations reduce your "back-end" ratio allowance, directly lowering the amount available for a mortgage payment.
Loan Term: A 30-year term generally allows for a higher home price compared to a 15-year term because the payments are spread out over a longer period, though you will pay more interest in total.
Why Use an Affordability Calculator?
Using a calculator helps set realistic expectations before you start viewing properties. It prevents the heartbreak of falling in love with a home that is financially out of reach and helps you understand which financial levers (like saving for a larger down payment or paying off a car loan) will have the biggest impact on your budget.
function calculateMortgageAffordability() {
// 1. Get Input Values
var incomeInput = document.getElementById('mac-income').value;
var debtsInput = document.getElementById('mac-debts').value;
var downPaymentInput = document.getElementById('mac-downpayment').value;
var interestInput = document.getElementById('mac-interest').value;
var termInput = document.getElementById('mac-term').value;
var taxInsInput = document.getElementById('mac-tax-insurance').value;
// 2. Validate Inputs
var annualIncome = parseFloat(incomeInput);
var monthlyDebts = parseFloat(debtsInput);
var downPayment = parseFloat(downPaymentInput);
var interestRate = parseFloat(interestInput);
var loanTermYears = parseFloat(termInput);
var monthlyTaxIns = parseFloat(taxInsInput);
// Handle empty or invalid inputs
if (isNaN(annualIncome) || annualIncome <= 0 || isNaN(interestRate) || interestRate < 0) {
document.getElementById('mac-error-msg').style.display = 'block';
document.getElementById('mac-result-section').style.display = 'none';
return;
} else {
document.getElementById('mac-error-msg').style.display = 'none';
}
if (isNaN(monthlyDebts)) monthlyDebts = 0;
if (isNaN(downPayment)) downPayment = 0;
if (isNaN(monthlyTaxIns)) monthlyTaxIns = 0;
// 3. Calculation Logic (Standard 28/36 Rule)
var monthlyGrossIncome = annualIncome / 12;
// Front-End Ratio Limit (Housing only) – typically 28%
var maxHousingFront = monthlyGrossIncome * 0.28;
// Back-End Ratio Limit (Total Debt) – typically 36%
var maxTotalBack = monthlyGrossIncome * 0.36;
var maxHousingBack = maxTotalBack – monthlyDebts;
// The allowable housing payment is the lesser of the two
var maxAllowableHousingPayment = Math.min(maxHousingFront, maxHousingBack);
// Determine which ratio was the limiting factor for display purposes
var limitingRatio = (maxHousingFront 0) {
// Calculate Max Loan Amount using PV formula
// PV = PMT * [ (1 – (1+r)^-n) / r ]
var monthlyRate = (interestRate / 100) / 12;
var numberOfPayments = loanTermYears * 12;
if (monthlyRate === 0) {
maxLoanAmount = maxPIPayment * numberOfPayments;
} else {
maxLoanAmount = maxPIPayment * ( (1 – Math.pow(1 + monthlyRate, -numberOfPayments)) / monthlyRate );
}
maxHomePrice = maxLoanAmount + downPayment;
} else {
maxHomePrice = 0;
maxLoanAmount = 0;
maxAllowableHousingPayment = 0; // If debts are too high, they can't afford anything
}
// 4. Update UI
// Format Currency Function
var formatCurrency = function(num) {
return new Intl.NumberFormat('en-US', { style: 'currency', currency: 'USD', maximumFractionDigits: 0 }).format(num);
};
document.getElementById('mac-result-price').innerText = formatCurrency(maxHomePrice);
document.getElementById('mac-monthly-payment').innerText = formatCurrency(maxAllowableHousingPayment);
document.getElementById('mac-loan-amount').innerText = formatCurrency(maxLoanAmount);
document.getElementById('mac-dti-used').innerText = limitingRatio;
// Show results
document.getElementById('mac-result-section').style.display = 'block';
}