Estimate your potential new monthly mortgage payment after refinancing.
Your Estimated New Monthly Payment
Understanding Mortgage Refinancing
Mortgage refinancing involves replacing your existing home loan with a new one. Borrowers typically refinance to secure a lower interest rate, reduce their monthly payments, shorten their loan term, or tap into their home equity. This calculator helps you estimate your new monthly mortgage payment and the total cost of the refinanced loan, taking into account closing costs.
How the Calculation Works
The core of this calculator uses the standard monthly mortgage payment formula, commonly known as an annuity formula. However, for refinancing, we first adjust the principal amount to include the estimated closing costs.
Adjusted Principal: Your current mortgage balance plus any closing costs you roll into the new loan.
Adjusted Principal = Current Mortgage Balance + Closing Costs
Monthly Interest Rate: The annual interest rate is divided by 12.
Monthly Interest Rate (i) = (New Interest Rate / 100) / 12
Number of Payments: The loan term in years is multiplied by 12.
Number of Payments (n) = New Loan Term (Years) * 12
Monthly Mortgage Payment Formula: M = P [ i(1 + i)^n ] / [ (1 + i)^n – 1]
Where:
M = Your total monthly mortgage payment
P = The principal loan amount (Adjusted Principal)
i = Your monthly interest rate
n = The total number of payments over the loan's lifetime
Total Interest Paid: The total amount of interest you will pay over the life of the loan.
Total Interest Paid = (Monthly Payment * Number of Payments) - Adjusted Principal
Total Cost of Loan: The sum of the principal borrowed and the total interest paid.
Total Cost of Loan = Adjusted Principal + Total Interest Paid
When to Consider Refinancing
Falling Interest Rates: If current market interest rates are significantly lower than your existing mortgage rate.
Improved Credit Score: A higher credit score can qualify you for better rates.
Shortening Loan Term: If you want to pay off your mortgage faster and save on interest, even if the monthly payment is slightly higher.
Cash-Out Refinance: If you need funds for home improvements, debt consolidation, or other major expenses, and want to borrow against your home's equity.
Debt Consolidation: Combining high-interest debts into your mortgage might offer a lower overall interest rate.
Disclaimer: This calculator provides an estimate. Actual mortgage payments and loan terms may vary based on lender fees, individual creditworthiness, and specific loan products. Consult with a mortgage professional for personalized advice.
function calculateRefi() {
var currentBalance = parseFloat(document.getElementById("currentBalance").value);
var newInterestRate = parseFloat(document.getElementById("newInterestRate").value);
var newLoanTerm = parseInt(document.getElementById("newLoanTerm").value);
var closingCosts = parseFloat(document.getElementById("closingCosts").value);
var resultDiv = document.getElementById("result");
var monthlyPaymentEl = document.getElementById("monthlyPayment");
var totalInterestPaidEl = document.getElementById("totalInterestPaid");
var totalCostOfLoanEl = document.getElementById("totalCostOfLoan");
// Input validation
if (isNaN(currentBalance) || isNaN(newInterestRate) || isNaN(newLoanTerm) || isNaN(closingCosts) ||
currentBalance <= 0 || newInterestRate < 0 || newLoanTerm <= 0 || closingCosts < 0) {
alert("Please enter valid positive numbers for all fields.");
resultDiv.style.display = 'none';
return;
}
var loanAmount = currentBalance + closingCosts;
var monthlyInterestRate = (newInterestRate / 100) / 12;
var numberOfPayments = newLoanTerm * 12;
var monthlyPayment = 0;
var totalInterestPaid = 0;
var totalCostOfLoan = 0;
if (monthlyInterestRate === 0) {
// Handle 0 interest rate case
monthlyPayment = loanAmount / numberOfPayments;
} else {
// Standard mortgage payment formula
monthlyPayment = loanAmount * (monthlyInterestRate * Math.pow(1 + monthlyInterestRate, numberOfPayments)) / (Math.pow(1 + monthlyInterestRate, numberOfPayments) – 1);
}
// Ensure values are not NaN after calculation
if (isNaN(monthlyPayment)) {
alert("Calculation resulted in an invalid number. Please check your inputs.");
resultDiv.style.display = 'none';
return;
}
totalCostOfLoan = monthlyPayment * numberOfPayments;
totalInterestPaid = totalCostOfLoan – loanAmount;
// Format currency for display
var formatter = new Intl.NumberFormat('en-US', {
style: 'currency',
currency: 'USD',
minimumFractionDigits: 2,
maximumFractionDigits: 2
});
monthlyPaymentEl.textContent = "Estimated Monthly Payment: " + formatter.format(monthlyPayment);
totalInterestPaidEl.textContent = "Estimated Total Interest Paid: " + formatter.format(totalInterestPaid);
totalCostOfLoanEl.textContent = "Estimated Total Cost of Loan: " + formatter.format(totalCostOfLoan);
resultDiv.style.display = 'block';
}