Calculate your monthly house payments and total interest costs.
30 Years Fixed
20 Years Fixed
15 Years Fixed
10 Years Fixed
Monthly Payment:$0.00
Total Principal:$0.00
Total Interest Paid:$0.00
Total Cost of Loan:$0.00
How to Use the Mortgage Repayment Calculator
Choosing a home is one of the biggest financial decisions you will ever make. Our Mortgage Repayment Calculator helps you understand your financial commitment by breaking down your monthly dues into principal and interest components.
The Formula Behind the Calculation
To determine your monthly payment (M), we use the standard amortization formula:
M = P [ i(1 + i)^n ] / [ (1 + i)^n – 1 ]
P = Principal loan amount (Home Price – Down Payment)
i = Monthly interest rate (Annual rate divided by 12 months)
n = Number of months in the loan term (Years multiplied by 12)
Real-World Example
Imagine you are purchasing a home for $450,000 with a 20% down payment ($90,000). You secure a 30-year fixed-rate mortgage at 7.0%.
Loan Amount: $360,000
Monthly Payment: $2,395.09
Total Interest Paid: $502,232.40
Total Cost: $862,232.40
Notice how the interest over 30 years can actually exceed the original loan amount. This is why many homeowners choose to make extra payments or opt for 15-year terms when possible.
Important Considerations
While this calculator provides a precise mathematical estimate for Principal and Interest (P&I), your actual "out-the-door" monthly cost may be higher. Remember to budget for:
Property Taxes: Usually calculated as a percentage of your home's assessed value.
Homeowners Insurance: Required by lenders to protect the asset.
PMI (Private Mortgage Insurance): Often required if your down payment is less than 20%.
HOA Fees: Monthly or annual dues for managed communities or condos.
function calculateMortgage() {
var homePrice = parseFloat(document.getElementById('homePrice').value);
var downPayment = parseFloat(document.getElementById('downPayment').value);
var annualInterestRate = parseFloat(document.getElementById('interestRate').value);
var loanTermYears = parseInt(document.getElementById('loanTerm').value);
// Validation
if (isNaN(homePrice) || homePrice <= 0) {
alert('Please enter a valid home price.');
return;
}
if (isNaN(downPayment) || downPayment = homePrice) {
alert('Down payment cannot be greater than or equal to the home price.');
return;
}
if (isNaN(annualInterestRate) || annualInterestRate < 0) {
alert('Please enter a valid interest rate.');
return;
}
var principal = homePrice – downPayment;
var monthlyInterestRate = (annualInterestRate / 100) / 12;
var numberOfPayments = loanTermYears * 12;
var monthlyPayment = 0;
// If interest rate is 0, simple division
if (monthlyInterestRate === 0) {
monthlyPayment = principal / numberOfPayments;
} else {
var x = Math.pow(1 + monthlyInterestRate, numberOfPayments);
monthlyPayment = (principal * x * monthlyInterestRate) / (x – 1);
}
var totalPayment = monthlyPayment * numberOfPayments;
var totalInterest = totalPayment – principal;
// Formatting results
var formatter = new Intl.NumberFormat('en-US', {
style: 'currency',
currency: 'USD',
});
document.getElementById('monthlyResult').innerText = formatter.format(monthlyPayment);
document.getElementById('principalResult').innerText = formatter.format(principal);
document.getElementById('interestResult').innerText = formatter.format(totalInterest);
document.getElementById('totalCostResult').innerText = formatter.format(totalPayment);
// Show the results box
document.getElementById('mortgage-results').style.display = 'block';
}