Understanding how much you can afford for a mortgage is a crucial first step in the home-buying process. This calculator helps you estimate your maximum affordable mortgage amount based on your income, debts, and desired monthly payment. It takes into account common lending ratios and interest rates to provide a realistic picture.
Key Factors:
Gross Monthly Income: This is your income before taxes and other deductions. Lenders use this figure to assess your ability to make payments.
Existing Monthly Debt Payments: Include all recurring monthly obligations like car loans, student loans, credit card minimum payments, and any alimony or child support.
Desired Monthly Mortgage Payment: This is the maximum amount you are comfortable paying each month for your mortgage. This should ideally include principal, interest, taxes, and insurance (PITI).
Estimated Interest Rate: Mortgage interest rates fluctuate. Using a realistic estimated rate is vital for an accurate calculation.
Loan Term: The length of the mortgage, typically 15 or 30 years.
By inputting these details, the calculator will provide an estimated maximum mortgage amount you might qualify for and the resulting monthly principal and interest payment. Remember, this is an estimate, and your actual loan approval will depend on a lender's full underwriting process, including your credit score, down payment, and other financial factors.
Mortgage Affordability Calculator
15 Years
30 Years
function calculateMortgageAffordability() {
var grossIncome = parseFloat(document.getElementById("grossIncome").value);
var existingDebt = parseFloat(document.getElementById("existingDebt").value);
var desiredPayment = parseFloat(document.getElementById("desiredPayment").value);
var interestRate = parseFloat(document.getElementById("interestRate").value);
var loanTerm = parseInt(document.getElementById("loanTerm").value);
var resultDiv = document.getElementById("result");
resultDiv.innerHTML = ""; // Clear previous results
if (isNaN(grossIncome) || isNaN(existingDebt) || isNaN(desiredPayment) || isNaN(interestRate) || isNaN(loanTerm)) {
resultDiv.innerHTML = "Please enter valid numbers for all fields.";
return;
}
// Common lending ratios – these are general guidelines and can vary by lender
var maxTotalDebtRatio = 0.43; // 43% of gross income for total debt (including proposed mortgage)
var maxHousingRatio = 0.28; // 28% of gross income for housing costs (PITI)
// 1. Calculate maximum affordable monthly payment based on total debt ratio
var maxTotalMonthlyPaymentAllowed = grossIncome * maxTotalDebtRatio;
var maxMortgagePaymentBasedOnTotalDebt = maxTotalMonthlyPaymentAllowed – existingDebt;
// 2. Calculate maximum affordable monthly payment based on housing ratio
var maxHousingPaymentAllowed = grossIncome * maxHousingRatio;
// The actual desired monthly mortgage payment cannot exceed either limit
var actualMaxDesiredPayment = Math.min(desiredPayment, maxMortgagePaymentBasedOnTotalDebt, maxHousingPaymentAllowed);
if (actualMaxDesiredPayment 0 && numberOfPayments > 0) {
maxLoanAmount = actualMaxDesiredPayment * (1 – Math.pow(1 + monthlyRate, -numberOfPayments)) / monthlyRate;
} else if (actualMaxDesiredPayment > 0 && numberOfPayments > 0) { // 0% interest case
maxLoanAmount = actualMaxDesiredPayment * numberOfPayments;
}
if (isNaN(maxLoanAmount) || maxLoanAmount 0 && numberOfPayments > 0) {
calculatedPI = maxLoanAmount * (monthlyRate * Math.pow(1 + monthlyRate, numberOfPayments)) / (Math.pow(1 + monthlyRate, numberOfPayments) – 1);
} else if (actualMaxDesiredPayment > 0 && numberOfPayments > 0) { // 0% interest case
calculatedPI = actualMaxDesiredPayment;
}
resultDiv.innerHTML =
"
Estimated Affordability:
" +
"Maximum Affordable Loan Amount: $" + maxLoanAmount.toFixed(2) + "" +
"Estimated Monthly P&I Payment for this amount: $" + calculatedPI.toFixed(2) + "" +
"Note: This is an estimate. Actual loan approval depends on lender's criteria, credit score, down payment, and other factors. This calculation assumes the 'Desired Monthly Mortgage Payment' refers to Principal & Interest (P&I) only. If it includes taxes and insurance (PITI), adjust the 'Desired Monthly Mortgage Payment' input accordingly.";
}