Debt Payoff Timeline Calculator Formula
Understand the math behind the debt payoff timeline calculator. Each variable explained with a worked example.
Formulas Used
Months to Pay Off
payoff_months = monthly_rate > 0 ? (monthly_payment > balance * monthly_rate ? ceil(-log(1 - balance * monthly_rate / monthly_payment) / log(1 + monthly_rate)) : 999) : ceil(balance / monthly_payment)Total Interest
total_interest = monthly_rate > 0 ? (monthly_payment > balance * monthly_rate ? monthly_payment * ceil(-log(1 - balance * monthly_rate / monthly_payment) / log(1 + monthly_rate)) - balance : balance * 10) : 0Total Cost
total_cost = monthly_rate > 0 ? (monthly_payment > balance * monthly_rate ? monthly_payment * ceil(-log(1 - balance * monthly_rate / monthly_payment) / log(1 + monthly_rate)) : balance * 10) : balanceFirst Month Interest
first_month_interest = balance * monthly_rateFirst Month to Principal
first_month_principal = monthly_payment - balance * monthly_rateVariables
| Variable | Description | Default |
|---|---|---|
balance | Starting Balance(USD) | 20000 |
annual_rate | Annual Interest Rate(%) | 15 |
monthly_payment | Fixed Monthly Payment(USD) | 600 |
monthly_rate | Derived value= annual_rate / 12 / 100 | calculated |
How It Works
Debt Payoff Timeline
A payoff timeline shows how each payment is split between interest and principal.
Early vs Late Payments
In the early months, a large portion goes to interest. As the balance shrinks, more of each payment attacks the principal. This is why extra payments early on are so powerful.
Month 1 Breakdown
This process repeats each month until the balance reaches zero.
Worked Example
$20,000 at 15% with $600/month payments.
balance = 20000annual_rate = 15monthly_payment = 600
- 01Month 1 interest = $20,000 x 1.25% = $250
- 02Month 1 principal = $600 - $250 = $350
- 03New balance = $20,000 - $350 = $19,650
- 04Total payoff = 42 months (3.5 years)
- 05Total interest = $5,200
Ready to run the numbers?
Open Debt Payoff Timeline Calculator