In plain English: each month you're charged interest on what you still owe, and whatever's left of your payment chips away at the balance.
Every payment on an interest-bearing debt splits into two parts: interest owed on the current balance, and principal that actually reduces what you owe. Downslope calculates this month by month using the standard amortization recurrence:
This is equivalent to the closed-form used in Excel's NPER, IPMT, and PPMT functions. The loop terminates when balance ≤ $0.005 (half a cent) or after 1,200 months, a hard ceiling that catches degenerate inputs like a payment that barely covers interest.
Concrete example: $10,000 balance, 6% APR, $200/month payment.
Excel check: =NPER(6%/12, -200, 10000) → 57.68 (rounds up to 58 payments; final payment is smaller)
=CUMIPMT(6%/12, 58, 10000, 1, 58, 0) → $1,538.04 ✓Most loans charge interest once a month. Some credit cards charge it daily instead, which adds up to nearly the same total, but not exactly the same.
Most US loans compound monthly. Two common exceptions are handled by converting the stated APR to an equivalent monthly rate before running the loop:
Once converted, all three run through the same monthly loop. The difference between monthly and daily compounding at 20% APR is roughly $0.83 per $1,000 per year, small but measurable over a multi-year payoff.
At 0% APR, there's no interest to subtract, every dollar you pay goes straight to the balance.
When a debt is marked 0% (no accruing interest), the monthly rate is set to exactly zero. The loop becomes simple division: balance ÷ monthly payment = months to payoff, with every dollar going directly to principal.
These numbers aren't just asserted, you can check every one yourself in a spreadsheet.
Each row below can be independently verified in Excel or Google Sheets. The Months column matches =CEILING(NPER(rate, -pmt, balance), 1) and Total interest matches =pmt*months - balance adjusted for the smaller final payment.
To reproduce in Excel: enter balance in A1, APR in B1, payment in C1. Then =NPER(B1/12, -C1, A1) gives fractional months; =CEILING(NPER(B1/12,-C1,A1),1) gives the integer payoff month. Total interest: =CUMIPMT(B1/12, CEILING(NPER(B1/12,-C1,A1),1), A1, 1, CEILING(NPER(B1/12,-C1,A1),1), 0) (note: returns a negative number, negate it).
Avalanche pays your most expensive debt first to save the most money overall. Snowball pays your smallest debt first for quick wins. Both get you to debt-free, just by different paths.
Both strategies pay minimums on all debts, then concentrate any extra budget on one target debt. The difference is which debt gets targeted.
When a debt is fully paid off, its freed minimum payment rolls into the budget for the next target. This is the "debt snowball" mechanic that Dave Ramsey popularised, and it applies to both strategies. The avalanche method just directs the growing budget at the highest-rate debt instead of the smallest balance.
Two debts, $100/month extra available:
In this example, avalanche finishes one month faster and saves $158.89 in interest. The gap widens when rate differences are larger (e.g., a 29.99% card vs. an 8% car loan). The gap narrows or reverses when balances are very close in size, because the snowball frees up the full minimum payment earlier.
The portfolio simulator runs a month-by-month loop across all debts simultaneously. Each month it:
PMT, IPMT, PPMT, NPER, and CUMIPMT worksheet functions.
This is a planning tool, not financial advice. Actual payoff timelines depend on your lender's billing cycle, minimum payment recalculation rules, and any fees not reflected here.