Loan Amortization Calculator Formula

Understand the math behind the loan amortization calculator. Each variable explained with a worked example.

Formulas Used

Monthly Payment

monthly_payment = monthly_rate > 0 ? loan_amount * monthly_rate * pow(1 + monthly_rate, num_payments) / (pow(1 + monthly_rate, num_payments) - 1) : loan_amount / num_payments

Total Amount Paid

total_paid = monthly_payment * num_payments

Total Interest Paid

total_interest = monthly_payment * num_payments - loan_amount

First Month Interest

first_month_interest = loan_amount * monthly_rate

First Month Principal

first_month_principal = monthly_payment - loan_amount * monthly_rate

Variables

VariableDescriptionDefault
loan_amountLoan Amount(USD)200000
annual_rateAnnual Interest Rate(%)6
loan_term_yearsLoan Term(years)30
monthly_rateDerived value= annual_rate / 12 / 100calculated
num_paymentsDerived value= loan_term_years * 12calculated

How It Works

How Loan Amortization Works

Amortization is the process of spreading loan payments over time. Each payment covers interest on the remaining balance plus a portion of the principal.

Formula

Monthly Payment: M = P * [r(1+r)^n] / [(1+r)^n - 1]

For each payment:

  • Interest portion = Remaining balance * monthly rate
  • Principal portion = Monthly payment - interest portion
  • Early payments are mostly interest; later payments are mostly principal.

    Worked Example

    A $200,000 loan at 6% interest for 30 years.

    loan_amount = 200000annual_rate = 6loan_term_years = 30
    1. 01Monthly rate: 6% / 12 = 0.5% (0.005)
    2. 02Total payments: 30 * 12 = 360
    3. 03Monthly payment = $200,000 * [0.005 * (1.005)^360] / [(1.005)^360 - 1] = $1,199.10
    4. 04First month interest: $200,000 * 0.005 = $1,000.00
    5. 05First month principal: $1,199.10 - $1,000.00 = $199.10
    6. 06Total paid: $1,199.10 * 360 = $431,676.00
    7. 07Total interest: $431,676.00 - $200,000 = $231,676.00

    When to Use This Formula

    • Understanding exactly how much of each monthly mortgage payment goes to principal versus interest, especially in the early years when interest dominates.
    • Planning extra principal payments by seeing how an additional $200/month shifts the payoff date and total interest — the amortization schedule makes the impact visible.
    • Comparing a 15-year versus 30-year mortgage by reviewing the full schedule side by side, not just the monthly payment difference.
    • Preparing financial statements for a business loan where the accounting department needs to split each payment into interest expense and principal reduction.
    • Verifying that a lender's payoff quote is correct by calculating the expected remaining balance after a specific number of payments.

    Common Mistakes to Avoid

    • Assuming interest and principal split evenly across the loan — in a 30-year mortgage at 7%, roughly 80% of the first payment is interest. The schedule is heavily front-loaded with interest, which is why early extra payments have an outsized effect.
    • Applying extra payments to the wrong component — extra money must reduce principal to save interest. Some lenders apply overpayments to future interest or hold them in escrow unless you specifically request principal-only application.
    • Forgetting that amortization resets when you refinance — if you refinance a 30-year loan after 10 years into a new 30-year loan, you restart the interest-heavy early years. This is why refinancing into a shorter term is often smarter.
    • Using a simple interest schedule when the loan compounds monthly — the standard amortization formula assumes compound interest. A simple interest calculation understates total interest paid over the loan life.

    Frequently Asked Questions

    What is loan amortization?

    Loan amortization is the process of paying off debt through regular payments over time. Each payment is split between interest and principal reduction.

    Why do I pay more interest at the beginning?

    Interest is calculated on the remaining balance. Since the balance is highest at the start, more of each early payment goes toward interest. As the balance decreases, more goes toward principal.

    Can I pay off my loan faster?

    Yes. Making extra payments toward principal reduces your balance faster, which decreases total interest and shortens the loan term.

    How much interest do I save by making one extra mortgage payment per year?

    Making one extra mortgage payment per year can shorten a 30-year mortgage by 4-5 years and save tens of thousands in interest, depending on your rate and balance. For example, on a $300,000 loan at 6.5%, paying one extra payment per year could save over $60,000 in interest.

    Learn More

    Guide

    How to Calculate Mortgage Payments

    Learn how to calculate mortgage payments step by step. Understand the mortgage payment formula, principal vs. interest breakdown, escrow, PMI, and how to use amortization schedules.

    Ready to run the numbers?

    Open Loan Amortization Calculator