Calculate your monthly payments and see how extra payments save you money.
30 Years
20 Years
15 Years
10 Years
Monthly Principal & Interest
$0.00
Total Interest Paid
$0.00
Standard Payoff Date
–
Impact of Extra Payments
Total Interest Saved
$0.00
Time Saved
0 Months
New Payoff Date
–
function calculateMortgage() {
// 1. Get Input Values
var loanAmount = parseFloat(document.getElementById('loanAmount').value);
var interestRate = parseFloat(document.getElementById('interestRate').value);
var loanTermYears = parseInt(document.getElementById('loanTerm').value);
var extraPayment = parseFloat(document.getElementById('extraPayment').value);
// 2. Validate Inputs
if (isNaN(loanAmount) || loanAmount <= 0) {
alert("Please enter a valid loan amount.");
return;
}
if (isNaN(interestRate) || interestRate < 0) {
alert("Please enter a valid interest rate.");
return;
}
if (isNaN(extraPayment) || extraPayment 0 && monthsAccelerated remainingBalance) {
principalForMonth = remainingBalance;
// actual payment this month is less
}
totalInterestAccelerated += interestForMonth;
remainingBalance -= principalForMonth;
monthsAccelerated++;
// Safety break for extremely low payments (shouldn't happen with formula above)
if (monthsAccelerated > 1000) break;
}
var monthsSaved = totalPayments – monthsAccelerated;
var interestSaved = totalInterestStandard – totalInterestAccelerated;
// Calculate New Payoff Date
var newPayoffDate = new Date(today.getFullYear(), today.getMonth() + monthsAccelerated, today.getDate());
// 6. Formatting Helper
var formatter = new Intl.NumberFormat('en-US', {
style: 'currency',
currency: 'USD',
minimumFractionDigits: 2
});
// 7. Update DOM Results
document.getElementById('resultContainer').style.display = 'block';
document.getElementById('monthlyPaymentDisplay').innerText = formatter.format(monthlyPayment);
document.getElementById('totalInterestDisplay').innerText = formatter.format(totalInterestStandard);
document.getElementById('payoffDateDisplay').innerText = standardPayoffDate.toLocaleDateString('en-US', { month: 'short', year: 'numeric' });
// Handle Extra Payment Logic Display
var savingsSection = document.getElementById('savingsSection');
if (extraPayment > 0 && monthsSaved > 0) {
savingsSection.style.display = 'block';
document.getElementById('interestSavedDisplay').innerText = formatter.format(interestSaved);
// Format time saved
var yearsSaved = Math.floor(monthsSaved / 12);
var remainingMonthsSaved = monthsSaved % 12;
var timeSavedString = "";
if (yearsSaved > 0) timeSavedString += yearsSaved + " Yr ";
if (remainingMonthsSaved > 0) timeSavedString += remainingMonthsSaved + " Mo";
if (timeSavedString === "") timeSavedString = "0 Mo";
document.getElementById('timeSavedDisplay').innerText = timeSavedString;
document.getElementById('newPayoffDateDisplay').innerText = newPayoffDate.toLocaleDateString('en-US', { month: 'short', year: 'numeric' });
} else {
savingsSection.style.display = 'none';
}
}
Understanding How Mortgage Amortization Works
A mortgage amortization schedule is a table detailing each periodic payment on an amortizing loan (typically a mortgage). While your monthly principal and interest payment remains the same for a fixed-rate mortgage, the allocation of that payment changes over time.
Key Concept: In the early years of your loan, the majority of your payment goes toward interest. In the later years, the majority goes toward the principal balance.
How Extra Payments Save You Money
Using the calculator above, you can see the dramatic impact of making extra payments toward your principal. Because interest is calculated based on your outstanding loan balance, reducing that balance faster means you accrue less interest in every subsequent month.
Even a small extra payment, such as $50 or $100 per month, can:
Reduce your total interest costs: Often saving thousands or tens of thousands of dollars over the life of the loan.
Shorten your loan term: Turning a 30-year mortgage into a 25 or 22-year commitment.
Build equity faster: Owning more of your home sooner allows for greater financial flexibility.
The Mathematics of Amortization
This calculator uses the standard amortization formula to determine your base monthly payment:
M = P [ i(1 + i)^n ] / [ (1 + i)^n – 1 ]
M = Total monthly payment
P = Principal loan amount
i = Monthly interest rate (Annual rate / 12)
n = Number of payments (Loan term in years × 12)
Frequently Asked Questions
Does this calculator include taxes and insurance?
No, this tool calculates Principal and Interest (P&I) only. Property taxes, homeowner's insurance, and HOA fees are usually held in escrow and added on top of this P&I amount. To get your full "out-of-pocket" monthly cost, you must add those estimated expenses to the result shown above.
Is it better to pay extra monthly or a lump sum annually?
Mathematically, paying extra monthly is slightly more beneficial because you reduce the principal balance sooner (12 times a year vs. once a year), reducing the interest accrual immediately. However, both methods are effective strategies for debt reduction.
Are there penalties for paying off a mortgage early?
Most modern conforming mortgages do not have prepayment penalties. However, it is always recommended to check your specific loan documents or contact your servicer to ensure you won't be charged a fee for making extra principal payments.