Understanding how much you can afford to borrow for a mortgage is a crucial first step in the home-buying process. This mortgage affordability calculator helps you estimate the maximum loan amount you might qualify for based on your income, debts, and estimated interest rates.
Key Factors Affecting Affordability:
Gross Monthly Income: This is your income before taxes and other deductions. Lenders look at your total income to assess your repayment capacity.
Existing Monthly Debt Payments: This includes payments for credit cards, auto loans, student loans, personal loans, and any other recurring debts. These obligations reduce the amount of income available for a mortgage payment.
Estimated Interest Rate: The interest rate significantly impacts your monthly payment and the total amount of interest you'll pay over the life of the loan. Higher rates mean lower affordability for the same monthly payment.
Loan Term: This is the duration of the mortgage, typically 15 or 30 years. Shorter terms have higher monthly payments but result in less interest paid overall.
Down Payment: The amount of cash you pay upfront for the home. A larger down payment reduces the loan amount needed, thus increasing affordability.
Property Taxes and Homeowners Insurance: Lenders usually factor these into your total monthly housing cost (often referred to as PITI – Principal, Interest, Taxes, and Insurance). While this calculator focuses on loan principal and interest, remember these are essential costs.
Private Mortgage Insurance (PMI): If your down payment is less than 20%, you'll likely need to pay PMI, which adds to your monthly cost.
This calculator provides an estimate. Lenders will perform their own detailed underwriting, considering your credit score, debt-to-income ratio, employment history, and other financial factors. It's always recommended to speak with a mortgage professional for a precise pre-approval.
Mortgage Affordability Calculator
15 Years
30 Years
This is a guideline; lenders use more complex DTI ratios.
function calculateAffordability() {
var grossMonthlyIncome = parseFloat(document.getElementById("grossMonthlyIncome").value);
var existingMonthlyDebt = parseFloat(document.getElementById("existingMonthlyDebt").value);
var interestRate = parseFloat(document.getElementById("interestRate").value);
var loanTermYears = parseInt(document.getElementById("loanTermYears").value);
var downPayment = parseFloat(document.getElementById("downPayment").value);
var maxMonthlyPaymentRatio = parseFloat(document.getElementById("maxMonthlyPaymentRatio").value);
var resultDiv = document.getElementById("result");
resultDiv.innerHTML = ""; // Clear previous results
if (isNaN(grossMonthlyIncome) || grossMonthlyIncome <= 0 ||
isNaN(existingMonthlyDebt) || existingMonthlyDebt < 0 ||
isNaN(interestRate) || interestRate <= 0 ||
isNaN(loanTermYears) || loanTermYears <= 0 ||
isNaN(downPayment) || downPayment < 0 ||
isNaN(maxMonthlyPaymentRatio) || maxMonthlyPaymentRatio 0) {
// Formula for maximum loan amount based on a desired monthly payment (M)
// M = P [ i(1 + i)^n ] / [ (1 + i)^n – 1]
// Where:
// M = Monthly Payment (maxPrincipalInterestPayment)
// P = Principal Loan Amount (what we want to find)
// i = monthly interest rate
// n = number of payments
// Rearranging the formula to solve for P:
// P = M [ (1 + i)^n – 1] / [ i(1 + i)^n ]
var numerator = Math.pow(1 + monthlyInterestRate, numberOfPayments) – 1;
var denominator = monthlyInterestRate * Math.pow(1 + monthlyInterestRate, numberOfPayments);
if (denominator > 0) {
maxLoanAmount = maxPrincipalInterestPayment * (numerator / denominator);
} else {
// This case is unlikely with valid inputs but good for robustness
maxLoanAmount = 0;
}
} else {
// If interest rate is 0%
maxLoanAmount = maxPrincipalInterestPayment * numberOfPayments;
}
// Ensure loan amount is not negative (e.g., if maxPrincipalInterestPayment is 0 or less)
if (maxLoanAmount < 0) {
maxLoanAmount = 0;
}
var estimatedMaxHomePrice = maxLoanAmount + downPayment;
resultDiv.innerHTML = `
Based on your inputs:
Maximum estimated monthly Principal & Interest payment: $${maxPrincipalInterestPayment.toFixed(2)}
Estimated maximum loan amount you could afford: $${maxLoanAmount.toFixed(2)}
Estimated maximum home price (Loan + Down Payment): $${estimatedMaxHomePrice.toFixed(2)}