How our calculators work
Last updated 1 December 2026
Every formula, rounding rule and assumption, in one place. The numbers in the examples below are produced by the same code that runs the tools, generated when this page is built.
Money is whole cents, never decimals
Computers store decimal fractions inexactly: the classic example is that 0.1 + 0.2 does not equal0.3. On a budgeting site that shows up as totals that are a penny out, or a payoff schedule whose final payment leaves two cents behind.
So we never use decimals for money. Every amount is an integer number of cents from the moment you type it until the moment it is displayed. $1,234.56 is stored as 123456. The only division happens when formatting a number for your screen, and that result never feeds back into a calculation.
Rates are stored as integers too: an APR of 22.99% is held as 22990 thousandths of a percent, and a savings rate of 4.00% as 400 basis points.
Rounding is half-up, like your statement
When a division does not come out exactly, we round half away from zero — so half a cent rounds up. This is what consumers see on statements. Some financial systems use "banker's rounding" (half to even), which would make our figures disagree with the user's own paperwork for no visible reason.
| Case | Division | Result |
|---|---|---|
| 0.5 cents up | 5 / 10 | 1 |
| 1.5 cents up | 15 / 10 | 2 |
| negative 0.5 away from zero | -5 / 10 | -1 |
| 0.4 cents down | 4 / 10 | 0 |
The division itself uses exact integer arithmetic with a remainder, not a floating-point quotient, so the rounding decision cannot be thrown off by a representation error.
What counts as a valid amount
We accept what people actually type, including currency symbols and thousands separators, and we reject anything ambiguous rather than guessing:
| You type | Stored as |
|---|---|
1,234.56 | 123456 |
$1234.5 | 123450 |
0.07 | 7 |
-3.10 | -310 |
1.234 | rejected |
abc | rejected |
More than two decimal places is rejected rather than silently rounded, because we cannot know whether you meant to type it.
Turning any frequency into a monthly figure
A year has 52 weeks, 26 fortnights and 12 months, so being paid every two weeks is not the same as being paid twice a month — it is 26 payments, not 24. We convert each line separately and round it to the cent, then add the lines up. Converting per line is why the amounts shown beside each row always add up to the total shown at the bottom.
| Frequency | Maths | Monthly |
|---|---|---|
| Weekly | x 52 / 12 | $433.33 |
| Every 2 weeks | x 26 / 12 | $216.67 |
| Twice a month | x 2 | $200.00 |
| Monthly | unchanged | $100.00 |
| Every 3 months | / 3 | $33.33 |
| Yearly | / 12 | $8.33 |
The 50/30/20 targets
Needs get 50% of take-home pay and wants 30%; savings takes whatever is left rather than a separate 20% calculation. That is deliberate: rounding three percentages independently can leave the three targets adding up to a cent more or less than your income. Taking the remainder makes them sum exactly.
The split comes from All Your Worth: The Ultimate Lifetime Money Plan (2005) by Elizabeth Warren and Amelia Warren Tyagi. It is a reference point, not a rule, and we show your actual percentages beside the targets rather than grading you against them.
Debt interest and payment order
Monthly interest is the APR divided by 12, applied to the balance at the start of the month, rounded to the cent. In integer terms that is balance x aprMilli / 1,200,000:
| Balance | APR | Interest |
|---|---|---|
| $5,000.00 | 22.99% | $95.79 |
| $1,000.00 | 18% | $15.00 |
| $1,234.57 | 19.99% | $20.57 |
| $0.01 | 99.999% | $0.00 |
Each month the simulation does three things, in this order:
- adds interest to every unpaid balance;
- pays every minimum, in the plan's priority order;
- puts everything left — your extra, plus minimums freed by debts already cleared — onto the target debt, cascading to the next one if it clears mid-month.
Priority is balance ascending for snowball and APR descending for avalanche, with ties broken by the other field and then by the order you entered them, so the result is deterministic.
Two safeguards exist because testing found real failures. If the whole monthly payment cannot beat the first month's interest, we report that the debt never clears instead of printing a fictional date. And if the total owed ever more than doubles, we stop and say so — a runaway balance would otherwise grow for decades and eventually exceed the largest integer we can hold exactly.
Savings interest
An annual percentage yield is converted to a monthly rate by taking the twelfth root, which is the mathematically correct way to compound a yearly figure monthly — not simply dividing by 12. A 4.00% APY becomes a monthly rate of 0.003273740, and 5.00% becomes 0.004074124. We round that rate to twelve decimal places so every browser produces identical results.
Splitting a goal into instalments
When a total does not divide evenly, the remainder goes into the final instalments rather than being spread by rounding every one. Splitting $1,000.01 over seven weeks in whole units gives $142.00, $143.00, $143.00, $143.00, $143.00, $143.00, $143.01 — which adds up to exactly $1,000.01.
Savings instalments round up rather than half-up, because an instalment rounded down leaves you short at the due date.
Shuffled challenges are reproducible
A shuffled savings challenge uses a seeded generator (mulberry32) with a Fisher-Yates shuffle, using only 32-bit integer operations. That means the same seed produces the same grid in every browser, which is what makes a shared link show the recipient exactly your challenge.
How this is tested
Every formula exists once, in a reference implementation. The live code is checked against a fixed set of expected results on every change — currently several hundred cases covering all six tools — plus property tests that run thousands of randomised inputs looking for cases a human would not think to try. Those property tests have already found two real bugs: duplicate debt identifiers, and the runaway balance described above.
We also test that no network request ever contains an amount you typed. That one is not about arithmetic; it is how we keep the privacy promise honest rather than merely stated.
Where our numbers stop being realistic
Being clear about the limits matters more than looking precise. The disclaimer lists every assumption, but the two that matter most:
- Card minimums shrink in real life. We hold the minimum at the figure you enter. Most cards set it as a percentage of the balance, so paying only the minimums takes even longer than we show.
- Lenders often charge interest daily. We charge it monthly on the opening balance, so a real statement can differ from our total by a small amount over a long plan.
Corrections
Changes to any formula are recorded here with the date and what changed. No corrections have been needed yet — this site launched with the calculations above.
If you think a figure is wrong, please email us with the inputs you used. Reviewed by Rehan Shabbir, 1 December 2026.