About the Math
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:
interest = balance × monthly_rate
balance = balance + interest − payment
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.
Stuck debt detection. If a payment is at or below the monthly interest charge, the balance never decreases. Downslope flags this with a red warning rather than running an infinite loop. Fix: raise the payment or lower the APR.
2. Month-by-month walkthrough
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)
| Month |
Opening balance |
Interest (0.5%) |
Principal |
Payment |
Closing balance |
| 1 | $10,000.00 | $50.00 | $150.00 | $200.00 | $9,850.00 |
| 2 | $9,850.00 | $49.25 | $150.75 | $200.00 | $9,699.25 |
| 3 | $9,699.25 | $48.50 | $151.50 | $200.00 | $9,547.75 |
| 4–56 | …each month the interest charge falls as the balance shrinks… | |
| 57 | $335.67 | $1.68 | $198.32 | $200.00 | $137.35 |
| 58 | $137.35 | $0.69 | $137.35 | $138.04 | $0.00 |
- Total paid: 57 × $200 + $138.04 = $11,538.04
- Total interest: $11,538.04 − $10,000 = $1,538.04
- Excel check:
=CUMIPMT(6%/12, 58, 10000, 1, 58, 0) → $1,538.04 ✓
Notice that as the balance falls, more of each payment goes to principal. This is why extra payments early in a loan save disproportionately more interest than the same dollar paid later.
3. Compounding conventions
Most US loans compound monthly. Two common exceptions are handled by converting the stated APR to an equivalent monthly rate before running the loop:
Monthly (default — US mortgages, most loans)
monthly_rate = APR ÷ 12
Daily (many US credit cards)
monthly_rate = (1 + APR ÷ 365)365/12 − 1
Semiannual — Canadian mortgages
monthly_rate = (1 + APR ÷ 2)2/12 − 1
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.
4. 0% / interest-free debt
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.
monthly_rate = 0
interest = balance × 0 = $0.00
balance = balance − payment
Promo APR expiration (Pro). Many 0% offers carry deferred interest: if the balance isn't cleared before the promo period ends, the lender back-charges interest on the original balance. Downslope lets you set an expiration date and shows a warning banner 90 days before — roughly the point at which you need to decide whether your current payment pace will clear the balance in time.
5. Excel validation — 5 test cases
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.
| Scenario |
Balance |
APR |
Payment/mo |
Months |
Total interest |
Excel formula |
| Personal loan (monthly) |
$10,000 |
6.00% |
$200 |
58 |
$1,538.04 |
=NPER(6%/12,‑200,10000) |
| Credit card (monthly) |
$5,000 |
19.99% |
$150 |
50 |
$2,357.17 |
=NPER(19.99%/12,‑150,5000) |
| 0% promo card |
$2,400 |
0.00% |
$200 |
12 |
$0.00 |
balance ÷ payment = 12 |
| Car loan (monthly) |
$25,000 |
5.50% |
$500 |
57 |
$3,445.78 |
=NPER(5.5%/12,‑500,25000) |
| High-rate card — near minimum |
$8,000 |
24.00% |
$300 |
39 |
$3,686.52 |
=NPER(24%/12,‑300,8000) |
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).
All five cases were computed from the same recurrence formula used inside Downslope. If you find a discrepancy of more than $0.01, please
open an issue with your inputs.
6. Avalanche vs. snowball
Both strategies pay minimums on all debts, then concentrate any extra budget on one target debt. The difference is which debt gets targeted.
- Avalanche — target the highest APR first. Minimises total interest paid.
- Snowball — target the smallest balance first. Produces more early payoffs for psychological momentum.
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.
Worked example
Two debts, $100/month extra available:
- Debt A — $3,000 at 20% APR, $80/month minimum
- Debt B — $1,500 at 8% APR, $60/month minimum
Avalanche — attack Debt A (20%) first
Payment to A$180/mo
A paid offmonth 20
B paid offmonth 22
Total interest$681.19
Snowball — attack Debt B ($1,500) first
Payment to B$160/mo
B paid offmonth 10
A paid offmonth 23
Total interest$840.08
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.
Neither strategy is universally superior. The right choice depends on your specific balances, rates, and whether behavioural momentum matters for you personally. Downslope shows you both side by side so you can decide.
How Downslope simulates the portfolio
The portfolio simulator runs a month-by-month loop across all debts simultaneously. Each month it:
- Accrues interest on every active debt
- Pays the minimum on every active debt
- Sorts remaining active debts by the chosen strategy (rate or balance)
- Applies the extra budget to the top-ranked debt until it is paid off, then cascades to the next
- Rolls freed minimums into the budget for the following month