inyourbrowser.com

Loan calculator

Loan calculator is a finance tool that works out monthly payments for auto, personal, and student loans using the standard amortization formula. It reports total interest, total cost, and a visual principal-versus-interest split, and accepts the term in months or years. The tool runs in your browser.

Monthly payment: $500.95.

Loan type

Currency

Formula: M = P[r(1+r)^n] / [(1+r)^n - 1], where P = loan amount, r = monthly rate, n = months

Monthly payment

$500.95
Total interest
$5,056.92
Total paid
$30,056.92
Loan amount
$25,000.00
Number of payments
60

Where your money goes over the loan term

Principal
Interest
$25,000.00 principal$5,056.92 interest

Calculations are estimates for informational purposes only. Consult a financial professional for advice.

How to calculate a loan payment

  1. Select the loan type tab (auto, personal, or student).
  2. Enter the loan amount and the annual interest rate.
  3. Enter the term in months or years.
  4. Review the monthly payment, total interest, and principal-vs-interest split.

Technical specification

  • Algorithm or formula: Standard amortization: M = P · [r(1+r)^n] / [(1+r)^n − 1], where P is principal, r is the monthly interest rate (annual / 12), and n is the number of months. Total interest = M · n − P.
  • Browser API or library: Pure JavaScript arithmetic and Math.pow. No external library.
  • Input limits: Any positive principal and rate. Term in months or years; the toggle just multiplies by 12.
  • Output: Monthly payment, total interest, total cost, and a principal-vs-interest visual breakdown.
  • Known limitations: Models a fixed-rate, fully-amortising loan only. Origination fees, variable rates, extra payments, and balloon terms are not modelled; compare APR for fee-heavy loans.

Frequently asked questions

How is a loan payment calculated?
Monthly payments follow the amortization formula M = P[r(1+r)^n] / [(1+r)^n - 1], where P is the loan amount, r is the monthly interest rate, and n is the number of months. Each payment is split between principal and interest, with the principal share growing over time.
What loan types does this calculator handle?
The same amortization math powers auto loans, personal loans, and student loans. Switch the tab at the top of the calculator to set a sensible default term for each type.
Does the calculator account for fees?
Only the headline interest rate is modelled here. For a loan with origination or processing fees, compare the APR rather than the interest rate, since APR rolls most fees into the effective annual cost.
Is my loan information sent to a server?
All math runs in your browser as JavaScript. Loan amounts, rates, and terms are not transmitted.

Calculations are estimates for informational purposes only. Consult a financial professional for advice.

Reviewed and tested May 26, 2026.