Student Loan Interest Calculator Formula

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

Formulas Used

Total Interest Paid

total_interest = monthly_pmt * n_payments - principal

First Month Interest

first_month_interest = principal * monthly_rate

Interest as % of Principal

interest_pct = ((monthly_pmt * n_payments - principal) / principal) * 100

Variables

VariableDescriptionDefault
principalLoan Balance ($)30000
annual_rateAnnual Interest Rate (%)6
term_yearsLoan Term (years)10
monthly_rateDerived value= annual_rate / 100 / 12calculated
n_paymentsDerived value= term_years * 12calculated
monthly_pmtDerived value= principal * monthly_rate * pow(1 + monthly_rate, n_payments) / (pow(1 + monthly_rate, n_payments) - 1)calculated

How It Works

How Student Loan Interest Works

Interest accrues daily on your outstanding balance.

Total Interest Formula

Total Interest = (Monthly Payment x Number of Payments) - Principal

Daily Interest

Daily Interest = Balance x (Annual Rate / 365)

Early payments are mostly interest; later payments are mostly principal.

Worked Example

A $30,000 loan at 6% interest over 10 years.

principal = 30000annual_rate = 6term_years = 10
  1. 01Monthly rate = 6% / 12 = 0.5%
  2. 02Monthly payment = $333.06
  3. 03Total paid = $333.06 x 120 = $39,967
  4. 04Total interest = $39,967 - $30,000 = $9,967
  5. 05Interest as % of principal = ($9,967 / $30,000) x 100 = 33.2%

Ready to run the numbers?

Open Student Loan Interest Calculator