Determining how much house you can afford is a crucial step in the home-buying process. This calculator helps you estimate your potential mortgage affordability based on your income, existing debts, down payment, and the terms of the loan.
Key Factors:
Annual Household Income: This is the total income earned by all borrowers combined before taxes. Lenders use this as a primary indicator of your ability to repay a loan.
Total Monthly Debt Payments: This includes all recurring monthly obligations such as credit card payments, student loans, auto loans, and personal loans. These are often referred to as "debt-to-income" (DTI) obligations.
Down Payment: The upfront amount of cash you pay towards the home purchase. A larger down payment reduces the loan amount needed and can lead to better interest rates and lower monthly payments.
Estimated Interest Rate: This is the annual interest rate you expect to pay on your mortgage. It significantly impacts your monthly payment and the total interest paid over the life of the loan.
Loan Term (Years): The duration over which you will repay the mortgage. Common terms are 15 or 30 years. Shorter terms typically have higher monthly payments but less total interest paid.
How it Works:
This calculator uses a common lending guideline that typically allows for a maximum monthly housing payment (including principal, interest, taxes, and insurance – PITI) of no more than 28% of your gross monthly income, and a total debt-to-income ratio (DTI) of no more than 36%.
It first calculates your maximum allowable monthly housing payment based on the 28% rule (Gross Monthly Income * 0.28).
It subtracts your existing monthly debt payments from this maximum allowable housing payment to determine the maximum monthly mortgage payment you can afford.
Using the loan term and interest rate, it then calculates the maximum loan amount you can take on to have that affordable monthly payment.
Finally, it adds your down payment to this maximum loan amount to estimate the maximum home price you can likely afford.
Disclaimer: This is an estimate and not a loan approval. Actual loan amounts and interest rates will depend on your credit score, lender policies, and current market conditions. It's always recommended to speak with a mortgage professional for personalized advice.
Example:
Let's say your Annual Household Income is $90,000. Your Total Monthly Debt Payments (car loan, student loans) are $600. You have a Down Payment of $30,000. You're looking at an Estimated Interest Rate of 7% and a Loan Term of 30 years.
Your gross monthly income is $90,000 / 12 = $7,500.
Maximum housing payment (28% rule): $7,500 * 0.28 = $2,100.
Maximum affordable mortgage payment: $2,100 – $600 = $1,500.
Using a mortgage formula, a $1,500 monthly payment at 7% interest for 30 years can support a loan of approximately $224,000.
Therefore, your estimated maximum home price would be $224,000 (loan amount) + $30,000 (down payment) = $254,000.
function calculateMortgageAffordability() {
var annualIncome = parseFloat(document.getElementById("annualIncome").value);
var monthlyDebtPayments = parseFloat(document.getElementById("monthlyDebtPayments").value);
var downPayment = parseFloat(document.getElementById("downPayment").value);
var interestRate = parseFloat(document.getElementById("interestRate").value);
var loanTermYears = parseFloat(document.getElementById("loanTermYears").value);
var resultDiv = document.getElementById("result");
resultDiv.innerHTML = ""; // Clear previous results
if (isNaN(annualIncome) || annualIncome <= 0 ||
isNaN(monthlyDebtPayments) || monthlyDebtPayments < 0 ||
isNaN(downPayment) || downPayment < 0 ||
isNaN(interestRate) || interestRate <= 0 ||
isNaN(loanTermYears) || loanTermYears maxAffordableMonthlyHousing) {
maxMonthlyMortgagePayment = maxAffordableMonthlyHousing;
}
// Ensure maxMonthlyMortgagePayment is not negative
if (maxMonthlyMortgagePayment 0 && numberOfPayments > 0) {
// Formula for Present Value of an Annuity: PV = PMT * [1 – (1 + r)^-n] / r
maxLoanAmount = maxMonthlyMortgagePayment * (1 – Math.pow(1 + monthlyInterestRate, -numberOfPayments)) / monthlyInterestRate;
} else if (monthlyInterestRate === 0 && numberOfPayments > 0) {
// If interest rate is 0, loan amount is simply payment * number of payments
maxLoanAmount = maxMonthlyMortgagePayment * numberOfPayments;
}
// Handle cases where calculation results in Infinity or NaN due to extreme inputs
if (!isFinite(maxLoanAmount) || isNaN(maxLoanAmount)) {
maxLoanAmount = 0;
}
var estimatedMaxHomePrice = maxLoanAmount + downPayment;
// Display results
resultDiv.innerHTML += "