Understanding Your Mortgage Payment with Extra Payments
A mortgage is a significant financial commitment, and understanding how to optimize your payments can lead to substantial savings over time. This calculator helps you visualize the impact of making extra payments on your mortgage, reducing both the total interest paid and the life of the loan.
The Standard Mortgage Payment Formula
The base monthly mortgage payment (Principal & Interest) is calculated using the following formula:
M = P [ i(1 + i)^n ] / [ (1 + i)^n – 1]
Where:
M = Your total monthly mortgage payment (Principal & Interest)
P = The principal loan amount (the total amount you borrowed)
i = Your monthly interest rate (annual rate divided by 12)
n = The total number of payments over the loan's lifetime (loan term in years multiplied by 12)
The Impact of Extra Payments
When you make an extra payment towards your mortgage, the entire additional amount typically goes towards reducing the principal balance. This is incredibly powerful because:
It reduces the principal faster: A lower principal means less interest accrues in future periods.
It shortens the loan term: By paying down the principal faster, you reach the end of your loan term sooner.
It saves significant interest: The combination of paying down principal faster and shortening the loan term leads to substantial interest savings over the life of the loan.
How the Calculator Works
Our calculator first computes your standard monthly payment using the formula above. Then, it simulates the loan's amortization, month by month, incorporating your specified extra monthly payment. It tracks the principal reduction and calculates:
The new, shorter amortization period.
The total amount paid over the life of the loan.
The total interest paid.
The total interest saved compared to making only the minimum payments.
Use Cases
This calculator is ideal for:
Homeowners looking to pay off their mortgage faster.
Individuals wanting to understand the financial benefits of making lump-sum payments.
People considering increasing their monthly mortgage payments to save on interest.
Financial planning for early debt freedom.
By inputting your current loan details and a potential extra payment amount, you can gain clear insights into how small, consistent extra payments can lead to significant financial gains and accelerate your journey to homeownership.
function calculateMortgage() {
var loanAmount = parseFloat(document.getElementById("loanAmount").value);
var annualInterestRate = parseFloat(document.getElementById("annualInterestRate").value);
var loanTermYears = parseFloat(document.getElementById("loanTermYears").value);
var extraPaymentAmount = parseFloat(document.getElementById("extraPaymentAmount").value);
var resultDiv = document.getElementById("result");
var monthlyPaymentResult = document.getElementById("monthlyPaymentResult");
var totalPaidResult = document.getElementById("totalPaidResult");
var totalInterestResult = document.getElementById("totalInterestResult");
var amortizationPeriodResult = document.getElementById("amortizationPeriodResult");
var interestSavedResult = document.getElementById("interestSavedResult");
// Validate inputs
if (isNaN(loanAmount) || isNaN(annualInterestRate) || isNaN(loanTermYears) || loanAmount <= 0 || annualInterestRate < 0 || loanTermYears 0) {
standardMonthlyPayment = loanAmount * (monthlyInterestRate * Math.pow(1 + monthlyInterestRate, numberOfPayments)) / (Math.pow(1 + monthlyInterestRate, numberOfPayments) – 1);
} else {
standardMonthlyPayment = loanAmount / numberOfPayments;
}
var totalPayment = standardMonthlyPayment + extraPaymentAmount;
var remainingBalance = loanAmount;
var totalInterestPaid = 0;
var totalPrincipalPaid = 0;
var totalPaymentsMade = 0;
var months = 0;
while (remainingBalance > 0) {
months++;
var interestForMonth = remainingBalance * monthlyInterestRate;
var principalForMonth = totalPayment – interestForMonth;
if (principalForMonth < 0) { // Handle cases where total payment doesn't even cover interest
principalForMonth = 0;
totalPayment = interestForMonth; // Pay only interest if not enough
}
// Check if this is the last payment and adjust
if (remainingBalance loanTermYears * 12 * 5) { // Safety break to prevent infinite loops
alert("Calculation might be taking too long. Please check your inputs.");
return;
}
}
var totalInterestPaidRounded = totalInterestPaid;
var totalPaidRounded = loanAmount + totalInterestPaidRounded;
var interestSaved = (loanAmount * (monthlyInterestRate * Math.pow(1 + monthlyInterestRate, loanTermYears * 12)) / (Math.pow(1 + monthlyInterestRate, loanTermYears * 12) – 1)) * loanTermYears * 12 – totalInterestPaidRounded;
if (annualInterestRate === 0) {
interestSaved = 0; // No interest saved if rate is 0
}
var years = Math.floor(months / 12);
var remainingMonths = months % 12;
monthlyPaymentResult.innerText = "$" + standardMonthlyPayment.toFixed(2);
totalPaidResult.innerText = "$" + totalPaidRounded.toFixed(2);
totalInterestResult.innerText = "$" + totalInterestPaidRounded.toFixed(2);
amortizationPeriodResult.innerText = years + " Years " + remainingMonths + " Months";
interestSavedResult.innerText = "$" + Math.max(0, interestSaved).toFixed(2); // Ensure interest saved is not negative
resultDiv.style.display = "block";
}