Understanding how much house you can afford is a crucial first step in the home buying process.
Our Mortgage Affordability Calculator is designed to help you estimate your potential mortgage
payment based on your income, debts, and down payment. This tool will give you a clearer picture
of your borrowing capacity and assist you in setting a realistic budget for your dream home.
When calculating mortgage affordability, several key factors come into play:
Gross Monthly Income: This is your total income before taxes and other deductions. Lenders often use your gross income to determine how much you can borrow.
Existing Monthly Debt Payments: This includes all your recurring monthly debt obligations, such as car loans, student loans, credit card payments, and any other loans.
Down Payment: The upfront amount you pay towards the purchase price of the home. A larger down payment can reduce your loan amount and potentially lower your monthly payments.
Estimated Annual Property Taxes: These are taxes levied by local governments on the value of your property.
Estimated Annual Homeowners Insurance: The cost of insuring your home against damage or loss.
Estimated Private Mortgage Insurance (PMI): If your down payment is less than 20% of the home's purchase price, you'll likely need to pay PMI, which protects the lender.
Interest Rate: The annual interest rate on your mortgage loan. This significantly impacts your monthly payment.
Loan Term: The duration of the mortgage, typically 15 or 30 years.
By inputting these details, our calculator provides an estimated maximum monthly mortgage payment
you might be approved for, considering common lending guidelines. Remember, this is an estimate,
and your actual loan approval will depend on a full credit check and lender-specific underwriting.
Mortgage Affordability Calculator
function calculateAffordability() {
var grossMonthlyIncome = parseFloat(document.getElementById("grossMonthlyIncome").value);
var existingMonthlyDebt = parseFloat(document.getElementById("existingMonthlyDebt").value);
var downPayment = parseFloat(document.getElementById("downPayment").value);
var homePrice = parseFloat(document.getElementById("homePrice").value);
var annualPropertyTaxes = parseFloat(document.getElementById("annualPropertyTaxes").value);
var annualHomeownersInsurance = parseFloat(document.getElementById("annualHomeownersInsurance").value);
var annualPMI = parseFloat(document.getElementById("annualPMI").value);
var interestRate = parseFloat(document.getElementById("interestRate").value) / 100;
var loanTerm = parseFloat(document.getElementById("loanTerm").value);
var resultDiv = document.getElementById("result");
resultDiv.innerHTML = ""; // Clear previous results
if (isNaN(grossMonthlyIncome) || isNaN(existingMonthlyDebt) || isNaN(downPayment) ||
isNaN(homePrice) || isNaN(annualPropertyTaxes) || isNaN(annualHomeownersInsurance) ||
isNaN(annualPMI) || isNaN(interestRate) || isNaN(loanTerm) ||
grossMonthlyIncome <= 0 || existingMonthlyDebt < 0 || downPayment < 0 ||
homePrice <= 0 || annualPropertyTaxes < 0 || annualHomeownersInsurance < 0 ||
annualPMI < 0 || interestRate < 0 || loanTerm <= 0) {
resultDiv.innerHTML = "Please enter valid positive numbers for all fields.";
return;
}
// Lender's typical Debt-to-Income (DTI) ratio guideline for total housing costs (PITI) + other debts
// A common guideline is a total DTI of around 43%. We'll assume a maximum housing DTI of 36%.
var maxHousingPaymentRatio = 0.36;
var maxTotalDebtRatio = 0.43;
// Maximum allowed total monthly debt payment
var maxTotalMonthlyDebt = grossMonthlyIncome * maxTotalDebtRatio;
// Maximum allowed monthly housing payment
var maxMonthlyHousingPayment = maxTotalMonthlyDebt – existingMonthlyDebt;
if (maxMonthlyHousingPayment <= 0) {
resultDiv.innerHTML = "Your existing debts may be too high for this income level to afford a mortgage.";
return;
}
// Calculate Loan Amount
var loanAmount = homePrice – downPayment;
if (loanAmount 0) {
monthlyPI = loanAmount * (interestRate / 12) * Math.pow(1 + interestRate / 12, numMonths) / (Math.pow(1 + interestRate / 12, numMonths) – 1);
} else {
monthlyPI = loanAmount / numMonths; // Simple division if interest rate is 0
}
// Calculate estimated total monthly housing payment (PITI)
var estimatedMonthlyPITI = monthlyPI + monthlyPropertyTaxes + monthlyHomeownersInsurance + monthlyPMI;
// Determine affordability based on the calculated max housing payment
var affordableLoanAmount = 0;
var maxAffordableMonthlyPayment = grossMonthlyIncome * maxHousingPaymentRatio – existingMonthlyDebt;
if (maxAffordableMonthlyPayment 0) {
var r = interestRate / 12;
var n = numMonths;
// Rearranging the loan payment formula to solve for P (Principal/Loan Amount)
// P = M * [1 – (1 + r)^-n] / r
affordableLoanAmount = maxAffordableMonthlyPayment * (1 – Math.pow(1 + r, -n)) / r;
// Now, we need to adjust this for the P&I portion of maxAffordableMonthlyPayment
// maxAffordableMonthlyPayment = (P&I) + Taxes + Insurance + PMI
// (P&I) = maxAffordableMonthlyPayment – Taxes – Insurance – PMI
var maxAllowedMonthlyPI = maxAffordableMonthlyPayment – monthlyPropertyTaxes – monthlyHomeownersInsurance – monthlyPMI;
if (maxAllowedMonthlyPI <= 0) {
resultDiv.innerHTML = "Your estimated taxes, insurance, and PMI alone exceed your affordable housing payment.";
return;
}
affordableLoanAmount = maxAllowedMonthlyPI * (1 – Math.pow(1 + r, -n)) / r;
} else {
// If interest rate is 0, the loan amount is simply maxAllowedMonthlyPI * numMonths
var maxAllowedMonthlyPI = maxAffordableMonthlyPayment – monthlyPropertyTaxes – monthlyHomeownersInsurance – monthlyPMI;
if (maxAllowedMonthlyPI <= 0) {
resultDiv.innerHTML = "Your estimated taxes, insurance, and PMI alone exceed your affordable housing payment.";
return;
}
affordableLoanAmount = maxAllowedMonthlyPI * numMonths;
}
var maxAffordableHomePrice = affordableLoanAmount + downPayment;
resultDiv.innerHTML = "Estimated Maximum Affordable Home Price: $" + maxAffordableHomePrice.toFixed(2) + "" +
"Estimated Maximum Loan Amount: $" + affordableLoanAmount.toFixed(2) + "" +
"Estimated Maximum Monthly P&I Payment: $" + (maxAffordableMonthlyPayment – monthlyPropertyTaxes – monthlyHomeownersInsurance – monthlyPMI).toFixed(2) + "" +
"Estimated Maximum Monthly Housing Payment (PITI): $" + maxAffordableMonthlyPayment.toFixed(2) + "";
}