Mortgage Affordability Calculator
Understanding how much mortgage you can afford is a crucial first step when looking to buy a home. This calculator helps you estimate your maximum affordable loan amount based on your income, debts, and desired monthly payment.
How Mortgage Affordability is Calculated
Lenders typically use two main ratios to determine how much mortgage you can afford: the front-end ratio (housing ratio) and the back-end ratio (debt-to-income ratio). While specific percentages vary by lender and loan type, common guidelines are:
- Front-End Ratio (Housing Ratio): This ratio compares your potential PITI (Principal, Interest, Taxes, and Insurance) payment to your gross monthly income. A common target is not to exceed 28% of your gross monthly income on housing costs.
- Back-End Ratio (Debt-to-Income Ratio): This ratio compares your total monthly debt obligations (including the proposed mortgage payment, credit cards, car loans, student loans, etc.) to your gross monthly income. A common target is not to exceed 36% to 43% of your gross monthly income.
This calculator focuses on estimating the maximum loan amount by considering your income, existing debts, and the potential monthly payment of a mortgage. The calculation assumes that your total housing costs (PITI) should not exceed a certain percentage of your gross monthly income, and your total debt obligations (including the new mortgage) should also stay within acceptable limits.
Key factors influencing affordability:
- Income: Higher income generally means higher affordability.
- Existing Debts: High existing debt payments reduce the amount available for a mortgage.
- Down Payment: A larger down payment reduces the loan amount needed, increasing affordability for a given home price.
- Interest Rate: A lower interest rate significantly reduces your monthly payments, allowing you to borrow more.
- Loan Term: Longer loan terms result in lower monthly payments but more interest paid over time.
- Property Taxes and Homeowner's Insurance: These are crucial components of your monthly housing cost (PITI) and must be factored in. For simplicity, this calculator focuses on the loan principal and interest and assumes these other costs would be added. Lenders will require estimates for these.
Disclaimer: This calculator provides an estimate only and does not constitute a loan approval or guarantee. Consult with a mortgage lender for personalized advice.
function calculateAffordability() { var annualIncome = parseFloat(document.getElementById("annualIncome").value); var monthlyDebt = parseFloat(document.getElementById("monthlyDebt").value); var downPayment = parseFloat(document.getElementById("downPayment").value); var interestRate = parseFloat(document.getElementById("interestRate").value); var loanTerm = parseFloat(document.getElementById("loanTerm").value); var resultDiv = document.getElementById("result"); resultDiv.innerHTML = ""; // Clear previous results if (isNaN(annualIncome) || annualIncome <= 0 || isNaN(monthlyDebt) || monthlyDebt < 0 || isNaN(downPayment) || downPayment < 0 || isNaN(interestRate) || interestRate <= 0 || isNaN(loanTerm) || loanTerm <= 0) { resultDiv.innerHTML = "Please enter valid positive numbers for all fields."; return; } var grossMonthlyIncome = annualIncome / 12; var maxHousingRatio = 0.28; // Common front-end ratio var maxDebtRatio = 0.36; // Common back-end ratio // Calculate maximum PITI based on housing ratio var maxPITI_housing = grossMonthlyIncome * maxHousingRatio; // Calculate maximum total debt based on debt ratio var maxTotalDebt = grossMonthlyIncome * maxDebtRatio; // Maximum allowed monthly mortgage payment (P&I only) // This is tricky as PITI includes taxes and insurance. We'll estimate P&I // by assuming a portion of maxPITI is for taxes/insurance, or we can derive // from maxTotalDebt. Let's use the more conservative approach based on maxTotalDebt. var maxMonthlyMortgagePayment = maxTotalDebt – monthlyDebt; if (maxMonthlyMortgagePayment 0 && numberOfPayments > 0) { var factor = Math.pow(1 + monthlyInterestRate, numberOfPayments); maxLoanAmount = maxMonthlyMortgagePayment * (factor – 1) / (monthlyInterestRate * factor); } else if (monthlyInterestRate === 0) { // Handle case of 0 interest rate (though unlikely for mortgages) maxLoanAmount = maxMonthlyMortgagePayment * numberOfPayments; } // The maximum loan amount is what we can borrow. // The total affordable home price would be maxLoanAmount + downPayment. var affordableHomePrice = maxLoanAmount + downPayment; // Display results resultDiv.innerHTML = "Estimated maximum affordable home price: $" + affordableHomePrice.toFixed(2) + "" + "Estimated maximum loan amount: $" + maxLoanAmount.toFixed(2) + "" + "(Assumes a back-end DTI ratio of " + (maxDebtRatio * 100) + "% and does NOT include property taxes, homeowner's insurance, or HOA fees in the monthly payment calculation.)"; }