Amortization is the process of spreading out a loan into a series of fixed payments over time. In a typical amortized loan, each payment you make goes toward both the principal (the original amount borrowed) and the interest (the cost of borrowing the money).
The Monthly Payment Formula
To calculate the monthly payment (M) on an amortized loan, we use the following standard formula:
M = P [ i(1 + i)^n ] / [ (1 + i)^n – 1 ]
P = Principal loan amount (Total price – Down payment)
i = Monthly interest rate (Annual rate divided by 12 months)
n = Number of months (Loan term in years multiplied by 12)
Understanding the Amortization Schedule
In the early years of your loan, a larger portion of your monthly payment is applied to interest. As the principal balance decreases, the amount of interest owed each month drops, and more of your payment goes toward paying off the principal. This is why equity in a home grows slowly at first and accelerates toward the end of the mortgage term.
Example Calculation
If you purchase a home for $300,000 with a $60,000 down payment (leaving a $240,000 loan) at a 6% interest rate for 30 years:
✅ Monthly Payment: Approximately $1,438.92
✅ Total Interest Paid: $278,011.53
✅ Total Cost of Loan: $518,011.53
By using this calculator, you can visualize how different interest rates or down payment amounts affect your long-term financial commitments.
function calculateAmortization() {
var principal = parseFloat(document.getElementById("loanAmount").value) || 0;
var downPayment = parseFloat(document.getElementById("downPayment").value) || 0;
var annualRate = parseFloat(document.getElementById("interestRate").value) || 0;
var years = parseFloat(document.getElementById("loanTerm").value) || 0;
var loanAmount = principal – downPayment;
if (loanAmount <= 0 || annualRate <= 0 || years <= 0) {
alert("Please enter valid positive numbers for all fields.");
return;
}
var monthlyRate = (annualRate / 100) / 12;
var numberOfPayments = years * 12;
// Monthly Payment Formula: M = P [ i(1 + i)^n ] / [ (1 + i)^n – 1 ]
var x = Math.pow(1 + monthlyRate, numberOfPayments);
var monthlyPayment = (loanAmount * x * monthlyRate) / (x – 1);
var totalAmountPaid = monthlyPayment * numberOfPayments;
var totalInterestPaid = totalAmountPaid – loanAmount;
// Calculate Payoff Date
var today = new Date();
var payoffDate = new Date(today.setMonth(today.getMonth() + numberOfPayments));
var options = { month: 'long', year: 'numeric' };
var formattedPayoffDate = payoffDate.toLocaleDateString(undefined, options);
// Update UI
document.getElementById("monthlyPaymentResult").innerHTML = "$" + monthlyPayment.toLocaleString(undefined, {minimumFractionDigits: 2, maximumFractionDigits: 2});
document.getElementById("totalInterestResult").innerHTML = "$" + totalInterestPaid.toLocaleString(undefined, {minimumFractionDigits: 2, maximumFractionDigits: 2});
document.getElementById("totalCostResult").innerHTML = "$" + totalAmountPaid.toLocaleString(undefined, {minimumFractionDigits: 2, maximumFractionDigits: 2});
document.getElementById("payoffDateResult").innerHTML = formattedPayoffDate;
document.getElementById("results-section").style.display = "block";
}