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) : 0

Total 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_debt

Variables

VariableDescriptionDefault
total_debtTotal Debt Balance(USD)30000
avg_rateWeighted Average Interest Rate(%)18
monthly_paymentTotal Monthly Payment(USD)800
monthly_rateDerived value= avg_rate / 12 / 100calculated

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
  1. 01Monthly rate = 18% / 12 = 1.5%
  2. 02Months = -ln(1 - $30,000 x 0.015 / $800) / ln(1.015)
  3. 03Months = -ln(0.4375) / ln(1.015) = 55.5 months (round to 56)
  4. 04Total paid = $800 x 56 = $44,800
  5. 05Total interest = $44,800 - $30,000 = $14,800

Ready to run the numbers?

Open Debt Avalanche Calculator