Calculate your estimated monthly mortgage payment, including principal and interest.
Estimated Monthly Principal & Interest
$0.00
Understanding Your Mortgage Payment Calculation
This calculator estimates your monthly Principal and Interest (P&I) payment. It's a crucial component of your overall housing cost, which also typically includes property taxes, homeowner's insurance, and potentially Private Mortgage Insurance (PMI) or Homeowner Association (HOA) fees. Redfin's mortgage calculator provides a clear starting point for understanding the loan's core cost.
The calculation uses a standard mortgage payment formula, often referred to as an annuity formula. The formula is:
M = P [ i(1 + i)^n ] / [ (1 + i)^n – 1]
Where:
M = Your total monthly mortgage payment (Principal & Interest).
P = The principal loan amount (Home Price – Down Payment).
i = Your monthly interest rate (Annual interest rate / 12).
n = The total number of payments over the loan's lifetime (Loan term in years * 12).
Example Calculation Breakdown:
Let's say you're looking at a home priced at $400,000.
You make a 20% down payment ($80,000).
The loan amount (P) is therefore $320,000 ($400,000 – $80,000).
This $1,485.19 is the estimated monthly payment for principal and interest. Redfin's calculator will perform a similar calculation for you based on the figures you enter, helping you quickly compare different loan scenarios and understand the impact of interest rates and loan terms. Remember to factor in other costs for a true picture of your monthly housing expense.
function calculateMortgage() {
var homePrice = parseFloat(document.getElementById("homePrice").value);
var downPaymentPercent = parseFloat(document.getElementById("downPayment").value);
var interestRate = parseFloat(document.getElementById("interestRate").value);
var loanTerm = parseFloat(document.getElementById("loanTerm").value);
var resultElement = document.getElementById("monthlyPayment");
if (isNaN(homePrice) || isNaN(downPaymentPercent) || isNaN(interestRate) || isNaN(loanTerm) ||
homePrice <= 0 || downPaymentPercent 100 || interestRate < 0 || loanTerm 0) {
monthlyPayment = loanAmount * (monthlyInterestRate * Math.pow(1 + monthlyInterestRate, numberOfPayments)) / (Math.pow(1 + monthlyInterestRate, numberOfPayments) – 1);
} else {
// Handle the case of 0% interest rate
monthlyPayment = loanAmount / numberOfPayments;
}
resultElement.textContent = "$" + monthlyPayment.toFixed(2);
}
// Initial calculation on load if default values are present
document.addEventListener('DOMContentLoaded', function() {
document.getElementById("homePrice").value = ""; // Clear initial value to avoid calculation on load with empty fields
document.getElementById("downPayment").value = "20";
document.getElementById("interestRate").value = "";
document.getElementById("loanTerm").value = "30";
// Optionally call calculateMortgage() here if you want it to compute with default values
// calculateMortgage();
});