Debt Avalanche Calculator Formula
Understand the math behind the debt avalanche calculator. Each variable explained with a worked example.
Formulas Used
Months to Pay Off
months_to_payoff = monthly_rate > 0 ? (monthly_payment > total_debt * monthly_rate ? ceil(-log(1 - total_debt * monthly_rate / monthly_payment) / log(1 + monthly_rate)) : 999) : ceil(total_debt / monthly_payment)Total Interest Paid
total_interest = monthly_rate > 0 ? (monthly_payment > total_debt * monthly_rate ? monthly_payment * ceil(-log(1 - total_debt * monthly_rate / monthly_payment) / log(1 + monthly_rate)) - total_debt : total_debt * 10) : 0Total Amount Paid
total_paid = monthly_rate > 0 ? (monthly_payment > total_debt * monthly_rate ? monthly_payment * ceil(-log(1 - total_debt * monthly_rate / monthly_payment) / log(1 + monthly_rate)) : total_debt * 10) : total_debtVariables
| Variable | Description | Default |
|---|---|---|
total_debt | Total Debt Balance(USD) | 30000 |
avg_rate | Weighted Average Interest Rate(%) | 18 |
monthly_payment | Total Monthly Payment(USD) | 800 |
monthly_rate | Derived value= avg_rate / 12 / 100 | calculated |
How It Works
Debt Avalanche Method
The avalanche method pays off debts from highest interest rate to lowest, regardless of balance size.
How It Works
1. Make minimum payments on all debts 2. Put all extra money toward the highest-rate debt 3. When that is paid off, roll the payment to the next highest rate 4. Repeat until debt-free
Why Avalanche Wins Mathematically
This method minimizes total interest paid. The formula uses the standard amortization equation solved for number of payments:
n = -ln(1 - B*r/P) / ln(1+r)
Worked Example
$30,000 total debt at 18% average rate, paying $800/month.
total_debt = 30000avg_rate = 18monthly_payment = 800
- 01Monthly rate = 18% / 12 = 1.5%
- 02Months = -ln(1 - $30,000 x 0.015 / $800) / ln(1.015)
- 03Months = -ln(0.4375) / ln(1.015) = 55.5 months (round to 56)
- 04Total paid = $800 x 56 = $44,800
- 05Total interest = $44,800 - $30,000 = $14,800
Ready to run the numbers?
Open Debt Avalanche Calculator