Free, open-source loan payment estimator with amortization, affordability analysis, and support for 6 loan types.
Estimate monthly payments before borrowing — see the true total cost including all interest for mortgages, auto loans, personal loans, credit cards, student loans, and home equity loans.
Use the Debt Payment Calculator on BullRun Forever Tools — includes interactive charts, affordability analysis, CSV export, and dark mode.
- Monthly payment calculation for 6 loan types
- Total interest and true cost of borrowing
- First-year amortization schedule
- Credit card minimum vs. recommended payment comparison
- Debt-to-income (DTI) affordability analysis
- Support for zero-interest loans
- Zero dependencies — pure JavaScript math
| Loan Type | Typical APR | Common Term | Calculation |
|---|---|---|---|
| Personal Loan | 6-15% | 24-60 months | Fixed amortization |
| Auto Loan | 4-10% | 60 months | Fixed amortization |
| Mortgage | 6-8% | 360 months (30yr) | Fixed amortization |
| Credit Card | 15-25% | Revolving | Minimum + recommended |
| Student Loan | 4-7% | 120 months (10yr) | Fixed amortization |
| Home Equity | 6-9% | 120-180 months | Fixed amortization |
npm install
npm run devOpen http://localhost:5173 to use the calculator locally.
For fixed-payment loans (mortgages, auto, personal, student, home equity):
M = P × [r(1 + r)^n] / [(1 + r)^n - 1]
Where:
- M = Monthly payment
- P = Principal (loan amount)
- r = Monthly interest rate (APR / 12 / 100)
- n = Total number of payments (term in months)
Special case — zero interest: M = P / n
Step 1: Monthly rate
r = 6 / 12 / 100 = 0.005
Step 2: (1 + r)^n
(1.005)^60 = 1.34885
Step 3: Monthly payment
M = $30,000 × [0.005 × 1.34885] / [1.34885 - 1]
M = $30,000 × 0.006744 / 0.34885
M = $579.98
Step 4: Total cost
Total Paid = $579.98 × 60 = $34,798.80
Total Interest = $34,798.80 - $30,000 = $4,798.80
Interest as % of loan = 16.0%
Credit cards use revolving credit — no fixed term:
Minimum Payment = MAX(Balance × 2%, $25)
Example:
$5,000 balance: MAX($5,000 × 0.02, $25) = $100/month
$800 balance: MAX($800 × 0.02, $25) = $25/month
How long it takes to pay off with a given payment:
Months = -log(1 - (P × r) / M) / log(1 + r)
Example: $5,000 at 18% APR, $100 minimum payment
r = 18 / 12 / 100 = 0.015
Months = -log(1 - (5000 × 0.015) / 100) / log(1.015)
Months = 93 months (7.75 years!)
Total Interest: ~$4,300
With a recommended $180/month payment instead:
Months = 36 months (3 years)
Total Interest: ~$1,495
Savings: $2,805!
Each monthly payment splits between principal and interest:
Interest Payment = Remaining Balance × Monthly Rate
Principal Payment = Total Payment - Interest Payment
New Balance = Old Balance - Principal Payment
First year of a $200,000 mortgage at 7% (30yr):
| Month | Payment | Principal | Interest | Balance |
|---|---|---|---|---|
| 1 | $1,330.60 | $163.93 | $1,166.67 | $199,836 |
| 2 | $1,330.60 | $164.89 | $1,165.71 | $199,671 |
| 3 | $1,330.60 | $165.85 | $1,164.75 | $199,505 |
| ... | ... | ... | ... | ... |
| 12 | $1,330.60 | $175.13 | $1,155.47 | $197,969 |
In year 1, 87% of payments go to interest.
DTI = (Monthly Payment / Monthly Income) × 100
| DTI Ratio | Rating | Guidance |
|---|---|---|
| < 15% | Excellent | Very affordable |
| 15-28% | Good | Manageable |
| 28-36% | Caution | Stretched budget |
| > 36% | Warning | May be too burdensome |
| Calculation | Formula |
|---|---|
| Monthly Payment (installment) | P × [r(1+r)^n] / [(1+r)^n-1] |
| Monthly Payment (0% interest) | P / n |
| Credit Card Minimum | MAX(balance × 0.02, $25) |
| Payoff Time (credit card) | -log(1-(P×r)/M) / log(1+r) |
| Total Paid | monthlyPayment × months |
| Total Interest | totalPaid - principal |
| Interest % | (totalInterest / principal) × 100 |
| DTI Ratio | (payment / income) × 100 |
| Monthly Interest | balance × (APR / 12 / 100) |
| Principal Payment | totalPayment - interestPayment |
import {
calculateMonthlyPayment,
calculateCreditCardMinimum,
calculateAmortization,
calculateAffordability
} from './src/calculator.js';
// Auto loan
const payment = calculateMonthlyPayment(30000, 6, 60);
console.log(payment); // $579.98
// Credit card minimum
const minimum = calculateCreditCardMinimum(5000);
console.log(minimum); // $100
// Full amortization schedule (first 12 months)
const schedule = calculateAmortization(30000, 579.98, 6, 60, 12);
console.log(schedule); // Array of monthly payment breakdowns
// Affordability check
const dti = calculateAffordability(579.98, 4000);
console.log(dti); // { ratio: 14.5, rating: 'excellent', message: '...' }// calculateMonthlyPayment returns a number (the monthly payment amount)
// calculateAmortization returns:
[
{
month: number,
payment: number,
principal: number, // Principal portion
interest: number, // Interest portion
balance: number // Remaining balance
}
]
// calculateAffordability returns:
{
ratio: number, // DTI percentage
rating: string, // 'excellent' | 'good' | 'caution' | 'warning'
message: string // Human-readable guidance
}| Option | Rate | Term | Monthly | Total Interest | Total Paid |
|---|---|---|---|---|---|
| A | 8% | 3 years | $313 | $1,281 | $11,281 |
| B | 8% | 5 years | $203 | $2,166 | $12,166 |
Lower monthly payment costs $885 more in total interest.
| Option | Rate | Term | Monthly | Total Interest |
|---|---|---|---|---|
| A | 5% | 48 months | $460 | $2,100 |
| B | 7% | 60 months | $396 | $3,761 |
$64/month savings costs $1,661 more over the life of the loan.
How is my monthly payment calculated? Using the standard amortization formula. Each payment covers that month's interest plus some principal. Early payments are mostly interest; later payments are mostly principal.
How much of my income should go to debt? Keep your total debt-to-income ratio below 36%. Individual loans should ideally be under 15% of monthly income.
Should I choose a longer term for lower payments? Lower payments = more total interest. A $25,000 loan at 7%: 5 years costs ~$5,000 interest, 7 years costs ~$8,000. Choose the shortest term you can afford.
Why do credit cards cost so much? Minimum payments (2-3% of balance) barely cover interest. A $5,000 balance at 18% takes 7+ years with minimums vs. 3 years with accelerated payments.
This calculator is part of the BullRun Forever Toolkit — 16 free financial calculators including:
- Loan Payoff Calculator — Accelerate loan payoff with extra payments
- Debt Strategy Planner — Snowball vs. avalanche comparison
- Budget Planner — Personalized budgeting
- 401(k) Calculator — Retirement with employer match
- Credit Score Tools — Credit score simulator
MIT License — use freely in your own projects.
This calculator is for educational and informational purposes only. It is not financial advice. Actual loan terms, rates, and payments may vary based on lender, credit score, and other factors. Always review loan documents carefully before borrowing.
Built by BullRun Forever
Free financial tools for everyone.