Use this calculator to estimate the maximum mortgage amount you can afford based on your income, debts, and desired monthly payment.
Understanding Mortgage Affordability
Determining how much house you can afford is a crucial step in the home-buying process. This calculator helps you estimate your borrowing capacity by considering several key financial factors. It's important to understand what each input represents:
Annual Household Income:
This is your total gross income from all sources within your household before taxes and deductions. Lenders heavily rely on this figure to gauge your ability to repay a loan.
Existing Monthly Debt Payments:
This includes all recurring monthly financial obligations such as car loans, student loans, credit card minimum payments, and any other installment loans. Lenders use your Debt-to-Income (DTI) ratio to assess affordability. A lower DTI generally means you have more disposable income available for a mortgage.
Down Payment Amount:
This is the lump sum of money you plan to pay upfront towards the purchase price of the home. A larger down payment reduces the loan amount needed, which can make your mortgage more affordable and potentially help you avoid Private Mortgage Insurance (PMI).
Estimated Mortgage Interest Rate (%):
This is the annual interest rate you expect to pay on your mortgage. Interest rates fluctuate based on market conditions and your creditworthiness. A lower interest rate significantly reduces your total borrowing cost over the life of the loan.
Loan Term (Years):
This is the duration over which you will repay your mortgage. Common terms are 15, 20, or 30 years. A shorter loan term usually results in higher monthly payments but a lower total interest paid. A longer term means lower monthly payments but more interest paid over time.
Maximum % of Gross Income for Housing Payment (PITI):
Lenders often recommend that your total housing costs (Principal, Interest, Taxes, and Insurance – PITI) should not exceed a certain percentage of your gross monthly income. A common guideline is 28% (often referred to as the "front-end ratio"). This calculator uses this percentage to set an upper limit on your affordable monthly mortgage payment.
How the Calculation Works
This calculator estimates your maximum affordable mortgage payment by first determining your maximum allowable housing expense based on your income and the percentage you're comfortable allocating. It then uses a standard mortgage payment formula (amortization formula) to back-calculate the maximum loan amount you can afford, given the estimated interest rate and loan term.
Formulaic Breakdown:
Calculate Maximum Monthly PITI Payment: (Annual Income / 12) * (Max Payment Percentage / 100)
Calculate Maximum Loan Amount: This is derived from the mortgage payment formula (M = P [ i(1 + i)^n ] / [ (1 + i)^n – 1]), where M is your maximum monthly PITI payment, P is the principal loan amount (what we want to find), i is the monthly interest rate (Annual Interest Rate / 12 / 100), and n is the total number of payments (Loan Term * 12). Rearranging this formula to solve for P gives us the maximum loan amount.
Maximum Mortgage Affordability = Maximum Loan Amount – Down Payment
Disclaimer: This calculator provides an estimate only and should not be considered a loan approval or a guarantee of loan terms. Consult with a mortgage professional for accurate pre-approval and to discuss your specific financial situation.
function calculateMortgageAffordability() {
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 maxPaymentPercentage = parseFloat(document.getElementById("maxPaymentPercentage").value);
var resultDiv = document.getElementById("result");
resultDiv.innerHTML = ""; // Clear previous results
if (isNaN(annualIncome) || isNaN(monthlyDebt) || isNaN(downPayment) || isNaN(interestRate) || isNaN(loanTerm) || isNaN(maxPaymentPercentage)) {
resultDiv.innerHTML = "Please enter valid numbers for all fields.";
return;
}
if (annualIncome <= 0 || monthlyDebt < 0 || downPayment < 0 || interestRate <= 0 || loanTerm <= 0 || maxPaymentPercentage 100) {
resultDiv.innerHTML = "Please enter valid positive values. For percentage, use a value between 1 and 100.";
return;
}
// Calculate maximum monthly PITI payment
var grossMonthlyIncome = annualIncome / 12;
var maxMonthlyPiti = grossMonthlyIncome * (maxPaymentPercentage / 100);
// Calculate the maximum loan amount that can be supported by the maxMonthlyPiti
var monthlyInterestRate = interestRate / 100 / 12;
var numberOfPayments = loanTerm * 12;
var maxLoanAmount = 0;
if (monthlyInterestRate > 0 && numberOfPayments > 0) {
// Mortgage Payment Formula rearranged to solve for Principal (P)
// P = M * [ (1 + i)^n – 1] / [ i(1 + i)^n ]
maxLoanAmount = maxMonthlyPiti * (Math.pow(1 + monthlyInterestRate, numberOfPayments) – 1) / (monthlyInterestRate * Math.pow(1 + monthlyInterestRate, numberOfPayments));
} else if (monthlyInterestRate === 0 && numberOfPayments > 0) {
// Handle zero interest rate case
maxLoanAmount = maxMonthlyPiti * numberOfPayments;
} else {
resultDiv.innerHTML = "Invalid interest rate or loan term for calculation.";
return;
}
// Calculate maximum mortgage affordability (loan amount – down payment)
var mortgageAffordability = maxLoanAmount – downPayment;
// Display the results
var formattedAffordability = mortgageAffordability.toLocaleString(undefined, { style: 'currency', currency: 'USD' });
var formattedMaxLoan = maxLoanAmount.toLocaleString(undefined, { style: 'currency', currency: 'USD' });
var formattedMaxMonthlyPiti = maxMonthlyPiti.toLocaleString(undefined, { style: 'currency', currency: 'USD' });
resultDiv.innerHTML = "