Most debt payoff calculators online give you one number: "debt-free in 26 months." I wanted to see the whole thing: what to pay each debt every month, when each one hits zero, and what changes if you add $50. And I wanted it in plain spreadsheet formulas, no Apps Script and no VBA, so it runs the same in Google Sheets, Excel and LibreOffice.
This post walks through the engine: how to rank the debts, how to model one month, and how the "snowball" rollover falls out of a single MIN(). At the end there's a short Python simulation I used to check the sheet to the cent.
The rules being modeled
The debt snowball is simple to state:
- Pay the minimum on every debt.
- Put all extra money on the debt with the smallest balance.
- When a debt is paid off, its payment rolls into the next one, so the total monthly payment never drops until everything is gone.
(The avalanche method is identical except step 2 targets the highest APR. The engine below handles both. Only the ranking changes.)
Rule 3 is the part that makes a spreadsheet tricky: the month a debt dies, its leftover money has to flow to the next debt in the same month.
Sheet 1: Debts (inputs)
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | Debt | Balance | APR | Minimum | Snowball rank |
| 2 | Card A | 600 | 24% | 25 | |
| 3 | Card B | 2400 | 19.99% | 60 | |
| 4 | Car loan | 7500 | 7.5% | 230 |
Plus two cells:
-
B9: extra per month (here150) -
B10: the monthly debt budget, i.e. all the minimums plus the extra:
=SUMIF(B2:B7,">0",D2:D7)+B9 That's $465 in this example, and it stays fixed for the life of the plan. That's the whole snowball, really: a constant budget.
These numbers are an illustration, not anyone's real debts.
Ranking without ties
Snowball order is "smallest balance first." RANK() gives two equal balances the same rank, which breaks the lookup later. The fix is a COUNTIF pair that counts everything smaller, then breaks ties by row order:
E2: =IF(N(B2)>0, COUNTIF($B$2:$B$7,"<"&B2) + COUNTIF($B$2:B2,B2), "") The second COUNTIF has a half-absolute range ($B$2:B2), so it counts how many times this balance has appeared so far. Two $500 debts become rank 1 and 2 instead of 1 and 1.
For avalanche, flip it to "highest APR first", ignoring empty rows:
F2: =IF(N(B2)>0, COUNTIFS($B$2:$B$7,">0",$C$2:$C$7,">"&C2) + COUNTIFS($B$2:B2,">0",$C$2:C2,C2), "") Fill both down to row 7 (six debt rows).
Sheet 2: Schedule (the engine)
The trick that keeps the formulas short: don't lay the schedule out by debt, lay it out by payoff slot. Slot 1 is "whichever debt is paid first", slot 2 is the next one, and so on. Then "the next debt" is always the block to the right, and the rollover is a simple left-to-right cascade.
Each slot gets six columns. Slot 1 is C:H, slot 2 is I:N, slot 3 is O:T:
| Start | Interest | Minimum | Extra | Extra so far | End |
|---|
Rows 2 to 5 of each block pull that slot's debt from the Debts sheet with INDEX/MATCH on the rank. For slot 2 (column I):
I2: =IFERROR(INDEX(Debts!$A$2:$A$7, MATCH(2, Debts!$E$2:$E$7, 0)), "") name I3: =IFERROR(INDEX(Debts!$B$2:$B$7, MATCH(2, Debts!$E$2:$E$7, 0)), 0) balance I4: =IFERROR(INDEX(Debts!$C$2:$C$7, MATCH(2, Debts!$E$2:$E$7, 0)), 0) APR I5: =IFERROR(INDEX(Debts!$D$2:$D$7, MATCH(2, Debts!$E$2:$E$7, 0)), 0) minimum To switch the whole engine to avalanche, point the MATCH at column F instead of E. (In a finished version, a dropdown plus CHOOSE() does this.) The IFERROR means unused slots become zero-balance debts that quietly do nothing.
Month 1 starts on row 8. Column A is the month number and column B is the extra pool: the budget minus every minimum actually due this month.
B8: =MAX(0, Debts!$B$10 - (E8 + K8 + Q8)) E, K and Q are the three "Minimum" columns. This is where the rollover comes from. When a debt is paid off, its minimum drops to 0, so the pool grows by exactly that amount the next month. Nothing has to "know" a debt was paid off.
Now the six formulas for slot 2, row 9 (month 2). Slot 1 and slot 3 are the same pattern shifted by six columns.
I9: =N8 Start = last month's End J9: =ROUND(I9*I$4/12, 2) Interest: APR/12, to the cent K9: =MIN(I$5, I9+J9) Minimum, but never more than is owed L9: =MAX(0, MIN(I9+J9-K9, $B9-G9)) Extra: what's owed after the minimum, capped by what's left in the pool M9: =G9+L9 Extra so far: running total across slots N9: =ROUND(I9+J9-K9-L9, 2) End balance In month 1 (row 8) the Start cell is =I$3 instead of =N7.
L9 is the whole snowball in one line. G9 is slot 1's "extra so far", so $B9-G9 is the pool left after slot 1 has taken what it needs. If slot 1 only needs $78.17 of a $150 pool, slot 2 gets the remaining $71.83 in the same month. Slot 1 has no slot to its left, so its formulas use 0 in place of the previous slot's running total:
F8: =MAX(0, MIN(C8+D8-E8, $B8-0)) G8: =0+F8 Add a total-balance column (U8: =H8+N8+T8) and a total-interest column (V8: =D8+J8+P8), fill rows 8 to 367 (30 years), and the results are two formulas:
Months to debt-free: =COUNTIF(U8:U367, ">0.005") + 1 Total interest: =SUM(V8:V367) The 0.005 threshold instead of 0 avoids floating-point ghosts like 1.2E-13 keeping a debt "alive" for an extra month.
What it produces
For the example above ($465 a month in total: $315 of minimums plus $150 extra), the first five months of slots 1 and 2:
| Month | Pool | Card A start | Card A extra | Card A end | Card B extra | Card B end |
|---|---|---|---|---|---|---|
| 1 | 150 | 600.00 | 150.00 | 437.00 | 0 | 2,379.98 |
| 2 | 150 | 437.00 | 150.00 | 270.74 | 0 | 2,359.63 |
| 3 | 150 | 270.74 | 150.00 | 101.15 | 0 | 2,338.94 |
| 4 | 150 | 101.15 | 78.17 | 0.00 | 71.83 | 2,246.07 |
| 5 | 175 | 0 | 0 | 0 | 175.00 | 2,048.49 |
Month 4 is the rollover inside a month. Month 5 is the pool growing by Card A's $25 minimum. Carrying it through:
| Plan | Debt-free in | Total interest |
|---|---|---|
| Minimums only | 67 months | $2,725.36 |
| Snowball, $150 extra | 26 months | $1,144.11 |
For "minimums only," set the pool column to 0 on a copy of the sheet.
Checking it against an independent simulation
Spreadsheets fail quietly: one wrong $ in a fill-down and month 200 is garbage. So I checked every month against a plain Python version written separately from the sheet:
def snowball(debts, extra, months=360): # debts: list of (name, balance, apr, minimum) order = sorted(range(len(debts)), key=lambda i: (debts[i][1], i)) # smallest first, ties by row bal = [d[1] for d in debts] budget = sum(d[3] for d in debts) + extra total_interest, m = 0.0, 0 while any(b > 0.005 for b in bal) and m < months: m += 1 interest = [round(b * d[2] / 12, 2) for b, d in zip(bal, debts)] mins = [min(d[3], b + i) if b > 0.005 else 0 for b, i, d in zip(bal, interest, debts)] pool = max(0, budget - sum(mins)) for k in order: if bal[k] <= 0.005: continue extra_k = max(0, min(bal[k] + interest[k] - mins[k], pool)) pool -= extra_k total_interest += interest[k] bal[k] = round(bal[k] + interest[k] - mins[k] - extra_k, 2) return m, round(total_interest, 2) print(snowball([("Card A", 600, .24, 25), ("Card B", 2400, .1999, 60), ("Car loan", 7500, .075, 230)], 150)) # (26, 1144.11) I rebuilt the sheet with openpyxl, recalculated it headless in LibreOffice (soffice --headless --convert-to xlsx), read the values back with data_only=True and compared month by month. It matched to the cent. Edge cases worth testing if you build your own:
- A minimum smaller than the interest. That debt grows forever on minimums alone. Flag it (
=IF(min <= ROUND(bal*apr/12,2), "needs extra", "")) instead of letting the sheet run 30 years. - 0% APR debts. These are fine, but they make snowball and avalanche orders diverge the most.
- Two equal balances. This is why the tie-breaking
COUNTIFmatters. - A debt that's already $0. The
N(B2)>0guards keep it out of the ranking.
Limits of the model
Real lenders compute interest daily, card minimums usually shrink as the balance falls, and rates and fees change. Treat the output as a planning estimate, and re-enter balances from statements once a month. If you keep paying the plan's amount when a card's minimum falls, the plan stays valid. If you pay the new lower minimum instead, the snowball stalls.
Why build it this way
- No scripts means no permission prompts, and it works offline in Excel.
- Slot layout turns "the next debt" into "the block to the right," so the rollover is one formula instead of a lookup maze.
- A fixed budget cell is the actual behavior change the method asks for. The sheet just makes the consequence visible.
If you build one, I'd like to hear how you handled the what-if scenarios (I used three copies of the engine sheet with different extra amounts).
Written with AI assistance. Every formula above was built in a real workbook, recalculated in LibreOffice and checked against the Python simulation shown. The example debts are made up. Educational, not financial advice. Disclosure: the Debt Free Toolkit account makes and sells debt-payoff spreadsheets and printables.
