Student Loan Calculator Formula
Understand the math behind the student loan calculator. Each variable explained with a worked example.
Formulas Used
Monthly Payment
monthly_payment = monthly_rate > 0 ? loan_balance * monthly_rate * pow(1 + monthly_rate, num_payments) / (pow(1 + monthly_rate, num_payments) - 1) : loan_balance / num_paymentsTotal Repaid
total_paid = monthly_payment * num_paymentsTotal Interest
total_interest = total_paid - loan_balanceVariables
| Variable | Description | Default |
|---|---|---|
loan_balance | Loan Balance(USD) | 35000 |
annual_rate | Interest Rate(%) | 5.5 |
repayment_years | Repayment Term(years) | 10 |
monthly_rate | Derived value= annual_rate / 12 / 100 | calculated |
num_payments | Derived value= repayment_years * 12 | calculated |
How It Works
Student Loan Payment Formula
Uses the standard amortization formula:
M = P × [r(1+r)^n] / [(1+r)^n - 1]
Federal student loans typically use a 10-year standard repayment plan.
Worked Example
$35,000 in student loans at 5.5% over 10 years.
loan_balance = 35000annual_rate = 5.5repayment_years = 10
- 01Monthly rate = 5.5% / 12 = 0.4583%
- 02Payments = 10 × 12 = 120
- 03Monthly payment = $379.61
- 04Total repaid = $379.61 × 120 = $45,553
- 05Total interest = $45,553 - $35,000 = $10,553
Ready to run the numbers?
Open Student Loan Calculator