Show the work, then prove it
A calculator that looks right isn't the same as one that is right. This page says exactly what we check, what passes today, and what we haven't covered yet.
Checked against worked examples · last full test run: Sep 29, 2026What “checked against worked examples” means
- The formula is written out on the tool page, with a worked example using your own numbers.
- The code is checked against worked examples. Each calculation engine has automated golden-number tests: known inputs whose correct answers were worked out independently, including cases that guard against bugs we've found before.
- Constants cite a dated primary source (tax tables, survey data, published research).
- Corrections are logged below, so you can see what changed and when.
The badge on a calculator, “Checked against worked examples” with a date, says exactly this: on that date every engine the page runs on passed its tests, each test comparing the code's answer with a worked example whose answer was recomputed independently of the code. A calculator goes live only when that is true. It is our own testing, not a third-party audit and not a review by a licensed adviser, and it does not make an estimate advice (see the terms).
Where things stand
The engines
Open an engine to see the specific checks it passes.
aca-ptc-2026ACA premium tax credit: applicable percentages, the 400% poverty-line cliff, and the credit at any income62/62 ✓
- 2026 coverage uses the 2025 guidelines: $15,650 for one person plus $5,500 for each additional (48 states + DC)
- 2027 coverage uses the 2026 guidelines: $15,960 plus $5,680 for each additional
- Alaska and Hawaii have their own, higher guidelines
- a household size below one is treated as one person; a fractional size is rounded
- refuses a non-numeric household size
- 2026 coverage: $62,600 for one, $84,600 for two, $128,600 for four (the figures widely reported for 2026)
- 2027 coverage: $63,840 for one, $132,000 for four
- Alaska and Hawaii
- the tables are typed exactly as published
- 2026: 50% of the poverty line → 0.021
- 2026: 100% of the poverty line → 0.021
- 2026: 132.9% of the poverty line → 0.021
- 2026: 133% of the poverty line → 0.0314
- 2026: 141.5% of the poverty line → 0.03665
- 2026: 150% of the poverty line → 0.0419
- 2026: 175% of the poverty line → 0.05395
- 2026: 200% of the poverty line → 0.066
- 2026: 225% of the poverty line → 0.0752
- 2026: 250% of the poverty line → 0.0844
- 2026: 275% of the poverty line → 0.092
- 2026: 300% of the poverty line → 0.0996
- 2026: 350% of the poverty line → 0.0996
- 2026: 400% of the poverty line → 0.0996
- 2027: 100% of the poverty line → 0.0215
- 2027: 133% of the poverty line → 0.0323
- 2027: 141.5% of the poverty line → 0.03765
- 2027: 175% of the poverty line → 0.0554
- 2027: 225% of the poverty line → 0.0772
- 2027: 275% of the poverty line → 0.0944
- 2027: 300% of the poverty line → 0.1022
- 2027: 400% of the poverty line → 0.1022
- never decreases as income rises (no downward step anywhere in the table)
- MAGI 40000 (255.5911% of the line) → applicable 0.08609968, you pay 3443.9872, credit 8556.0128
- MAGI 45000 (287.5399% of the line) → applicable 0.09581214, you pay 4311.5463, credit 7688.4537
- MAGI 46950 (300% of the line) → applicable 0.0996, you pay 4676.22, credit 7323.78
- MAGI 50000 (319.4888% of the line) → applicable 0.0996, you pay 4980, credit 7020
- MAGI 62600 (400% of the line) → applicable 0.0996, you pay 6234.96, credit 5765.04
- MAGI 20000 (127.7955% of the line) → applicable 0.021, you pay 420, credit 11580
- MAGI 30000 (191.6933% of the line) → applicable 0.06199617, you pay 1859.885, credit 10140.115
- one dollar over 400% of the poverty line ends the whole credit
- the cost of the last dollar over the cliff is the credit at the cliff
- room before the cliff
- below the poverty line there is no credit (100% is the floor)
- flags the range where adults in Medicaid-expansion states are usually eligible for Medicaid instead (100% up to 138%)
- the table steps up at 133% of the line, so the credit dips there
- the credit can never exceed the premium of the plan you enroll in: a cheaper plan than the benchmark
- a benchmark premium smaller than the required contribution leaves no credit even below the cliff — and nothing to lose at the cliff
- credit plus what you pay always equals the premium of the plan (benchmark by default)
- the credit never rises as income rises, from the poverty line to past the cliff
- MAGI 20000 → 0.021
- MAGI 30000 → 0.15439233
- MAGI 43037.5 → 0.1756
- MAGI 50000 → 0.0996
- MAGI 62600 → 0.0996
- agrees with the change in credit over one real dollar
- is zero where there is no credit to lose (over the cliff, below the poverty line, or when the credit is already zero)
- a couple (household of 2), $2,000/month benchmark: credit at MAGI 30,000 and at the cliff
- 2027 coverage: the table is higher (10.22% in the top tier) and the cliff moves to $63,840
- Alaska single: MAGI 70,000 is still under its $78,200 cliff, credit $5,028
- extreme and empty inputs give clean numbers, never NaN
- refuses non-numeric inputs instead of passing NaN through
- a year with no published rules is refused rather than guessed
asset-allocationCalculation engine15/15 ✓
- has every year from 1928 to 2025 once, in order
- reproduces the workbook’s known years and its own 1928-2025 geometric averages
- every statistic matches for 13 stock shares and both kinds of "rest"
- the loss-limit ceilings match
- 60/40 hand check: 1931 is the worst year, then 1937 and 2022
- all bonds lost 17.8% in 2022, which no stock share below the ceiling improves, so 15% has no bond answer but has a cash one
- more stocks mean a higher average year and a worse worst year, on both kinds of rest
- a mix return is the weighted sum, and the share is clamped to 0-100
- "minus your age" rules
- Vanguard’s glide path: 90 to 25 years out, 50 at retirement, 30 from seven years after
- Pfau and Kitces’ rising path: 30 at retirement, +1 a year, 60 after 30 years (the paper’s own example)
- Vanguard’s international split adds to 100 for every stock share
- matches the reference for 16 mixes and hurdles
- all stocks beat 6% a year in 72 of 89 ten-year stretches, and never beat 22%
- shorter and longer windows, and odd inputs
asset-locationCalculation engine39/39 ✓
- case 0: 150000 / 200000 / 70000, 70% stocks, 31 years
- case 1: 150000 / 200000 / 70000, 0% stocks, 31 years
- case 2: 150000 / 200000 / 70000, 100% stocks, 31 years
- case 3: 150000 / 200000 / 70000, 50% stocks, 31 years
- case 4: 150000 / 200000 / 70000, 30% stocks, 31 years
- case 5: 150000 / 200000 / 70000, 70% stocks, 0 years
- case 6: 150000 / 200000 / 70000, 70% stocks, 1 years
- case 7: 150000 / 200000 / 70000, 70% stocks, 10 years
- case 8: 150000 / 200000 / 70000, 70% stocks, 40 years
- case 9: 150000 / 200000 / 70000, 70% stocks, 31 years
- case 10: 150000 / 200000 / 70000, 70% stocks, 31 years
- case 11: 150000 / 200000 / 70000, 70% stocks, 31 years
- case 12: 0 / 200000 / 70000, 70% stocks, 31 years
- case 13: 150000 / 0 / 70000, 70% stocks, 31 years
- case 14: 150000 / 200000 / 0, 70% stocks, 31 years
- case 15: 500000 / 0 / 0, 70% stocks, 31 years
- case 16: 150000 / 200000 / 70000, 70% stocks, 31 years
- case 17: 150000 / 200000 / 70000, 70% stocks, 31 years
- case 18: 150000 / 200000 / 70000, 70% stocks, 31 years
- case 19: 150000 / 200000 / 70000, 70% stocks, 31 years
- case 20: 150000 / 200000 / 70000, 70% stocks, 31 years
- case 21: 20000 / 20000 / 400000, 70% stocks, 31 years
- case 22: 150000 / 200000 / 70000, 70% stocks, 31 years
- case 23: 0 / 100000 / 0, 60% stocks, 5 years
- case 24: 0 / 0 / 250000, 20% stocks, 5 years
- case 25: 50000 / 0 / 250000, 20% stocks, 15 years
- case 26: 50000 / 600000 / 0, 20% stocks, 30 years
- case 27: 0 / 100000 / 0, 20% stocks, 5 years
- case 28: 0 / 0 / 30000, 90% stocks, 30 years
- case 29: 50000 / 100000 / 30000, 90% stocks, 30 years
- case 30: 50000 / 0 / 250000, 90% stocks, 5 years
- case 31: 50000 / 600000 / 0, 90% stocks, 30 years
- case 32: 50000 / 100000 / 30000, 20% stocks, 15 years
- one year of each
- the same mix holds the overall share in every account; the best and worst move the stock dollars around it
- the best is never below the same mix, and the same mix is never below the worst
- with no taxes or with a single account, location makes no difference
- the ranking lists all three accounts, best first, and the yearly gain compounds back to the total gain
- bad numbers count as zero
backdoor-roth-2026Calculation engine12/12 ✓
- $50,000 of pre-tax IRA money: 13.04% of a $7,500 conversion is tax-free, $6,521.74 is taxable
- no other IRA money: the whole conversion is tax-free
- earlier basis counts: $100,000 with $20,000 of basis → 25.58% tax-free, $5,581.40 taxable, $25,581.40 of basis left
- converting more than the contribution keeps the same share: $30,000 converted → $26,086.96 taxable, $3,586.96 of basis left
- other distributions count in the denominator and use basis too
- converting every dollar leaves nothing behind and the basis is fully used
- a pool that is all after-tax money has a share of 100% and keeps its basis: $20,000 of basis in a $20,000 IRA
- a larger IRA makes more of it taxable, at $7,500: 0 → 0, 10,000 → 4,285.71, 25,000 → 5,769.23, 100,000 → 6,976.74, 250,000 → 7,281.55
- the $8,600 catch-up-age contribution: 14.68% tax-free, $7,337.88 taxable
- bad or negative inputs count as zero
- single: full up to $153,000, reduced to $168,000, none above; joint $242,000 to $252,000
- $7,500, or $8,600 from age 50
barista-fireBarista FIRE number: what you need when part-time income covers part of your spending35/35 ✓
- fullFireNumber ignores part-time income entirely
- baristaNumber only funds the gap after part-time income
- gapCoveredPct is the share of expenses part-time income covers
- reaches the barista number in 189 months (15 years), independently computed
- caps gapCoveredPct at 100 when part-time income exceeds expenses
- barista number is always <= full FIRE number for any positive part-time income
- golden (the legacy inputs, part-time from 45 to 60): $1,048,079 pays the gap for 15 years and is worth $1,250,000 at 60
- is the larger of the two tests and never above the full FIRE number, over a grid
- a plan that starts at the number and pays the gap every month ends at the full FIRE number (forward simulation)
- zero real return is arithmetic on paper: the gap costs $30,000 × 15 years on top of the $1,250,000, so part-time work cannot lower the number
- with a strong real return and a long stretch, gap ÷ withdrawal rate is the larger test: it is the legacy $750,000
- when part-time income covers all the spending, the number is the Coast FIRE number for the hand-off age
- no part-time income: the number is the full FIRE number, whatever the return and the withdrawal rate
- a hand-off age that is not after today leaves no part-time years: the number is the full FIRE number
- is never below the legacy gap ÷ rate number: the hand-off can only add the missing cost
- leaves calcBaristaFire alone: the legacy golden is unchanged
- more part-time income never raises it
- part-time work that lasts longer never raises it (at a real return above zero)
- a higher withdrawal rate never raises it
- a higher return never raises it
- spending more never lowers it
- golden (30 → 65, the legacy money): the balance first covers what is needed in month 261, 36 months before full FIRE
- agrees with the reference model month for month over a grid of inputs
- has a closed form to check the search against: D(k) = (1+r)^k · (D0 + c/r) − c/r, with D the balance minus the need and c = saving + gap ÷ 12
- already holding the number means month 0
- a balance that stays short reports that it is not reached, at the 60-year cap
- a hand-off that arrives before the balance does: part-time work cannot bring the date forward, and the date is the full FIRE number
- a balance that arrives in exactly the month the part-time work ends is the full FIRE number, not a part-time exit
- more savings or a bigger portfolio never delay the date; nor does a longer stretch of part-time work or more of it
- starts today at the portfolio and at the number, and ends at the hand-off
- what is needed rises to the full FIRE number at the hand-off and matches the reference in every month drawn
- the balance is the saving path up to the switch month and the plan path after it (pay the gap, save no more)
- the plan reaches the hand-off with the full FIRE number in hand, over by less than one month of saving plus gap, grown
- includes the switch month, so a marker sits on a point of the line
- when there is no part-time stretch the chart still has a line to draw, at least ten years long, at the full FIRE number
bonus-tax-2026Calculation engine10/10 ✓
- every field of every case matches
- 22% withheld, 24% owed, 765 of payroll tax
- the check pays 7,035 and 6,835 is kept after filing
- lowers the income tax and not the payroll tax, and adds to the total kept
- is capped by the bonus and by the room under the $24,500 limit
- no bonus is all zeros
- withholding rises to 37% above $1 million of supplemental pay in the year
- a low salary can be over-withheld: the bonus is taxed at 10% and 12% but 22% is withheld
- a state rate takes its share of the taxable part
- junk in, no NaN out
capital-gains-2026Calculation engine19/19 ✓
- single, $40,000 of income: $25,550; with $10,000 of gains already on the return: $15,550
- income below the standard deduction adds the unused deduction: $55,550 at $10,000
- joint $90,000: $41,100; head of household $60,000: $30,350
- none once ordinary taxable income is past the 0% band ($140,650 single)
- is exactly where the tax starts: the last free dollar adds nothing, the next one adds 15 cents
- itemizing changes the room: $30,000 of itemized deductions on $40,000 of income leaves $10,000 taxable, so $39,450 of room
- bad income is treated as zero
- $140,650 of income and a $20,000 gain: all at 15%, $3,000, no NIIT
- $40,000 of income and a $30,000 gain: 25,550 at 0% and 4,450 at 15% = $667.50
- a gain that fits in the room costs nothing, and the next dollar is priced at 15%
- joint $90,000 and a $50,000 gain: 41,100 at 0%, 8,900 at 15% = $1,335
- income under the deduction: the gain first fills the unused deduction, and all of it counts as 0%
- head of household $60,000 and a $30,000 gain: fits in the 30,350 of room, so $0
- above the NIIT threshold: $250,000 and a $100,000 gain is 15,000 + 3,800; $500,000 and $200,000 is 36,920 + 7,600 with 138,400 at 20%
- the NIIT applies only to the part of income over its threshold: $190,000 and a $50,000 gain adds 1,520
- a state rate is applied to the gain: 5% of $20,000 is $1,000
- no gain, or a bad one, costs nothing and has a zero effective rate
- the NIIT thresholds are the statutory ones
- the total never falls as the gain grows
car-costCalculation engine41/41 ✓
- case 0: 39376 car, 15% down, 7.14% for 60 months, 5 years
- case 1: 39376 car, 15% down, 7.14% for 60 months, 1 years
- case 2: 39376 car, 15% down, 7.14% for 60 months, 3 years
- case 3: 39376 car, 15% down, 7.14% for 60 months, 7 years
- case 4: 39376 car, 15% down, 7.14% for 60 months, 10 years
- case 5: 39376 car, 15% down, 0% for 60 months, 5 years
- case 6: 39376 car, 100% down, 7.14% for 60 months, 5 years
- case 7: 39376 car, 0% down, 7.14% for 60 months, 5 years
- case 8: 39376 car, 15% down, 7.14% for 36 months, 5 years
- case 9: 39376 car, 15% down, 7.14% for 84 months, 8 years
- case 10: 39376 car, 15% down, 7.14% for 60 months, 5 years
- case 11: 39376 car, 15% down, 7.14% for 60 months, 5 years
- case 12: 39376 car, 15% down, 7.14% for 60 months, 5 years
- case 13: 39376 car, 15% down, 7.14% for 60 months, 5 years
- case 14: 0 car, 15% down, 7.14% for 60 months, 5 years
- case 15: 39376 car, 15% down, 7.14% for 60 months, 25 years
- case 16: 12000 car, 20% down, 7.14% for 60 months, 4 years
- case 17: 85000 car, 15% down, 9.5% for 72 months, 5 years
- case 18: 39376 car, 15% down, 19.9% for 72 months, 6 years
- case 19: 65000 car, 15% down, 7.14% for 48 months, 8 years
- case 20: 22000 car, 0% down, 4.5% for 72 months, 5 years
- case 21: 39376 car, 30% down, 0% for 36 months, 2 years
- case 22: 22000 car, 15% down, 4.5% for 36 months, 12 years
- case 23: 65000 car, 30% down, 12% for 84 months, 2 years
- case 24: 39376 car, 0% down, 7.14% for 48 months, 5 years
- case 25: 8000 car, 10% down, 12% for 36 months, 8 years
- case 26: 8000 car, 30% down, 7.14% for 72 months, 5 years
- case 27: 65000 car, 30% down, 4.5% for 48 months, 8 years
- case 28: 39376 car, 15% down, 4.5% for 48 months, 2 years
- case 29: 39376 car, 0% down, 4.5% for 84 months, 12 years
- case 30: 65000 car, 15% down, 0% for 60 months, 5 years
- case 31: 8000 car, 0% down, 4.5% for 84 months, 5 years
- case 32: 39376 car, 0% down, 12% for 72 months, 12 years
- the AAA-style five-year example
- the yearly depreciation rate that reproduces AAA’s 2026 five-year loss
- a paid-cash car has no interest, and a longer stay than the loan has no payments after it
- selling before the loan ends pays off the balance from the sale
- more miles, worse mileage and dearer gas cost more; a zero rate costs less interest
- no miles means no per-mile figure and no fuel
- the years are whole, at least 1 and at most 20
- bad numbers count as zero
cash-yieldCalculation engine10/10 ✓
- converts a 4.37% coupon-equivalent yield to 4.417742% a year
- the dated constant is the 26-week bill read on September 29, 2026
- the example: the bill earns $839.37 after tax in a year and the savings account $710.00, so the bill is ahead by $129.37
- compounds after tax each year: 5 years $4,488.29 against $3,757.45; 10 years $9,782.38 against $8,079.63
- the horizon adds rows past the years held without changing the answer
- the break-even APY rises with the state rate: 0% 4.4177, 3% 4.5993, 5% 4.7289, 7% 4.8659, 9% 5.0112, 11% 5.1654, 13% 5.3293
- an account paying exactly the break-even APY ties the bill
- with no state tax the bill is ahead by $79.37 at 4%, and a 4.5% account wins by $15.63
- a 37% federal and 10% state rate: bill $695.79, savings $530.00, bill ahead by $165.79
- guards: bad numbers become zero, taxes cannot take more than everything, years stay between 1 and 30
coast-fireCoast FIRE target and projection: the balance that grows to your FI number with no further contributions8/8 ✓
- fireNumber is annualExpenses / withdrawalRate
- coastNumber is the PV of fireNumber at the real return over 35 years
- has not yet coasted at $50k savings vs a $263,555 coast number
- reaches the coast point at age 59 (29 years in)
- reports hasCoasted=true when current savings already clears the coast number
- left alone, the coast number grows to the FIRE number by retirement (forward simulation: no formula shared with the engine)
- the yearly test is on the balance at the start of the year, before that year’s contribution: short the year before, enough at the coast point
- timeline starts at current savings and stops contributing once coasted
compoundCompound growth: future value of a lump sum plus monthly contributions; real-rate conversion9/9 ✓
- a lump sum alone grows by (1+r)^n
- contributions alone follow the ordinary-annuity future-value formula
- a zero rate is simple addition
- zero months returns the starting balance
- compounds back to the real annual rate over 12 months
- is 0 when nominal equals inflation
- is smaller than the naive nominal − inflation shortcut would overstate
- formats full dollars with grouping
- formats compact millions and thousands
contractor-vs-employee-2026Calculation engine15/15 ✓
- single $145,000: FICA 11,092.50, federal 23,534, take-home 110,373.50
- a flat state rate is taken from wages: 5% of $145,000 is 7,250
- joint $145,000: federal 14,240, take-home 119,667.50; single $250,000: FICA 15,514 including the 0.9%
- billing 159,729.77 with 3,000 of expenses leaves 117,070.50: SE tax 22,145.21, federal 17,514.06
- nothing billed, or expenses above the billing, is zero
- single $145,000, $6,697 of employer benefits, $3,000 of expenses: bill $159,729.77, 1.10 × the salary
- joint: 162,557.41 (1.1211×); single $60,000 with nothing else: 63,154.31 (1.0526×)
- a 5% state rate barely moves the billing (159,780.43) because it taxes both sides
- above the QBI threshold the deduction is dropped and the billing (285,199.86) is flagged as overstated
- more benefits, more expenses or a higher salary never lowers the required billing
- with no salary there is nothing to match
- a $119,886 target with $3,000 of expenses needs $163,808.18 billed
- other targets and filing statuses
- above the QBI threshold: 455,245.68 for a $300,000 target, flagged
- is the smallest such billing: a dollar less falls short; no target has no answer
cost-of-living-indexHousehold price levels by country versus the US (World Bank private-consumption PPP, 2024)12/12 ✓
- has the United States at exactly 1.0 (the reference)
- lists the original ten countries plus China, Brazil, Japan and South Korea — fourteen rows
- every multiplier reproduces the independently computed World Bank ratio (private-consumption PPP ÷ exchange rate, 2024)
- each row stores the two source values it was computed from, and the multiplier is exactly their ratio to 4 decimals
- every row is the 2024 observation (the latest year both series exist for every listed country)
- spot-checks the raw inputs against the API responses (India, Portugal and Japan)
- is the private-consumption indicator, not GDP PPP: Portugal, Canada and Mexico come out about 8% higher, India lower
- has unique ISO codes and names, and only positive finite multipliers
- multipliers are plausible price levels (0.1× to 2×) — a typo would fall outside
- each of the thirteen pinned destinations is cheaper than the US at household prices (a dearer country may be added later; this pins the ones that exist)
- resolves by code, including the four added countries
- has no fallback: an unlisted country is undefined, never priced as the US
debt-payoffDebt payoff schedules: minimums, avalanche, snowball, balance transfer and consolidation loan32/32 ✓
- minimums only: 52 months and $6,715.32 of interest
- with $300 extra: 23 months and $2,731.44 — 29 months and $3,983.88 saved
- agrees with the closed form (last payment trimmed), which is an independent derivation
- the Money Map counts the same months (52 and 23) but multiplies a full final payment, so its interest is a little high
- with the freed minimum rolled onto B, both are gone in 5 months (A in month 3, B in month 5)
- without rollover (minimums only) B takes 6 months
- rollover:false with no extra is the same as minimumOnly
- month 1 by hand — interest D1 10, D2 40; minimums 30 + 60; the other $110 goes to the target
- avalanche: 18 months, $437.71 (D2 clear in month 14, D1 in 18). Snowball: 18 months, $544.76 (D1 in 8, D2 in 18)
- minimums only (no rollover, no extra): 56 months and $1,551.33
- when the smallest balance also has the highest rate, the two orders are the same
- ties go to the smaller balance (avalanche) and the higher rate (snowball)
- money is conserved: everything paid = the starting balances + the interest charged
- avalanche never pays more interest than snowball, and any plan beats minimums only
- more extra never costs more interest or more months
- the schedule has one entry per month and its totals add up
- a minimum below the monthly interest never pays off — the balance grows
- extra money can rescue a debt whose minimum is below the interest
- a debt smaller than its minimum clears in month 1 and pays one month of interest
- zero-balance debts are ignored, and an empty list is already done
- a 0% debt with a minimum pays exactly balance ÷ minimum months
- bad numbers stay finite
- one card, worked by hand: 3% fee ($360) → $12,360 at 0% for 15 months, $660 a month → $2,460 left, then 22% for 4 more months
- two debts: the 24% one moves (3% fee, 12 months at 0%, then 24%); the plan pays the 9% debt first while the promo runs
- a promo that outlasts the payoff costs only the fee
- a big fee on a short promo can cost more than staying put
- a bad transfer index moves nothing
- $12,000 into one loan: 5% fee taken from the proceeds → borrow $12,631.58; 12% for 36 months = $419.55 a month, $2,472.19 of interest, $3,103.77 with the fee
- paying the old budget ($660) on the new loan clears it in 22 months for $1,459.90 of interest ($2,091.48 with the fee)
- a payment below the required payment is raised to it
- all open debts are rolled together; zero-balance debts are ignored
- nothing to consolidate, or garbage input, gives finite zeros
disability-runwayCalculation engine46/46 ✓
- case 0: employer, 145000 pay, 90-day wait, 9000 saved, 5000 a month
- case 1: none, 145000 pay, 90-day wait, 9000 saved, 5000 a month
- case 2: you, 145000 pay, 90-day wait, 9000 saved, 5000 a month
- case 3: employer, 145000 pay, 90-day wait, 9000 saved, 5000 a month
- case 4: employer, 145000 pay, 30-day wait, 9000 saved, 5000 a month
- case 5: employer, 145000 pay, 180-day wait, 9000 saved, 5000 a month
- case 6: employer, 145000 pay, 365-day wait, 9000 saved, 5000 a month
- case 7: employer, 145000 pay, 90-day wait, 100000 saved, 5000 a month
- case 8: employer, 145000 pay, 90-day wait, 0 saved, 5000 a month
- case 9: employer, 145000 pay, 90-day wait, 9000 saved, 5000 a month
- case 10: employer, 145000 pay, 90-day wait, 9000 saved, 5000 a month
- case 11: employer, 145000 pay, 90-day wait, 9000 saved, 5000 a month
- case 12: employer, 60000 pay, 90-day wait, 9000 saved, 3500 a month
- case 13: employer, 400000 pay, 90-day wait, 9000 saved, 5000 a month
- case 14: employer, 145000 pay, 90-day wait, 9000 saved, 5000 a month
- case 15: employer, 145000 pay, 90-day wait, 9000 saved, 5000 a month
- case 16: employer, 145000 pay, 90-day wait, 9000 saved, 0 a month
- case 17: employer, 145000 pay, 90-day wait, 9000 saved, 1500 a month
- case 18: employer, 0 pay, 90-day wait, 9000 saved, 5000 a month
- case 19: employer, 145000 pay, 0-day wait, 9000 saved, 5000 a month
- case 20: employer, 145000 pay, 45-day wait, 9000 saved, 5000 a month
- case 21: you, 145000 pay, 90-day wait, 50000 saved, 5000 a month
- case 22: none, 60000 pay, 30-day wait, 400000 saved, 5000 a month
- case 23: employer, 60000 pay, 180-day wait, 9000 saved, 9000 a month
- case 24: employer, 250000 pay, 60-day wait, 9000 saved, 9000 a month
- case 25: you, 250000 pay, 90-day wait, 400000 saved, 5000 a month
- case 26: none, 250000 pay, 60-day wait, 400000 saved, 9000 a month
- case 27: you, 60000 pay, 30-day wait, 9000 saved, 9000 a month
- case 28: you, 60000 pay, 365-day wait, 400000 saved, 9000 a month
- case 29: you, 60000 pay, 90-day wait, 0 saved, 2000 a month
- case 30: you, 145000 pay, 30-day wait, 60000 saved, 2000 a month
- case 31: employer, 60000 pay, 30-day wait, 60000 saved, 2000 a month
- case 32: none, 250000 pay, 60-day wait, 400000 saved, 5000 a month
- case 33: none, 60000 pay, 60-day wait, 0 saved, 5000 a month
- case 34: employer, 60000 pay, 365-day wait, 400000 saved, 5000 a month
- case 35: you, 30000 pay, 365-day wait, 0 saved, 2000 a month
- the default plan benefit and its tax
- the SSDI estimate is the PIA on the average monthly earnings
- the waiting period is the risk: 15,000 needed, 9,000 lasts 1.8 months
- a plan that offsets SSDI pays the difference, so the two together are the larger
- SSDI is not paid before the sixth month
- SGA for 2026 is 1,690 a month
- no plan means no benefit and savings run down at the spending rate
- savings that outlast 36 months give no runway figure
- a cap of zero means no cap
- bad numbers count as zero
down-payment-savingsCalculation engine50/50 ✓
- case 0: 536000 home, 20% down, 4300 a month
- case 1: 536000 home, 3% down, 4300 a month
- case 2: 536000 home, 10% down, 4300 a month
- case 3: 536000 home, 20% down, 0 a month
- case 4: 536000 home, 20% down, 0 a month
- case 5: 536000 home, 20% down, 4300 a month
- case 6: 536000 home, 20% down, 4300 a month
- case 7: 536000 home, 20% down, 0 a month
- case 8: 536000 home, 20% down, 4300 a month
- case 9: 536000 home, 20% down, 4300 a month
- case 10: 0 home, 20% down, 4300 a month
- case 11: 536000 home, 20% down, 100 a month
- case 12: 900000 home, 20% down, 50 a month
- case 13: 536000 home, 20% down, 4300 a month
- case 14: 536000 home, 20% down, 4300 a month
- case 15: 300000 home, 5% down, 1500 a month
- case 16: 536000 home, 20% down, 200 a month
- case 17: 536000 home, 20% down, 4300 a month
- case 18: 536000 home, 100% down, 4300 a month
- case 19: 705000 home, 5% down, 500 a month
- case 20: 1300000 home, 10% down, 4650 a month
- case 21: 1315000 home, 20% down, 4150 a month
- case 22: 1095000 home, 3% down, 4950 a month
- case 23: 870000 home, 3% down, 4700 a month
- case 24: 1190000 home, 20% down, 5700 a month
- case 25: 190000 home, 5% down, 4400 a month
- case 26: 870000 home, 20% down, 2300 a month
- case 27: 1140000 home, 5% down, 3950 a month
- case 28: 515000 home, 10% down, 4150 a month
- case 29: 825000 home, 3% down, 650 a month
- case 30: 1150000 home, 5% down, 5000 a month
- case 31: 210000 home, 3% down, 5700 a month
- case 32: 700000 home, 3% down, 750 a month
- case 33: 180000 home, 5% down, 1750 a month
- case 34: 205000 home, 10% down, 5800 a month
- case 35: 1275000 home, 20% down, 5250 a month
- case 36: 1200000 home, 5% down, 3400 a month
- the target is the down payment plus closing costs plus the reserve
- interest cuts it to 26 months
- monthly rate after tax
- already there means zero months
- one cent short needs a month of saving
- no saving and no starting balance never gets there
- interest alone can get there from a starting balance
- more than 50 years is reported as never
- bad numbers are treated as zero
- down payment above 100% is capped
- lands on the target at the stated month, and one month later would overshoot
- is zero when the starting balance already covers it
- with no interest it is the plain gap divided by the months
driving-costs-aaaCalculation engine5/5 ✓
- the 2026 headline is consistent
- depreciation: 56.15% lost in five years is 15.2% a year
- the average lies between the cheapest and dearest classes
- the per-mile table has four classes and three power trains, all positive
- the 2025 category detail
espp-2026Calculation engine65/65 ✓
- case 0: single, 145000 pay, 50 -> 60 -> 60 after 0 months
- case 1: single, 145000 pay, 50 -> 60 -> 70 after 19 months
- case 2: single, 145000 pay, 50 -> 60 -> 60 after 19 months
- case 3: single, 145000 pay, 50 -> 60 -> 52 after 19 months
- case 4: single, 145000 pay, 50 -> 60 -> 40 after 19 months
- case 5: single, 145000 pay, 50 -> 60 -> 70 after 13 months
- case 6: single, 145000 pay, 50 -> 60 -> 40 after 13 months
- case 7: single, 145000 pay, 50 -> 60 -> 75 after 6 months
- case 8: single, 145000 pay, 50 -> 60 -> 50 after 6 months
- case 9: single, 145000 pay, 50 -> 60 -> 70 after 19 months
- case 10: single, 145000 pay, 50 -> 60 -> 60 after 0 months
- case 11: single, 145000 pay, 50 -> 60 -> 70 after 19 months
- case 12: single, 145000 pay, 50 -> 60 -> 70 after 19 months
- case 13: single, 145000 pay, 50 -> 60 -> 70 after 19 months
- case 14: single, 145000 pay, 50 -> 60 -> 70 after 19 months
- case 15: single, 145000 pay, 50 -> 60 -> 60 after 0 months
- case 16: mfj, 145000 pay, 50 -> 60 -> 90 after 19 months
- case 17: hoh, 145000 pay, 50 -> 60 -> 90 after 19 months
- case 18: single, 400000 pay, 50 -> 60 -> 90 after 19 months
- case 19: single, 30000 pay, 50 -> 60 -> 90 after 19 months
- case 20: single, 600000 pay, 50 -> 60 -> 200 after 19 months
- case 21: single, 145000 pay, 50 -> 60 -> 70 after 19 months
- case 22: single, 145000 pay, 80 -> 60 -> 70 after 19 months
- case 23: single, 145000 pay, 80 -> 60 -> 100 after 19 months
- case 24: single, 145000 pay, 50 -> 60 -> 70 after 13 months
- case 25: single, 145000 pay, 50 -> 60 -> 70 after 13 months
- case 26: single, 145000 pay, 50 -> 60 -> 70 after 12 months
- case 27: single, 145000 pay, 50 -> 60 -> 70 after 13 months
- case 28: single, 145000 pay, 50 -> 60 -> 70 after 14 months
- case 29: single, 145000 pay, 50 -> 60 -> 60 after 0 months
- case 30: single, 145000 pay, 0 -> 60 -> 60 after 0 months
- case 31: single, 145000 pay, 50 -> 0 -> 60 after 0 months
- case 32: single, 145000 pay, 50 -> 60 -> 70 after 19 months
- case 33: single, 145000 pay, 33.33 -> 39.99 -> 61.17 after 19 months
- case 34: single, 0 pay, 50 -> 60 -> 90 after 19 months
- case 35: mfj, 90000 pay, 120.05 -> 94.38 -> 167.79 after 12 months
- case 36: single, 520000 pay, 157.23 -> 120.97 -> 77.42 after 3 months
- case 37: hoh, 0 pay, 40.05 -> 55.65 -> 73.19 after 24 months
- case 38: mfj, 40000 pay, 223.28 -> 196.75 -> 449.34 after 0 months
- case 39: single, 0 pay, 212.69 -> 217.95 -> 162.81 after 30 months
- case 40: single, 40000 pay, 10 -> 11.01 -> 7.46 after 13 months
- case 41: hoh, 260000 pay, 193.11 -> 149.19 -> 170.51 after 24 months
- case 42: single, 0 pay, 248.76 -> 385.81 -> 401.36 after 30 months
- case 43: hoh, 0 pay, 150.84 -> 107.09 -> 328.07 after 3 months
- case 44: single, 145000 pay, 147.01 -> 88.3 -> 144.73 after 12 months
- case 45: hoh, 90000 pay, 29.49 -> 32.96 -> 30.17 after 13 months
- case 46: hoh, 520000 pay, 196.22 -> 201.13 -> 276.44 after 30 months
- case 47: mfj, 40000 pay, 41.67 -> 26.23 -> 27.79 after 18 months
- case 48: mfj, 40000 pay, 19.82 -> 17.72 -> 27.98 after 13 months
- case 49: single, 520000 pay, 41.23 -> 53.43 -> 58.19 after 24 months
- case 50: hoh, 40000 pay, 200.36 -> 274.83 -> 270.87 after 12 months
- case 51: hoh, 0 pay, 49.95 -> 68.94 -> 61.04 after 13 months
- case 52: mfj, 0 pay, 143.34 -> 164.64 -> 137 after 18 months
- the default purchase
- a qualifying sale at 70
- Publication 525 Example 11: 100 shares bought at 20 when the stock was worth 23, sold at 30 six months later, is 300 of wages and 700 of capital gain
- needs more than 12 months after the purchase and more than 24 after the offering began
- the fewest months that qualify
- long-term treatment starts after 12 months even when the sale is disqualifying
- the price uses the lower of the two prices with a lookback and the purchase price without
- the discount is capped at 15% (the statute floors the price at 85%)
- the $25,000 limit, at the offering-date price, caps the shares
- no deductions or no price means no shares and no tax
- a loss is never taxed as ordinary income in a qualifying sale, and the disqualifying wages stay even at a loss
- a state rate is charged on the wages and the gain
estate-tax-2026Calculation engine10/10 ✓
- 2026: $15,000,000 exclusion, 40% top rate, $19,000 annual gift exclusion
- the worked case: $2.2 million of tax on a $20 million estate with debts, charity and earlier gifts
- under the exclusion there is no tax and the room is the gap: $417,000 leaves $14,583,000
- exactly at the exclusion is no tax; one dollar over is 40 cents
- a couple with portability has a second exclusion: $40 million pays 40% of $10 million = $4 million; $30 million pays nothing
- a portable amount from the first estate’s return is added as given: $6 million → $21 million
- charity and debts come off the estate before gifts are added back; charity can bring an estate under the line
- deductions larger than the assets leave nothing, never a negative estate
- the tax starts exactly at the threshold
- bad or negative inputs count as zero
estimated-tax-2026Calculation engine10/10 ✓
- every field of every case matches
- 22,490 withheld, 32,081.93 of tax, 1,595.94 a quarter on the 90% rule
- the penalty for paying nothing until April 15, 2027 is 293.13
- owing under $1,000 after withholding means no estimated payments
- last year’s tax is used when it is smaller, at 100% or at 110% above $150,000 of income
- Publication 505’s own example: last year’s tax 42,581 with AGI 180,000 makes 110% = 46,839.10
- catch-up: the shortfall on dates already passed joins the next payment
- payments already made cover the earliest installments first, so they shrink the penalty most
- the rates and dates are the IRS ones
- junk in, no NaN out
expatriation-2026US exit-tax screen (IRC §877A): the covered-expatriate tests and long-term resident status18/18 ✓
- holds the 2026 figures exactly
- the 2026 tax threshold sits above the 2025 one printed on the IRS page ($206,000) and the exclusion above 2025’s $890,000
- a visa holder is outside them, however large the net worth
- a green-card holder needs 8 of the last 15 tax years to be a long-term resident: 7 is outside, 8 is inside
- a citizen is inside the rules; the green-card count does not matter
- green-card years are clamped to the 15-year window and to zero
- years are whole tax years: 7.5 is 7 (not a long-term resident, one more year to go) and 8.4 is 8 (a long-term resident)
- an unbounded count is the maximum of the 15-year window, not zero; a negative infinity is zero
- more than 8 years leaves nothing to wait for
- none met: not a covered expatriate (they may still have to file Form 8854)
- net-worth test: $1,999,999 does not meet it, $2,000,000 does (the statute says “$2,000,000 or more”)
- tax test: exactly $211,000 does not meet it, $211,001 does (the statute says “more than”)
- certification test: not being able to certify compliance makes someone covered even with a small net worth and low tax
- all three at once lists all three, in the statute’s order
- a long-term resident below 8 years is outside the rules even if every test would be met
- a citizen is judged on the same three tests
- echoes the figures behind each test so a page can show them without restating them
- treats negative or non-finite money as zero
federal-tax-20262026 federal ordinary income tax, standard deduction, and bracket room74/74 ✓
- single standard deduction is $16,100
- single, no other income, 12% bracket-fill room is $66,500
- tax on $50,400 taxable (single) is $5,800 (1,240 + 4,560)
- $700,000 single taxable income produces a positive tax (regression for the null-top-bracket bug)
- the constants are the published amounts
- with no age or blindness it is the basic standard deduction
- single, 1 aged, 0 blind → 18150
- single, 1 aged, 1 blind → 20200
- single, 0 aged, 1 blind → 18150
- hoh, 1 aged, 0 blind → 26200
- mfj, 1 aged, 0 blind → 33850
- mfj, 2 aged, 0 blind → 35500
- mfj, 2 aged, 1 blind → 37150
- mfj, 2 aged, 2 blind → 38800
- cannot claim more people than the return has: one taxpayer on a single return, two on a joint one
- the constants are the enacted amounts
- single, 1 senior(s), MAGI 60000 → 6000
- single, 1 senior(s), MAGI 75000 → 6000
- single, 1 senior(s), MAGI 100000 → 4500
- single, 1 senior(s), MAGI 174999 → 0
- single, 1 senior(s), MAGI 175000 → 0
- single, 1 senior(s), MAGI 400000 → 0
- single, 0 senior(s), MAGI 50000 → 0
- hoh, 1 senior(s), MAGI 100000 → 4500
- mfj, 1 senior(s), MAGI 100000 → 6000
- mfj, 2 senior(s), MAGI 150000 → 12000
- mfj, 2 senior(s), MAGI 200000 → 6000
- mfj, 1 senior(s), MAGI 200000 → 3000
- mfj, 2 senior(s), MAGI 250000 → 0
- never more than the return has taxpayers, never negative
- the 0% / 15% tops are the published amounts
- single, ordinary 0 + gains 49450 → tax 0
- single, ordinary 0 + gains 60000 → tax 1582.5
- single, ordinary 40000 + gains 20000 → tax 1582.5
- single, ordinary 60000 + gains 20000 → tax 3000
- single, ordinary 500000 + gains 100000 → tax 17725
- single, ordinary 600000 + gains 10000 → tax 2000
- mfj, ordinary 90000 + gains 30000 → tax 3165
- hoh, ordinary 60000 + gains 20000 → tax 2070
- single, ordinary 10000 + gains 0 → tax 0
- a higher ordinary income never lowers the gains tax
- single, taxable 0 → 0.1 bracket [0, 12400], room 12400
- single, taxable 12399 → 0.1 bracket [0, 12400], room 1
- single, taxable 12400 → 0.12 bracket [12400, 50400], room 38000
- single, taxable 50399 → 0.12 bracket [12400, 50400], room 1
- single, taxable 50400 → 0.22 bracket [50400, 105700], room 55300
- single, taxable 128900 → 0.24 bracket [105700, 201775], room 72875
- single, taxable 640599 → 0.35 bracket [256225, 640600], room 1
- the top bracket has no ceiling and no next rate
- uses each status’s own table (joint and head of household)
- negative or fractional taxable income behaves as zero / as given
- ordinary income only: $145,000 single → taxable $128,900, tax $23,534 (17,966 + 24% × 23,200)
- agrees with the existing ordinary-income function when there are no gains and no extra deductions
- pre-tax contributions come off before this function: $140,650 single → taxable $124,550, tax $22,490
- gains stack on top of ordinary income: $60,000 + $30,000 gains → ordinary tax $5,020 + gains tax $3,667.50
- the standard deduction absorbs ordinary income first, then gains
- a $66,500 conversion on top of $40,000 of gains costs $11,800: $5,800 ordinary + $6,000 as the gains leave the 0% band
- itemized deductions are used only when they beat the standard deduction (and forfeit the aged/blind amounts)
- a 65+ single filer with $100,000: standard 18,150 + senior 4,500 → taxable $77,350, tax $11,729, and the phase-out lifts the next dollar to 23.32%
- the senior deduction can be switched off (it ends after 2028)
- a couple both 65+ with $200,000: standard 35,500 + senior 6,000 → taxable $158,500, tax $24,294
- head of household and joint returns use their own gains thresholds
- a huge return ($500,000 + $100,000 gains) uses all three gains rates
- zero income is a clean zero, not NaN
- refuses non-numeric inputs instead of passing NaN through
- total tax never falls when income or gains rise (monotone)
- with gains in the 0% band, the next ordinary dollar costs its bracket rate plus 15% (the 27% effect)
- inside the 10% bracket the same effect is 25%
- without gains it is the bracket rate; above the point where gains have left the 0% band it is the bracket rate again
- is zero while income is still inside the deductions
- at the 15%→20% edge an ordinary dollar can also push a dollar of gains from 15% to 20%: 35% + 5% = 40%
- single, taxable $128,900: 1,240 + 4,560 + 12,166 + 5,568 = 23,534
- lists only the brackets the income reaches; nothing for zero income
- always adds up to the existing ordinary-income function, for every status
financial-checkupCalculation engine16/16 ✓
- are the published ones
- every check of every case matches: status, figure, benchmark, coverage and dollars
- the counts agree with the checks
- 2 met, 3 gaps, 5 counted
- emergency fund: 1.8 months, 6,000 short of three months and 21,000 of six
- savings: 54,350 saved, 37.5% of pay
- retirement: 2.9x against the 1x mark at 30, and 15,000 short of 3x at 40
- match: 4,350 a year unclaimed; debt: 2,640 a year in interest; the debt is the furthest
- three months exactly is met; a dollar under is not
- a checkpoint is met at exactly its multiple and not below
- housing at 28% of gross monthly income is met; a dollar over is not (145,000 pays 12,083.33 a month; 28% is 3,383.33; 36% is 4,350)
- a match of zero, no income or no spending is skipped, not failed
- contributing above the match still meets it, and only the matched part counts as employer money
- no debt meets the debt benchmark; a balance at no interest costs nothing a year but is still a balance
- a saving shortfall is measured in dollars of pay
- junk in, nothing thrown and no NaN out
fire-numberFIRE number, lean FIRE number, and years to financial independence46/46 ✓
- reaches FIRE in 279 months (23.25 years) using the effective-monthly real rate
- does NOT reproduce the old nominal-rate bug (195 months / 16.25 years)
- fireNumber is annualSpend / withdrawalRate, unaffected by the return convention
- leanFireNumber is 82% of the full number (essentials-only preset)
- reports isAlreadyFire when the portfolio already clears the number today
- timeline starts at the current portfolio and ends at or after the target
- case 0 gives the same number, month, flag and timeline as the engine
- case 1 gives the same number, month, flag and timeline as the engine
- case 2 gives the same number, month, flag and timeline as the engine
- case 3 gives the same number, month, flag and timeline as the engine
- case 4 gives the same number, month, flag and timeline as the engine
- case 5 gives the same number, month, flag and timeline as the engine
- case 6 gives the same number, month, flag and timeline as the engine
- case 7 gives the same number, month, flag and timeline as the engine
- case 8 gives the same number, month, flag and timeline as the engine
- the golden case is 279 months and $1,500,000, and it says the number was reached
- a negative or zero income is ignored, whatever the start age
- reaching the number in exactly month 720 is reachable; not reaching it is not
- when the number is never reached, fireNumber is what you would need if you stopped today
- the requirement today is 25 × $30,000 uncovered + 17 years × $30,000 = $1,260,000
- crossing DURING the bridge: $600,000 + $3,000 a month meets a falling requirement at month 120 ($960,000)
- crossing AFTER the income has started: $250,000 + $2,000 a month needs only the uncovered $750,000, at month 250
- income equal to spending: nothing is left to fund at the withdrawal rate, only the years before it starts
- income above spending cannot lower the requirement past zero: it counts only up to what is spent
- an income that never starts is worth nothing: the number is the number with the income ignored
- a start age of −Infinity or an unreadable one counts as an income that is already payable; nothing comes out NaN
- a start age a million years away is the same as never
- textbook value: $1,000 a month for 12 months at 1% a month is worth $11,255.08 (1,000 × (1 − 1.01⁻¹²) ÷ 0.01)
- equals a term-by-term sum of discounted payments, for positive, zero and negative real returns and any length
- a fund of exactly that size, drawn $ a month while it earns the real return, is empty the day the income starts
- a stop date partway through leaves the shorter bridge: the same fund, run down to that date, is what the requirement asks for
- the number you need never rises as you stop later, and falls month by month until the income starts: default rates, undefined,000 from 25 years
- the number you need never rises as you stop later, and falls month by month until the income starts: 3.0% rate (below the real return)
- the number you need never rises as you stop later, and falls month by month until the income starts: 3.5% rate, small income (the case a terminal-balance formula gets backwards)
- the number you need never rises as you stop later, and falls month by month until the income starts: 4.5% rate
- the number you need never rises as you stop later, and falls month by month until the income starts: zero real return
- the number you need never rises as you stop later, and falls month by month until the income starts: negative real return
- more later income never raises the number; a later start never lowers it
- always between the day-one number (the bridge only ever adds) and the number with the income ignored (it can only help)
- a later income can never make the number larger than ignoring it: the bridge is capped at income ÷ withdrawal rate
- a later FI date never comes from stopping sooner: saving more or starting with more never delays it
- the rejected form RISES with the stop date for $3,000 on $60,000 at 3.5%; the chosen one falls
- the rejected form jumps when the first dollar of income is entered; the chosen one does not
- the two agree to within 2% where the rejected form behaves (the default person, 4%): the choice is about the edges, not the middle
- counting the income from day one, as the old page did, said 55 months; funding the years before it starts says 118
- the timeline target falls as the income start approaches, and matches the requirement year by year
foreign-reporting-2026Calculation engine11/11 ✓
- a U.S. person with more than $10,000 at any time must file; exactly $10,000 does not
- someone who is not a U.S. person never files, however much they hold
- bad or negative balances count as zero
- the deadlines: April 15, extended automatically to October 15
- the four threshold pairs are the IRS’s
- living in the U.S., unmarried: over $50,000 at year end, or over $75,000 at any time
- living in the U.S., married filing jointly: $100,000 and $150,000
- living abroad: unmarried $200,000 and $300,000; joint $400,000 and $600,000
- the highest value is never below the year-end value
- not a specified individual, or not required to file a return, means no Form 8938 however much is held
- bad values count as zero
health-plan-costCalculation engine23/23 ✓
- everything up to the deductible, then the coinsurance share, never above the maximum
- a plan with no coinsurance stops at the deductible; a maximum below the deductible caps first
- bad numbers count as zero, and coinsurance above 100% is capped at 100%
- inverts outOfPocket below the maximum, and is Infinity where it is never reached
- the PPO, no HSA: premium plus out of pocket
- the HDHP with an HSA: $1,000 of care is paid by $500 from the employer and $500 of your pre-tax money
- a year with no care: only the premium, and the whole HSA stays yours
- $3,000 and $5,000 of care
- once the account is used up the cost stops rising with the tax saving: the worst year is $10,550.50
- without an HSA the same HDHP costs more: $9,000 at $3,000 of care
- a tax rate is capped, and never turns a saving into a charge
- positive means the high-deductible plan costs you less
- best and worst year
- finds both crossings for the example plans: care $2,775.08 and $17,752.50
- the HDHP is cheaper below the first crossing and above the second, the PPO in between
- a cheaper-premium HDHP that wins at every level has no crossing (premium $5,400)
- a PPO that wins at every level has no crossing
- with no HSA there is one crossing, on the way up to the HDHP’s maximum
- a crossing that sits exactly on a bend in the lines is found once
- touching zero without changing sign is not a crossing (same premium gap, 20% coinsurance)
- 2026 figures from IRS Rev. Proc. 2025-19
- what you may add: the limit less the employer’s dollars, plus $1,000 from age 55
- the example HDHP qualifies for self-only coverage; a $1,000 deductible or $9,000 maximum does not
household-income-2025Calculation engine5/5 ✓
- every segment’s interpolated median is within $700 of the published median
- the US median household income for 2025 is $87,460
- the groups add up to all households within rounding
- each segment’s counts add to its total within rounding
- the top brackets and the tail shapes
household-spending-2024Calculation engine7/7 ✓
- has nine income classes, lowest first, and the 2024 year
- the 14 groups add up to average annual expenditures within 3 dollars of rounding, in every class and for all households
- consumer units in the nine classes add up to all households within rounding
- spot values are BLS’s
- the detail lines sit inside their groups
- living costs are expenditures without personal insurance and pensions, and equal the sum of the living groups within rounding
- finds the class for an income: edges, the bottom, the top, and bad numbers
hsa-retirement-2026Calculation engine11/11 ✓
- $4,400 self-only, $8,750 family, $1,000 more from 55
- $3,900 at 24% + 7.65% saves $1,234.35 and costs $2,665.65 of take-home pay
- without payroll it saves 24% ($936); above the wage base 25.45% ($992.55); with a 5% state rate 36.65% ($1,429.35)
- the combined rate is capped at 60%; nothing contributed saves nothing
- the HSA holds $260,346.84 after 31 years, $230,761.97 of it from your own contributions, all tax-free for medical costs
- the same take-home cost in a taxable account: $157,725.81, or $146,462.21 after 15% tax on the growth
- the same take-home cost in a traditional 401(k): $3,507.43 a year → $207,533.96, or $161,876.49 after 22% tax
- spending only half on medical costs taxes the other half at 22%: $205,378.16; none: $179,994.34
- the HSA beats both other accounts at the same take-home cost, for all-medical use
- an 8% return reaches $310,057.43; 36 years reaches $339,178.21
- nothing contributed, or no years, is zero
income-percentileCalculation engine26/26 ✓
- all: percentiles and inverses
- age-15-24: percentiles and inverses
- age-25-34: percentiles and inverses
- age-35-44: percentiles and inverses
- age-45-54: percentiles and inverses
- age-55-64: percentiles and inverses
- age-65-74: percentiles and inverses
- age-75-plus: percentiles and inverses
- size-1: percentiles and inverses
- size-2: percentiles and inverses
- size-3: percentiles and inverses
- size-4: percentiles and inverses
- size-5: percentiles and inverses
- size-6: percentiles and inverses
- size-7: percentiles and inverses
- earners-0: percentiles and inverses
- earners-1: percentiles and inverses
- earners-2: percentiles and inverses
- a household at the median is at the 50th percentile, and $0 is at the bottom
- $145,000 is about the 71st percentile of all households
- the share below the top of the $10,000 to $14,999 bracket adds the first three brackets
- the percentile only rises with income and is continuous at the bracket edges
- the inverse undoes the percentile
- the top 10% of all households starts near $260,000 and the top 1% near $682,000
- suffixes
- the top percent is never below 0.1
investment-feesCalculation engine14/14 ✓
- matches the Department of Labor's 401(k) fee example: $227,000 at 0.5% and $163,000 at 1.5%, 28% less
- $100,000 for 30 years at 7%: $761,225.50 with no fee, $574,349.12 with a 1% fee
- with monthly contributions: $420,000 + $4,300 a month for 31 years
- the monthly rate compounds back to the yearly rate
- a fee at or above the return leaves a shrinking balance, never NaN
- bad input is treated as zero, not propagated
- zero years returns what you have
- runs from year 0 to the horizon and ends where projectWithFee ends
- costs: 1% against 0.05% is $1,701,033.51 at the end; against no fee $1,802,997.65
- the share of fee-free growth taken: (8,854,834.12 − 7,051,836.47) ÷ (8,854,834.12 − 2,019,600) = 26.4%
- the deflator is 1.03^31 = 2.5000803
- the same fee on both sides costs nothing against the alternative
- a higher fee never costs less
- nothing grows, nothing is lost
irrCalculation engine49/49 ✓
- case 0: 100000 in, 9000 a year, 130000 at the end, 10 years
- case 1: 100000 in, 9000 a year, 130000 at the end, 10 years
- case 2: 100000 in, 9000 a year, 130000 at the end, 10 years
- case 3: 100000 in, 9000 a year, 0 at the end, 10 years
- case 4: 100000 in, 9000 a year, 130000 at the end, 10 years
- case 5: 100000 in, 9000 a year, 130000 at the end, 10 years
- case 6: 0 in, 9000 a year, 130000 at the end, 10 years
- case 7: 50000 in, -2000 a year, 120000 at the end, 10 years
- case 8: 50000 in, -500 a month, 160000 at the end, 10 years
- case 9: 50000 in, -500 a month, 160000 at the end, 10 years
- case 10: 50000 in, -500 a month, 160000 at the end, 10 years
- case 11: 100000 in, 800 a month, 0 at the end, 30 years
- case 12: 100000 in, 0 a year, 20000 at the end, 10 years
- case 13: 10000 in, 0 a year, 200000 at the end, 10 years
- case 14: 100000 in, 0 a year, 1000 at the end, 10 years
- case 15: 100000 in, -9000 a year, 1000 at the end, 10 years
- case 16: 100000 in, 9000 a year, 130000 at the end, 1 years
- case 17: 100000 in, 9000 a year, 130000 at the end, 0 years
- case 18: 0 in, -300 a month, 900000 at the end, 50 years
- case 19: 1 in, 0 a year, 100000 at the end, 5 years
- case 20: 100000 in, 30000 a year, 0 at the end, 3 years
- case 21: 50000 in, 500 a year, 0 at the end, 25 years
- case 22: 50000 in, 12000 a year, 50000 at the end, 25 years
- case 23: 250000 in, 500 a year, 0 at the end, 25 years
- case 24: 10000 in, -400 a year, 50000 at the end, 1 years
- case 25: 50000 in, 500 a year, 50000 at the end, 40 years
- case 26: 50000 in, -1500 a year, 50000 at the end, 25 years
- case 27: 50000 in, 500 a month, 0 at the end, 40 years
- case 28: 50000 in, 12000 a month, 1000000 at the end, 5 years
- case 29: 50000 in, -1500 a year, 1000000 at the end, 25 years
- case 30: 0 in, 12000 a year, 0 at the end, 5 years
- case 31: 50000 in, 30000 a month, 1000000 at the end, 40 years
- case 32: 50000 in, -1500 a year, 300000 at the end, 1 years
- case 33: 50000 in, 500 a month, 300000 at the end, 10 years
- case 34: 10000 in, 500 a year, 0 at the end, 5 years
- 100 today and 110 in a year is a 10% IRR and NPV 4.7619 at 5%
- 100 in and 60 back at each of two year-ends is 13.066%
- a 50% return in one year is 50% whether it is one period or twelve
- doubling in 7.2725 years is 10%
- the NPV is zero at the IRR
- a lower required return gives a higher NPV
- recurring amounts step up once a year, not each month
- start timing puts the first amount at time 0 and none at the end
- years are rounded and capped at 50
- bad numbers count as zero
- flows that never change sign have none
- two sign changes give no single answer, and the count says why
- a total loss is far below zero, not null, and a negative return is negative
- annual and per-period rates convert back and forth
itemized-vs-standard-2026Calculation engine11/11 ✓
- every field of every case matches
- 28,296.75 itemized against 17,100
- itemizing saves 2,687.22 of federal tax
- the SALT cap is 40,400 to 505,000 of income, falls 30 cents a dollar above, and stops at 10,000
- the top of the 37% bracket starts at 640,600 (768,700 joint)
- gifts under 0.5% of income add nothing when itemizing, and only 1,000 (2,000 joint) count with the standard deduction
- medical expenses count only above 7.5% of income
- cash gifts count up to 60% of income
- above the 37% bracket the itemized total is cut by 2/37 of the smaller of itself and the income over it
- no income is all zeros and a tie goes to the standard deduction
- junk in, no NaN out
life-insurance-needCalculation engine39/39 ✓
- case 0: 84000 a year for 31 years at 2.91%, assets 429000, coverage 0
- case 1: 84000 a year for 31 years at 0%, assets 429000, coverage 0
- case 2: 84000 a year for 0 years at 2.91%, assets 429000, coverage 0
- case 3: 0 a year for 31 years at 2.91%, assets 429000, coverage 0
- case 4: 84000 a year for 31 years at 2.91%, assets 0, coverage 0
- case 5: 84000 a year for 31 years at 2.91%, assets 5000000, coverage 0
- case 6: 84000 a year for 31 years at 2.91%, assets 429000, coverage 1000000
- case 7: 84000 a year for 31 years at 2.91%, assets 429000, coverage 0
- case 8: 84000 a year for 31 years at 2.91%, assets 429000, coverage 0
- case 9: 84000 a year for 31 years at 5%, assets 429000, coverage 0
- case 10: 84000 a year for 1 years at 2.91%, assets 429000, coverage 0
- case 11: 84000 a year for 10 years at 2.91%, assets 100000, coverage 0
- case 12: 84000 a year for 31 years at 2.91%, assets 429000, coverage 0
- case 13: 84000 a year for 5 years at 2.91%, assets 0, coverage 0
- case 14: 84000 a year for 31 years at -1%, assets 429000, coverage 0
- case 15: 120000 a year for 40 years at 2.91%, assets 429000, coverage 0
- case 16: 84000 a year for 31 years at 2.91%, assets 1800000, coverage 0
- case 17: 60000 a year for 20 years at 0%, assets 50000, coverage 0
- case 18: 90000 a year for 5 years at 1.5%, assets 429000, coverage 0
- case 19: 30000 a year for 20 years at 2.91%, assets 429000, coverage 1000000
- case 20: 90000 a year for 30 years at 1.5%, assets 429000, coverage 0
- case 21: 90000 a year for 40 years at 2.91%, assets 1500000, coverage 1000000
- case 22: 60000 a year for 10 years at 2.91%, assets 0, coverage 250000
- case 23: 90000 a year for 10 years at 1.5%, assets 1500000, coverage 250000
- case 24: 90000 a year for 40 years at 1.5%, assets 50000, coverage 250000
- case 25: 30000 a year for 20 years at 1.5%, assets 0, coverage 250000
- case 26: 90000 a year for 5 years at 2.91%, assets 1500000, coverage 1000000
- case 27: 60000 a year for 30 years at 2.91%, assets 50000, coverage 250000
- case 28: 30000 a year for 30 years at 1.5%, assets 0, coverage 250000
- case 29: 30000 a year for 5 years at 0%, assets 50000, coverage 1000000
- case 30: 60000 a year for 20 years at 0%, assets 1500000, coverage 1000000
- the present value of a level yearly need, paid at the start of each year
- the gap is the need less assets and coverage, never below zero
- the 10-year real yield is the Treasury figure of September 29, 2026
- no years or no need means nothing to insure
- already covered means year 0
- the need falls and the assets rise, so the gap never grows
- bad numbers count as zero
- years are whole numbers
lifestyle-creepCalculation engine8/8 ✓
- months to FI by share of each raise spent: 133, 154, 184, 225, 297
- with no raise the creep share does not matter: 150 months, $4,421,493.42 after 31 years
- end of the horizon: bank every raise → 6,322,420.34 and spending still 60,000; spend every raise → 4,421,493.42 and spending 150,547.95
- half the raise spent, year by year: pay, spending, saving, balance and the FI target
- a bigger raise with half of it spent takes longer, not shorter: 203 months at 3% against 184 at 2%, because each dollar of spending adds $25 to the FI target
- already independent is month 0; never reaching it within the horizon is null
- the balance never goes below zero when spending is above pay
- bad or missing inputs count as zero, and the horizon is 1 to 60 years
long-term-care-2025Calculation engine5/5 ✓
- matches CareScout’s published annual figures
- the monthly figures CareScout lists follow from the daily ones
- in-home care scales with the hours: 20 hours a week is $36,400; 168 is the most a week has
- every care type has a label
- holds the HHS statistics
ltc-planCalculation engine10/10 ✓
- the base case: 48 years away, $307,440 in the first care year, $950,265 in all, $34,524 to set aside today, savings cover it
- age 60 with assisted living: first year 142,558.09, total 440,632.81, set aside 92,968.02
- a private nursing room at 60 with 300,000 saved is covered, with 749,457.59 left
- age 70, care from 75 for 5 years, 200,000 saved: 507,869.72 short from age 76, 296,930.41 more needed today
- care starting now with no savings: the whole cost is a shortfall and the set-aside is the cost of the years
- age 80, care now, a nursing semi-private room, 150,000 saved at 5%: 203,624.98 short from 81
- no growth and no return: 100,000 a year for 3 years against 200,000 leaves 100,000 short from age 84
- care at home: 80,080 a year from 80, two years, age 65: first year 124,762.03, set aside 88,748.55, covered
- the savings cover the care exactly when they are at least the set-aside
- a start age before today is today; years stay between 1 and 15; bad numbers become zero
lump-sum-vs-dcaCalculation engine40/40 ✓
- 2-month DCA, starts from 1926
- 2-month DCA, starts from 1950
- 2-month DCA, starts from 1980
- 2-month DCA, starts from 2000
- 3-month DCA, starts from 1926
- 3-month DCA, starts from 1950
- 3-month DCA, starts from 1980
- 3-month DCA, starts from 2000
- 6-month DCA, starts from 1926
- 6-month DCA, starts from 1950
- 6-month DCA, starts from 1980
- 6-month DCA, starts from 2000
- 12-month DCA, starts from 1926
- 12-month DCA, starts from 1950
- 12-month DCA, starts from 1980
- 12-month DCA, starts from 2000
- 18-month DCA, starts from 1926
- 18-month DCA, starts from 1950
- 18-month DCA, starts from 1980
- 18-month DCA, starts from 2000
- 24-month DCA, starts from 1926
- 24-month DCA, starts from 1950
- 24-month DCA, starts from 1980
- 24-month DCA, starts from 2000
- 36-month DCA, starts from 1926
- 36-month DCA, starts from 1950
- 36-month DCA, starts from 1980
- 36-month DCA, starts from 2000
- 12-month DCA, starts from 2025
- 6-month DCA, starts from 2026
- two months of +10% for stocks and +1% for cash
- with a flat market and no interest the two are equal
- in a falling market the DCA is ahead, and in a rising one behind
- the first DCA tranche is invested in month one, so one month of DCA is the lump sum
- the headline: 823 of 1,191 twelve-month windows since July 1926
- interpolate between the sorted values
- month index 0 is July 1926 and the last is August 2026
- periods are held between 2 and 36 months and rounded
- a start year with no room for the whole period gives no study
- the chart series is one point per start month, in order
market-monthlyCalculation engine4/4 ✓
- has every month from July 1926 to August 2026
- matches the file at the ends
- is finite and sane
- reproduces the file’s own annual columns for every full calendar year
mega-backdoor-roth-2026Calculation engine13/13 ✓
- $145,000 pay, the full $24,500 deferral and a 100% match to 6%: $38,800 of room under the $72,000 limit
- with no deferral there is no match and the whole $72,000 is room; $10,000 of deferral leaves $53,300; $20,000 leaves $43,300
- other employer money counts: $10,000 of profit sharing leaves $28,800
- catch-up contributions do not count toward the limit: age 55 with $32,500 deferred is the same $38,800
- a deferral above the personal limit is cut to it: $40,000 asked at age 34 counts $24,500
- pay below $72,000 caps the limit: $50,000 pay, $10,000 deferred, 50% match to 6% → $1,500 match, room $38,500
- pay above the $360,000 the plan can count still gets the $72,000 limit but the match is on $360,000: $400,000 pay → match $21,600, room $25,900
- never negative: employer money over the limit leaves no room
- no pay, or bad inputs, leave nothing
- $38,800 a year for 31 years: 2,295,785.80, of which 1,092,985.80 is growth; 15% of that, $163,947.87, would go to tax in a taxable account
- at 20%: $218,597.16; over 10 years $38,800 a year is 471,518.19; over 5 years 213,370.80
- 5 years longer (36) reaches 2,990,935.15; one point more return (8%) reaches 2,734,142.82
- nothing contributed, or no years, is zero
milestonesCalculation engine11/11 ✓
- $420,000 + $4,300 a month in today’s dollars: 14, 90, 201 and 403 months to $500k, $1M, $2M and $5M
- in the dollars of the day (7% nominal) it is sooner: 12, 71, 151 and 282 months
- from nothing: $1,000 a month takes 451 months in today’s dollars and 337 nominal; $500 takes 629; $2,000 takes 300
- the answer is the first month: one month earlier is short of the target, that month is at or above it
- 0 when already there (including a target of zero), null when not within the horizon
- saving more, starting with more or earning more never takes longer
- a zero rate is just adding up: $1,000 a month from nothing takes 1,000 months, beyond the horizon
- $420,000 + $4,300 a month: 1,241,843.63 after 10 years and 2,444,813.43 after 20, in today’s dollars
- is sorted, drops duplicates and non-positive targets
- $1M: month 90, balance 1,006,165.47 of which 807,000 was put in and 199,165.47 is growth; an amount already passed is month 0
- a milestone out of reach has nulls, not zeros
monte-carloSeeded Monte Carlo retirement simulation: success rate and percentile bands36/36 ✓
- 4% / 60-40 / 30y success rate is close to 92.5%, not the old 61.5% bug
- is deterministic: same seed + inputs always produce the identical result
- a different explicit seed produces a different (but still reasonable) result
- deriveReturnAssumptions interpolates correctly at the endpoints and 60/40
- a 0% withdrawal rate always succeeds
- bands are monotonic (p10 <= p50 <= p90) at every year
- exposes every path's ending balance, sorted, consistent with successRate
- failureYears has one entry per depleted path, each within 1..years
- samplePaths are full-length paths that start at the start balance
- reproduces the same output for the same seed after the additive fields (bands unchanged)
- success rate, count and survival curve, path for path: '$1M, 3.88% real, ±12%, 30 years'
- success rate, count and survival curve, path for path: '$420k, 5.65% real, ±13.25%, 30 years …'
- success rate, count and survival curve, path for path: '$750k, a NEGATIVE real return, 45 yea…'
- success rate, count and survival curve, path for path: '$1M, 5.2% real, ±12%, 10 years'
- success rate, count and survival curve, path for path: '$1M, 7% real, ±17%, 60 years'
- success rate, count and survival curve, path for path: '$1M, 10% real, ±90% (the cap binds on…'
- success rate, count and survival curve, path for path: '$500k, withdrawal equal to the whole …'
- a scan run to a longer horizon answers shorter ones exactly (each path's returns do not depend on how long the run is)
- only the ratio of withdrawal to balance matters: doubling or halving both changes nothing
- is deterministic (seeded), uses the same default seed and path count as simulateRetirement, and a different seed gives a different draw
- a withdrawal equal to the balance leaves nobody alive, in the scan and in simulateRetirement alike (balance ≤ 0 is failure)
- the yearly return is capped at −50% and +80% in both functions: with a 90-point swing the cap binds, and the two still agree to the path
- with no volatility every path is the steady path: it lasts exactly when calcSWR says it does, and the edge is calcSustainableRate's
- matches a numpy reference (PCG64, 4,000,000 paths, the same ±cap): $1M, 3.88% real, ±12%, 30 years
- matches a numpy reference for a longer retirement and a different mix: 4% for 20 and 40 years; $2M at $60k on 5.65% ±13.25%
- target 0.5 over 30 years on a 0.1 grid equals a brute-force scan of the grid
- target 0.85 over 30 years on a 0.1 grid equals a brute-force scan of the grid
- target 0.95 over 30 years on a 0.1 grid equals a brute-force scan of the grid
- target 0.85 over 45 years on a 0.1 grid equals a brute-force scan of the grid
- target 0.85 over 20 years on a 0.25 grid equals a brute-force scan of the grid
- target 1 over 30 years on a 0.1 grid equals a brute-force scan of the grid
- a higher target or a longer retirement never allows a higher rate; the default grid is 0.1 and the default horizon is the whole run
- is 0 when not even the smallest step clears the target (a negative real return over 60 years)
- refuses inputs that would give a meaningless answer instead of guessing
- refuses a run that would draw more than 25 million yearly returns (a 200 MB table) instead of exhausting memory
- refuses a negative or non-numeric withdrawal, a horizon beyond the run, and a target outside (0, 1]
mortgageMortgage payment, amortization schedule, mortgage insurance, and the price a monthly budget affords34/34 ✓
- matches the closed-form payment for the standard cases
- reproduces the classic 12%, 12-month, $1,000 loan: $88.85 a month, $66.19 of interest
- the payment factor is the payment per $1 of loan: 0.0063206802 at 6.5% over 30 years
- a 0% loan is principal ÷ months
- never returns NaN or a negative payment for bad input
- has one row per month, ends at exactly zero and repays exactly the loan
- total interest = payment × months − loan = $382,633.47
- month 1: interest = balance × APR ÷ 12 = $1,625.00, the rest of the $1,896.20 is principal
- balanceAfter (closed form) agrees with the month-by-month recursion
- the yearly roll-up: year 1 pays $19,401.27 of interest and $3,353.18 of principal
- a 0% loan repays the same principal every month
- a 15-year loan has 15 yearly rows
- 10% down on $400,000 at 6.5% over 30 years: 78% of the price is reached after 109 months; 80% after 95
- 5% down: 135 months
- agrees with walking the schedule for many loans
- edge cases: already at or below the target is 0; a target of zero is the whole term
- 20% down on $400,000: loan $320,000, payment 2,022.62 + tax 400 + insurance 100 + HOA 100
- cash to close = down payment + closing costs (3% of price = $12,000)
- 10% down adds PMI: 0.6% of the $360,000 loan ÷ 12 = $180 a month, for the 109 months until 78% of the price
- PMI starts below 20% down, not at 20%
- a zero price or garbage input gives finite zeros, never NaN
- reproduces the audit reference: $10,000 a month, 28% rule, 1.2% tax, $1,200 insurance, 20% down, 6.5%, 30 years → $445,799
- and reproduces the legacy figure once property tax is left out: $533,962 (19.8% too high)
- with only principal and interest counted (no tax, insurance, HOA or debts) the $145,000 household gets $669,100, the reference build’s original Money Map ceiling (the Map now uses the full housing cost)
- the default page at the 7.0% rate (Freddie Mac PMMS 7.03%, week of 2026-09-24, rounded): $145,000, $360 of other debts → $536,368, and $3,381.10 a month at the $536,000 ceiling
- the default page: $145,000, $360 of other debts, 0.89% tax, $1,569 insurance → $560,963, limited by the housing ratio
- round trip: the total payment at the ceiling equals the budget (with and without PMI, either ratio binding)
- the back-end ratio binds when other debts are large: $100,000 income, $2,000 of debts, 36% total → $1,000 left for housing
- a price of zero when insurance and HOA already use the budget, or debts use all of the total-debt room
- PMI lowers the ceiling for the same payment budget, and a bigger down payment raises it across the 20% line
- never rises with the rate, tax, insurance, HOA or other debts; never falls with income
- a 15-year loan gives a lower ceiling than a 30-year loan at the same payment budget
- extreme and bad inputs stay finite
- is $832,750 for a one-unit home, and $1,249,125 (1.5×) in the highest-cost areas
mortgage-payoff-vs-investCalculation engine11/11 ✓
- the example: paying down finishes in month 190, saves $139,557.90 of interest, and wins by $28,727.69 at a 7% return
- the break-even return is 7.79% after a 15% tax on growth, 7.23% with no tax
- investing wins at a 10% return by $110,700.89; paying down wins big at 4% by $100,632.17
- a lower mortgage rate tips it toward investing: at 6% investing wins by $9,993.44 (payoff month 193); at 3% by $101,287.11
- more extra pays off sooner: $1,000 a month ends in month 142 and paying down wins by $41,147.20
- net worth year by year: pay-down starts a little behind and finishes ahead; year 20 −$149,358 against −$150,374
- nothing extra means the two strategies are the same loan: the loan ends on schedule (month 300), nothing is saved, no advantage
- no balance or no term is zero, never NaN
- a loan at 10% in a currency that loses 3% a year against the dollar costs 7.0232% in dollars; 5% → 5.0903%; 10% → 0.4276%
- a currency that gains against the dollar makes it cost more: 9% with a −2% change is 11.0371%
- never below zero, and no loan rate is no cost
net-worth-by-ageNet worth against families your age (Federal Reserve Survey of Consumer Finances, 2022, in 2026 dollars); the survey publishes medians and averages, not percentiles22/22 ✓
- has exactly 6 age bands covering the full lifespan with no gaps
- age 35 finds the 35-44 band, matching the Fed table exactly ($135,600 median)
- age 70 finds the 65-74 band ($409,900 median — the highest of any age band)
- age 80 finds the 75+ band
- compareNetWorth at age 35 with $271,200 net worth is exactly 2x the median
- compareNetWorth correctly reports below-median for a below-median value
- the 2022 annual average is the mean of the twelve monthly values, and BLS prints it as 292.655
- the latest month is August 2026, at 334.980, read from BLS on 2026-09-28
- the Fed’s own income factor for the 2022 survey (Bulletin Table B.1: calendar-2021 income → 2022 dollars = 1.0809) is the CPI-U ratio of annual averages, so “2022 dollars” is the 2022 annual-average price level
- the factor is latest ÷ 2022 average = 1.14462 (prices up 14.5%)
- the published-2022 basis is exactly 1: nothing is restated
- fractions, negatives and NaN do not fall through to “75 or more”
- pickScfAgeBand is the same rule for any list of bands ordered by age
- leaves a published figure exactly as published when the factor is 1 (no rounding)
- multiplies by the factor and rounds to the nearest $100 otherwise
- at factor 1 it is the published table, unchanged
- at the August 2026 factor every median and mean is the 2022 figure × 1.144624, to the nearest $100
- keeps labels and age bounds, keeps the peak at 65–74, and never changes the published constant
- at factor 1 it gives the published comparison, written out by hand (the same answers compareNetWorth has always given)
- flips a verdict that inflation decides: a 40-year-old with $150,000
- the default Money Map profile (age 34, $429,000 − $12,000): 10.69× the published median, 9.35× the 2026-dollar median
- uses the restated median and mean as the thresholds (35–44: $155,200 and $629,100)
new-deductions-2026Calculation engine12/12 ✓
- capped at $25,000; reduced by 10 cents per dollar of MAGI over $150,000: 170,000 → $23,000; 190,000 → $21,000; joint 310,000 → $24,000
- never more than the tips, and gone once the reduction reaches the cap: 5,000 stays 5,000 at 150,000 and is 0 at 400,000
- capped at $12,500 ($25,000 joint); 170,000 → $10,500; joint 310,000 → $24,000 on 30,000
- capped at $10,000; no reduction at exactly $100,000; each $1,000 or part over costs $200: 100,500 → 3,800 from 4,000; 140,650 → wiped out
- single, AGI $140,650, $3,000 of overtime premium: allowed in full, saves $720 at 24%; the car loan interest is phased out
- add $5,000 of tips: 8,000 in all, saves $1,920
- AGI $60,000, $8,000 of tips, $4,000 overtime, $2,000 of car interest: 14,000 allowed, taxable 43,900 → 29,900, saves $1,680
- joint, AGI $250,000, $20,000 each of tips and overtime and $9,000 of car interest: 40,000 allowed (car interest phased out), saves $8,928
- the senior deduction is one of the four (the extra standard deduction for age 65 is older law and is in both totals): $6,000 at 12% saves $720; with $5,000 of overtime, $1,320 in all
- itemizing above the standard deduction still adds the new deductions on top
- nothing entered saves nothing
- the constants are the statutory ones
non-resident-fireFIRE number adjusted for cost of living abroad; return home versus stay35/35 ✓
- $100k portfolio, $1500/mo savings, $60k US spend, moving to Portugal (2024 private-consumption price level)
- throws instead of silently pricing the country as the US
- same inputs: staying in the US takes longer and needs a bigger number than returning to Portugal
- going “home” to the US price level saves nothing (yearsSaved 0, no reduction)
- the two paths are the existing engine’s two paths (number, months, years and timeline)
- no withholding, no price-level factor: the number before withholding is the number
- prices the lifestyle: 60,000 × 0.2378 = 14,268 at national-average prices, × 1.5 = 21,402 a year
- grosses the number up for 30% withholding on the pre-tax half: 21,402 ÷ (1 − 0.5 × 0.3) ÷ 0.04 = 629,470.59, against 535,050 before withholding
- the dates: 36 months with withholding, 21 months without, 153 months if you stay (all three from the closed form)
- is confirmed by the withdrawal engine: withdrawing 4% of the grossed-up number, half from a pre-tax account, nets the spending
- at exactly the national-average price level the grossed-up number is 419,647 against 420,000 invested: the page must not present that knife-edge as a date
- a pricier home only delays FI: 1× is 0 months, 1.5× is 36, 2× is 68 (closed form)
- “at-fi” keeps saving at the US pace and ignores the savings share
- “now” saves the given share of today’s amount after the move: half of 4,200 is 2,100, which takes 56 months (closed form) instead of 36
- “now” with the same savings is the same plan as “at-fi”
- saving less after the move never brings FI forward
- rounds the reduced saving to whole dollars
- a higher pre-tax share never lowers the number or brings FI forward
- 100% pre-tax at 30% makes the number 1/0.7 (+42.9%) larger — the audit’s “up to 43%”
- a lower withholding rate (a treaty) lowers the grossed-up number toward the plain one
- a higher withdrawal rate never raises either number; more savings never delays FI
- a cheaper country never costs more (every non-US row of the table, ordered by its own price level, same inputs)
- going “home” to the US price level with no factor and no withholding saves nothing
- Japan 0.6566 → 39,396; Korea 0.6399 → 38,394; China 0.4933 → 29,598; Brazil 0.4685 → 28,110 on $60,000
- reports whether each path is reached within the 60-year search: both, neither, or only one
- a path that is already covered is reached (month 0)
- spending is rounded to whole dollars at each step: $61,234 at 0.2378 is $14,561; × 1.5 is $21,842 (independently: 14,561.4452 and 21,842.1678)
- “move now” without a savings share means the same savings; a share that is not a number does too
- a real return of exactly zero (nominal equals inflation) is a straight line: (629,470.59 − 420,000) ÷ 4,200 = 49.9 → month 50
- a negative real return (2% nominal, 5% inflation) still matches the closed form when the number is reachable
- an unlisted country is refused loudly, never priced as the US
- a price-level factor that is not a positive number is refused
- a pre-tax share outside 0–1 is clamped, and the result reports the share it used
- nothing invested and nothing saved: neither path is reached within 60 years (months hit the 720 cap)
- zero spending is a zero number and month 0, never NaN
nonresident-spouse-2026Calculation engine14/14 ✓
- the 2026 married-filing-separately table: 1,240 at 12,400; 5,800 at 50,400; 17,966 at 105,700; 41,024 at 201,775; 58,448 at 256,225; 103,291.75 at 384,350
- is 10% of the first dollars, zero for nothing, and safe with bad numbers
- the example: the election owes 13,283, filing separately 22,490, head of household 18,747; the election saves 9,207 and 5,464
- without the head of household test met, that route is not offered and the saving is against filing separately
- a spouse with 60,000: joint tax 26,483, and head of household (18,747) is now lower
- a foreign tax credit is limited to the U.S. tax on the spouse’s share: 5,000 fully used; 20,000 limited to 7,919.16
- a spouse with 100,000 lifts the joint tax to 35,283
- the election tax by the spouse’s income: 13,283; 17,683; 22,083; 30,883; 40,024; 49,624; 59,224
- high and low incomes: 500,000 → 102,608 / 140,125.25 / 133,508.50; 30,000 → 0 / 1,420 / 585
- no income of your own and a spouse with 50,000: 1,780 on the election
- ties go to the election only when it is not worse; bad numbers do not break it
- the spouse can earn 41,850 before the election costs more than filing separately, and 24,836.36 before it costs more than head of household
- at the break-even the two taxes are equal
- with no income of your own the spouse can earn up to the 32,200 joint standard deduction before any joint tax is owed
nra-401k-withdrawalTax on 401(k) and IRA withdrawals when leaving the US (treaty rate versus default withholding)33/33 ✓
- age 45, $200k, default 30% withholding: penalty stacks, 40% total withheld
- age 62 (past 59.5): no early-withdrawal penalty, only withholding
- a lower treaty rate (e.g. 15%) still stacks with the penalty under 59.5
- age exactly 59.5 does not trigger the penalty (penalty applies strictly before)
- the plan withholds only the 30%: withheldAtSource is 60,000 and the plan pays out 140,000
- the 10% penalty is owed with the return, not taken at payout
- tax plus penalty is 80,000 (40%); totalWithheld still reports that same figure, but it is not what is withheld at source
- accounting identity: the payout minus the penalty is what you keep, for any age and rate
- no penalty over 59½: nothing is owed with the return and the payout is what you keep
- an empty balance is all zeros, never NaN
- 30% nonresident withholding (IRC §1441), 10% penalty before 59½ (IRC §72(t)), 20% withholding on an eligible rollover distribution paid to a resident (IRC §3405(c))
- the constants are the ones the engine applies
- drag is share × rate: half the portfolio pre-tax at 30% takes 15% of each withdrawal
- defaults to the statutory 30% when no rate is given
- the factor is 1 ÷ (1 − drag): 1/0.85 at 50%, 1/0.7 (+42.9%, the “up to 43%” figure) at 100%, exactly 1 at 0%
- grossUpForNraWithholding: to net $34,000 with half the money pre-tax at 30% you must withdraw $40,000
- is confirmed by the withdrawal engine itself: withdrawing the grossed-up amount, with half of it from a pre-tax account, nets the need
- shares and rates outside 0–1 are clamped rather than producing a negative or infinite factor
- the drag can never reach 1: even 100% of the portfolio at a 100% rate is capped at 0.95 (a factor of 20), so a page never divides by zero
- a rate that is not a number falls back to the statutory 30%, the same default calcReturnHomePlan uses; a share that is not a number is 0
- a bigger share or a higher rate never lowers the number you need
- single, $200,000 at 45, no other income: withheld 40,000, tax 36,734, penalty 20,000, keep 143,266, owe 16,734 more
- past 59½ there is no penalty, and the 20% withheld is more than the tax: a 3,266 refund
- stacks on top of other income: $145,000 of wages plus a $200,000 payout adds 60,350 of tax (a 30.2% average rate on the payout)
- married filing jointly and head of household use their own tables ($26,340 and $32,991 on $200,000)
- a payout wholly inside the standard deduction owes no income tax, so the 20% is refunded apart from the penalty
- a payout entirely inside one bracket is taxed at that rate: $50,000 on top of $300,000 (single) is 35% = 17,500; $100,000 on $250,000 (MFJ) is 24% = 24,000
- agrees with the federal-tax engine it is built on, for a spread of inputs
- other income below the standard deduction leaves part of the deduction to shelter the payout
- more other income never lowers the tax on the same payout, and a bigger payout never lowers what you keep
- the top federal rate caps the income tax at 37% of the payout, and the accounting identity holds
- an empty balance is all zeros, and non-finite or negative other income is treated as none
- age exactly 59½ carries no penalty, like the nonresident case
paycheck-calendarCalculation engine5/5 ✓
- matches the independent calendar for every first payday from January 1 to 14
- first payday on January 2: paydays Jan 2, Jan 16, Jan 30, … Dec 18
- every month holds two or three, never fewer, and three only in the months found
- a leap year can hold 27 from a first payday of January 1 or 2
- a first payday outside 1 to 14 is clamped, and a bad one is January 1
payroll-tax-2026Calculation engine29/29 ✓
- $145,000: 6.2% of all of it (under the base) and 1.45%, no Additional Medicare
- $250,000 single: Social Security stops at the $184,500 base, 0.9% on the $50,000 above $200,000
- the joint threshold is $250,000: the same wages owe no Additional Medicare
- no wages, bad input: zero
- $20,000 of profit: 92.35% is 18,470; 12.4% + 2.9% = 2,825.91; half is deductible
- $100,000 alone: 14,129.55
- wages use the Social Security base first: $100,000 of profit on $145,000 of wages is 4,898.00 + 2,678.15 + 336.15 (Additional Medicare) = 7,912.30
- $20,000 on top of $145,000 of wages is unchanged: it all fits under the base and the 0.9% threshold
- $300,000 alone: the base caps Social Security at 22,878, plus 8,034.45 and 693.45 = 31,605.90
- below $400 of net earnings (92.35% of the profit) there is no tax: $433 of profit is $399.88
- $20,000 of profit: federal +3,568.71 (the 20% QBI deduction is 3,717.41), SE tax 2,825.91, you keep 13,605.38 (68.0%)
- $50,000: keep 34,761.68
- $100,000 pushes taxable income above the QBI threshold: no deduction is taken (tax overstated), keep 67,477.88
- a state rate takes its share of the profit after the deductible half of SE tax
- no profit, no tax, no share
- 22% to $1 million: $50,000 is 11,000
- 37% above $1 million: $1.2M is 220,000 + 74,000 = 294,000
- counts what was already paid this year: $300,000 after $900,000 is 22,000 + 74,000 = 96,000
- nothing or bad input is zero
- $50,000 vest stays in the 24% bracket: 12,000 owed against 11,000 withheld, a 1,000 gap
- $100,000 crosses into 32%: 25,822 owed against 22,000 withheld
- $250,000: 77,371.75 owed against 55,000 withheld
- the vest by bracket: $100,000 on 124,550 of taxable income splits 77,225 at 24% and 22,775 at 32%
- a small vest can be over-withheld
- FICA on the vest: $50,000 adds 3,174 (8,990→11,439 Social Security base, Medicare, and 0.9% above $200,000)
- $7,250 (5%): federal 1,740 (24%) + FICA 554.625, you keep 4,955.375 (68.4%)
- $20,000: federal 4,800 + FICA 1,530, keep 13,670
- a state rate takes its share of the raise
- no raise, nothing
pfic-2026Calculation engine10/10 ✓
- the top rate is 37% and the Q4 2026 underpayment rate is 7%
- interest compounds daily: 7% for one year is 7.2501%, for eight years 74.9%; none for no time or no rate
- the base case: 16,610.24 of tax and interest on a 35,909.31 gain (46.26%), against 5,386.40 for a U.S. fund
- mark-to-market: 8,618.23 of tax over the years, 10,790.85 in year-8 dollars, 5,404.46 above a U.S. fund
- one year: the gain is all the sale year’s, 840 either way, and no interest
- two, fifteen and ten years at other returns
- no interest rate leaves only the tax (12,702.92); a 37% ordinary rate raises it to 17,193.77
- no return means no gain and no tax on any route
- the pieces add up: prior tax + interest + sale-year tax is the total; the yearly shares add to the gain
- bad numbers become zero, years stay between 1 and 40, and rates are capped at 100%
real-hourly-wageCalculation engine39/39 ✓
- case 0: 145000 pay, 40 h, 53 min commute
- case 1: 145000 pay, 40 h, 0 min commute
- case 2: 145000 pay, 40 h, 53 min commute
- case 3: 145000 pay, 0 h, 53 min commute
- case 4: 145000 pay, 40 h, 53 min commute
- case 5: 145000 pay, 40 h, 53 min commute
- case 6: 0 pay, 40 h, 53 min commute
- case 7: 145000 pay, 40 h, 53 min commute
- case 8: 145000 pay, 40 h, 120 min commute
- case 9: 145000 pay, 40 h, 53 min commute
- case 10: 145000 pay, 40 h, 53 min commute
- case 11: 60000 pay, 32 h, 53 min commute
- case 12: 145000 pay, 40 h, 53 min commute
- case 13: 145000 pay, 40 h, 53 min commute
- case 14: 261000 pay, 40 h, 20 min commute
- case 15: 76000 pay, 60 h, 53 min commute
- case 16: 153000 pay, 40 h, 90 min commute
- case 17: 73000 pay, 37.5 h, 45 min commute
- case 18: 85000 pay, 37.5 h, 0 min commute
- case 19: 392000 pay, 20 h, 45 min commute
- case 20: 90000 pay, 60 h, 0 min commute
- case 21: 259000 pay, 60 h, 53 min commute
- case 22: 333000 pay, 20 h, 53 min commute
- case 23: 34000 pay, 37.5 h, 0 min commute
- case 24: 37000 pay, 37.5 h, 20 min commute
- case 25: 189000 pay, 45 h, 20 min commute
- case 26: 54000 pay, 20 h, 20 min commute
- case 27: 296000 pay, 60 h, 20 min commute
- case 28: 38000 pay, 40 h, 0 min commute
- case 29: 97000 pay, 32 h, 90 min commute
- case 30: 189000 pay, 20 h, 53 min commute
- case 31: 261000 pay, 60 h, 45 min commute
- the default worked example
- a job with no commute, no costs and no paid time off pays exactly the take-home wage
- time and costs each lower the real wage; paid weeks off raise it
- costs above take-home give a negative real wage, and no hours give none
- bad numbers count as zero and days and weeks are capped
- a $1,000 purchase at a $44.21 real wage costs 22.6 hours
- is null when the wage is zero, negative or missing
real-returnCalculation engine16/16 ✓
- 7% nominal and 3% inflation is 3.8835%
- 10% and 3.5% is 6.2802%
- a return below inflation is negative: 2% and 3% is −0.9709%
- the shortcut overstates more as rates rise: 20% and 15% is 4.3478%, not 5%
- equal nominal and inflation is zero
- bad input is treated as zero, never NaN
- 4% real at 3% inflation needs 7.12% nominal
- is the inverse of realReturn
- $100,000 after 20 years at 3% buys $55,367.58 of today’s goods
- $100,000 after 10 years at 3.4% buys $71,580.48
- zero years or zero inflation changes nothing
- $10,000 at 7% for 30 years is $76,122.55 nominal and $31,361.48 in today’s dollars
- the default page: $420,000 for 31 years is $3,420,947 nominal and $1,368,335 in today’s dollars
- a 0.5% fee comes off before inflation: 6.5% kept, 3.398% real; the shortcut overstates it by 0.102 points
- a return below inflation shrinks the real balance while the nominal one grows
- zero years and bad input are safe
rebalanceCalculation engine15/15 ✓
- no new money: sell $18,000 of US stocks and $6,000 of international, buy $24,000 of bonds
- drift before: 4.29, 1.43, −5.71 and 0 points; largest 5.71
- $30,000 of new money and selling allowed: the money alone gets there — buy $30,000 of bonds, sell nothing
- targets that do not add to 100 are scaled: 50 / 30 / 30 becomes 45.45 / 27.27 / 27.27
- a holding with a zero target is sold out: [100, 50, 50] to 50 / 50 / 0 sells the third
- trades add up to the new money
- $10,000 goes to bonds, the furthest below target; the others stay over; short of target
- $30,000 is exactly enough to reach target: bonds get it all
- $100,000 is more than enough, so every holding lands on target: 42,000 / 14,000 / 44,000
- no new money means no trades
- a zero-target holding is never bought: [100, 50, 50] to 50 / 50 / 0 with $40 of new money → $40 to the second
- buys add up to the new money whenever there is a target to buy toward
- the money that would get every holding to target without selling: US stocks are 270,000 ÷ 0.6 = 450,000, so 30,000
- no targets means nothing to do; an empty portfolio with targets buys the new money at the targets
- bad inputs count as zero
recurring-spendCalculation engine10/10 ✓
- a year is 52 weeks: $6 five times a week is $1,560; $5 seven times a week is $1,820
- bad or negative inputs are zero
- $6 five times a week for 31 years: $48,360 spent, $92,304.79 invested instead in today’s dollars
- other horizons: 1 year 1,587.58, 5 years 8,578.83, 10 years 18,957.95
- other frequencies at 31 years: 1 a week 18,460.96 · 2 a week 36,921.92 · 7 a week 129,226.71 · 14 a week 258,453.41
- the value is proportional to the yearly spend: half the price or half the visits is half the value
- $5 seven times a week for 30 years is $1,820 a year and $101,880.24 invested
- with no growth the invested value is just what was spent
- nothing spent, or no years, is zero — and a bad rate is treated as no growth
- starts at zero, ends where habitCost ends, and never falls
rent-vs-buyCalculation engine9/9 ✓
- the example: payment 2,395.09, $103,500 up front, buying trails renting for 20 years and is ahead from year 21
- the year-by-year figures: house value, loan, and each route’s net worth
- running totals: through year 5 interest 122,676.18… (see Python), upkeep and rent paid; selling cost is 6% of the value
- prices may fall: 3% a year down leaves the buyer 24,370.77 after 5 years, 159,933.57 behind the renter (never breaks even); −99 is the floor
- only 5% down adds PMI and a bigger payment: payment 2,844.17, year-1 outlay 3,918.68, buying trails by 44,202.51 / 58,981.48 / 77,645.65 at years 1 / 5 / 10
- a 4% rate with 5% appreciation: buying is ahead by year 3 and by 392,250.85 at year 15
- with no growth, no costs and no interest, buying is ahead by the principal repaid: $36,000 a year for 10 years, then the house is paid off
- never even within the years simulated is null
- bad inputs count as zero and years are 1 to 40
residency-2026Substantial presence test: weighted days, exempt days and resulting tax status42/42 ✓
- 31 days this year and 183 weighted days
- student exemption lasts 5 calendar years; teacher/trainee exemption fails at 2 of the 6 preceding years
- Pub 519 example: 120 days in each of three years is 120 + 40 + 20 = 180 weighted days — not a resident
- exactly 183.0 weighted days meets the test ("at least 183"): 123 + 40 + 20
- fractions are exact: 181 days with 100 and 100 earlier is 181 + 33.33 + 16.67 = 231.0, but 100/100/100 is only 150
- the 31-day floor is separate: 30 days this year fails even when the earlier years alone are worth 182.5
- a year in the country all three years is a resident many times over
- matches the rule restated with rounding for every combination on a grid
- more days in any year never turns "meets" into "does not meet"
- bad or out-of-range day counts are cleaned, not propagated (negative → 0, over 366 → 366, fractions round, NaN → 0)
- 120/120/120: the test is first met at 123 days this year, so 122 is the most that keeps you under it
- with nothing in the earlier years the threshold is 183 days
- when the earlier years already carry the weight, the 31-day floor is the threshold
- once the test is met, daysToMeet is zero or negative and equals threshold − days counted
- agrees with brute force: the first count of days this year that meets the test is the threshold
- an F-1 student in their second year: every day is exempt, so nothing counts
- OPT then H-1B in the same year: only the days after the change count (200 present, 90 of them as a student)
- a student is exempt through the 5th calendar year and no longer in the 6th (Pub 519: "more than 5 calendar years")
- past the student limit, the result the visitor would get if the exception applies is reported alongside
- a teacher or trainee is exempt unless exempt in 2 of the 6 preceding years
- other exempt categories (foreign-government related, charitable-event athletes) have no year limit
- with no exempt days entered there is nothing to limit, even past the student limit
- excluded days can never exceed the days present (clamped), and never go negative
- a green card at any time in the year makes you a resident, whatever the day count
- the closer-connection exception does not apply to a green card holder
- 150 days this year with 100 in each earlier year meets the test (1200 ≥ 1098) but the exception makes you a nonresident
- it needs fewer than 183 days this year: 182 qualifies, 183 does not
- it is not available to someone who applied for a green card that year
- it does nothing when the test is not met in the first place
- without claiming it, the same visitor is a resident
- a new resident whose start day is unknown: resident, first year — dual-status only if the start was after January 1
- … not in the US (as a non-exempt person) on January 1 → the year you arrive is dual-status
- … already here and counting on January 1 (for example a student in the 6th year) → a resident all year, nothing to split
- the January 1 answer changes nothing for someone who was a resident last year, or who is not a resident
- a green card holder whose day count is not met starts residency on the day they became a permanent resident: dual-status even if they were here on January 1
- a resident last year who stays is a resident all year
- a resident last year who is leaving for good: resident, and departing — residency ends December 31 unless an earlier termination date applies
- arriving and leaving in the same year is a first year of residency that is also a departure
- a green card issued this year to someone who was not a resident before: first year of residency; a resident last year: all year
- not meeting either test is a nonresident year — even for someone who was a resident last year
- first-year choice is worth mentioning only for a new arrival who is not a resident yet but has been here 31+ days
- the same input always gives the same answer, and the input is not modified
retirement-limits-20262026 401(k), IRA and total-contribution limits, and what an employer match is worth29/29 ✓
- carries exactly the published figures
- catch-up tier by age: none under 50; 50–59 and 64+ get $8,000; 60–63 get $11,250
- the 401(k) limit for you: $24,500, $32,500 at 50–59 and 64+, $35,750 at 60–63
- you cannot defer more than you earn
- Roth catch-up applies only at 50+, and only when last year’s FICA wages are ABOVE $150,000
- the §415(c) total is $72,000 or 100% of pay, whichever is lower; the match counts pay only up to $360,000
- audit defect #8: 6% of $100,000 with a 50% match up to 6% is $3,000 a year — not $300,000
- 4% under a 6% cap only earns match on the 4%: $2,000
- the Money Map sample: $145,000, 3% deferral, 100% match up to 6% → $4,350 now, $8,700 possible, $4,350 left on the table
- contributing more than the cap earns no extra match
- pay above $360,000 does not earn extra match: 6% cap on $500,000 is 6% × $360,000 = $21,600
- a full match that needs more than the limit is capped at what the limit allows
- no match entered (rate or cap 0) means nothing to leave on the table
- bad input stays finite
- the sample household: $4,350 in, $4,350 match, $8,700 total, $4,350 left, $20,150 of room under the $24,500 limit
- traditional at the 24% bracket saves 24% of the deferral; Roth saves nothing now
- a deferral above the limit is capped at the limit (and the match is computed on the capped amount)
- at 55 the limit is $32,500 and the part above $24,500 is catch-up
- Roth catch-up rule: above $150,000 of last year’s wages the catch-up part gets no deduction
- under 50 the Roth catch-up rule never applies, whatever the wages
- flags total contributions (you + employer, excluding catch-up) above $72,000
- never returns NaN or a negative amount
- $8,700 a year for 31 years at 7% before 3% inflation grows to $514,776.71 in today’s dollars
- $17,400 → $1,029,553.43; the missing $4,350 a year alone → $257,388.36
- with no growth it is simply the sum of the deposits
- zero years or zero deposits give zero
- the yearly series starts at 0 and ends at the same figure
- traditional IRA deduction with a plan at work: $81,000–$91,000 single, $129,000–$149,000 joint; $242,000–$252,000 when only the spouse is covered
- Roth IRA contributions: $153,000–$168,000 single, $242,000–$252,000 joint
retirement-savings-by-ageRetirement savings by age (Federal Reserve Survey of Consumer Finances, 2022) and a pay-multiple rule of thumb40/40 ✓
- has six age bands covering every age with no gaps, the same bands as the net-worth table
- carries every published figure exactly: share with an account, median and mean balance among those that have one
- agrees with the Board’s internal-data historic Table 6: shares within 0.3 points, medians within 2%, means within 0.2%
- all families: 54.36% have an account, median $87,000, mean $333,940 (the Bulletin text, on internal data: 54.3%, $86,900, $334,000)
- the average is 2.6 to 3.6 times the median in every band (a few very large balances pull it up)
- the share with an account peaks at 45–54 (62.16%); the median balance peaks at 65–74 ($200,000)
- fewer than half of families under 35 have an account (49.63%), which is why an all-family median there would be zero
- fractions, negatives and NaN do not fall through to “75 or more”
- age 18 → Under 35
- age 34 → Under 35
- age 35 → 35–44
- age 44 → 35–44
- age 45 → 45–54
- age 54 → 45–54
- age 55 → 55–64
- age 64 → 55–64
- age 65 → 65–74
- age 74 → 65–74
- age 75 → 75 or more
- age 95 → 75 or more
- age 40 finds the 35–44 band: 61.53% have an account, median $45,000, mean $141,520
- at factor 1 it is the published table, unchanged
- at the August 2026 factor (1.144624) every balance is the 2022 figure × the factor, to the nearest $100; shares do not move
- restates the all-family row too ($87,000 → $99,600; $333,940 → $382,200) and leaves the published constants alone
- golden: $90,000 at age 35 is exactly 2× the $45,000 median, above it and below the $141,520 average
- no balance: no account, a multiple of 0, a gap of minus the whole median, and the share of families in the same position
- a retirement balance cannot be negative: it is read as none
- thresholds are the median and the mean of the band (45–54: $115,000 and $313,220)
- the factor moves the comparison and can flip a verdict: a 40-year-old with $50,000
- with no factor given it means the published 2022 dollars
- more savings never lowers the multiple; the multiple is monotone in the balance
- carries the five published checkpoints and nothing in between
- multiple of pay = balance ÷ pay, to two places, and undefined without pay
- never rounds UP onto a checkpoint it has not reached: 2.9993× prints 2.99, and the standing agrees
- Fidelity’s stated basis is carried as named numbers: 15% a year from 25, over half in stocks, retire at 67, about 45% replaced, planning age 93
- a nonsense age or multiple does not throw: it reads as the youngest, with nothing behind you
- before 30 there is no checkpoint behind you: under 1× you are still building, at 1× you are already at the first mark
- between checkpoints: behind the last one, between the two, or already at the next one
- a checkpoint age counts as reached: at exactly 40 you should be at 3×
- from 67 there is no next checkpoint: 10× is met or it is not
roth-conversion-2026Calculation engine19/19 ✓
- Social Security lines are the statutory ones and the IRMAA lines are CMS 2026
- 30,000 of benefits: 13,850 with 30,000 other income; none with 10,000; 25,500 (85%) with 60,000
- married: 50,000 of benefits with 60,000 other income is 40,850; tax-exempt interest counts toward provisional income
- between the lines it is half the excess over the base amount, capped at half the benefits
- no benefits, no tax; bad numbers become zero
- tiers step up above each line and at the last line
- the yearly surcharge for one person: tier 1 $1,148.40; tier 2 $2,884.80; tier 5 $6,684 and for two people double
- S1, no conversion: taxable Social Security 13,850, AGI 43,850, tax 2,116 and the tax torpedo makes the next dollar 22.2%
- S1, convert 20,000: benefits reach 85% (25,500), tax 6,015.60, extra 3,899.60, 19.50% on average and 23.32% on the next dollar
- S1, convert 50,000 and 100,000
- S2 (married, two on Medicare): convert 40,000 extra 4,998 (12.50%); convert 120,000 extra 23,932, tier 1 (+2,296.80), marginal 24.64%
- S3 (under 65, no benefits): convert 30,000 extra 3,430; convert 80,000 extra 12,780
- no conversion has no average rate; bad numbers do not break it
- S1: 19,050 to the top of the 12% bracket; 71,245.28 to the 22% top; 164,425 to the 24% top; 53,500 to the first IRMAA line
- S2: 45,800 to the 22% top; 144,732.14 to the 24% top; 115,500 to the first IRMAA line
- S3: 46,500 to the 12% top; 101,800 to the 22% top; 89,000 to the first IRMAA line
- converting exactly the room lands on the line and one more dollar goes over
- 0 when the line is already passed
- the bracket tops are the 2026 ones, without the open-ended 37% bracket
roth-ladderRoth conversion ladder that fills a chosen tax bracket, with the ACA line and capital-gains stacking61/61 ✓
- conversion room and tax are the 2026 fixed values ($66,500 room, $5,800 tax)
- is relevant before age 60, with a gap to 59.5
- is not relevant at or after age 60
- tax savings scale with the gap between current bracket and 12%
- floors at zero savings, never negative, when the layered tax already exceeds flat current-bracket tax
- a real 10% bracket still shows positive savings (10,650 vs 5,800 flat tax)
- reproduces calcRothLadder for its fixed case: $66,500 room, $5,800 tax, 10-year gap, first rung usable at 55
- tax saved against a flat later rate equals calcRothLadder.taxSavings when the balance never runs out
- reports no saving when no later rate is given
- the saving is not floored: converting above the later rate shows as negative (single, $100,000 other, 24% bracket, 22% later)
- the saving is exactly later rate × converted − tax paid, whatever the schedule
- single, other income 0, fill the 0.12 bracket: room 66500, tax 5800
- mfj, other income 0, fill the 0.12 bracket: room 133000, tax 11600
- hoh, other income 0, fill the 0.12 bracket: room 91600, tax 7740
- single, other income 0, fill the 0.1 bracket: room 28500, tax 1240
- single, other income 0, fill the 0.22 bracket: room 121800, tax 17966
- single, other income 0, fill the 0.24 bracket: room 217875, tax 41024
- single, other income 20000, fill the 0.12 bracket: room 46500, tax 5410
- mfj, other income 30000, fill the 0.22 bracket: room 213600, tax 35932
- other income at or past the bracket top leaves no room: empty ladder, zeros, no NaN
- the last year converts only what is left, and pays tax on only that (no growth)
- a balance smaller than one year of room converts all of it in year one
- what waits in the IRA grows at the real return, so more years are needed
- the default-page case: age 50, $750,000, 4% real — ten rungs of $66,500, $58,000 tax, $269,078 still pre-tax
- the ladder stops at 59½: ceil(59.5 − start age) rungs
- each rung’s five-year clock ends five years after it is converted; access is never later than 59½
- the plan reports when the first rung opens — capped at 59½, so a late start shows no early access
- unlockedBy595 counts only rungs whose five-year clock ends by 59½
- every row balances: convert + left = start, and next start = left grown by the real return
- is not relevant at 60 or later: no rungs, balance untouched — but a conversion this year is still priced
- yearOne always equals the first scheduled rung when there is one
- a zero balance gives an empty ladder and no NaN
- a higher bracket never shrinks the room; more other income never grows it
- a conversion’s tax is the difference of two whole-dollar totals, as on two returns (independently computed cases)
- ages 59½ to 59.99 have no conversion year before 59½, so no ladder
- refuses non-numeric inputs instead of passing NaN through
- an unknown bracket rate is refused instead of guessed
- omitting longTermGains changes nothing: the whole plan is identical to gains of zero
- $40,000 of gains sitting in the 0% band: the bracket room is unchanged, the tax is not — $11,800 instead of $5,800
- every rung pays that, so ten rungs cost $118,000 and the saving against a flat 22% falls from $88,300 to $28,300
- the rate on the last converted dollar is the bracket rate (12%), but the highest rate on any dollar is 27%
- without gains the peak is just the bracket rate
- MAGI: other income + gains, and with the year-one conversion added
- gains can also push an ordinary-income-only bracket comparison up: a higher bracket never costs less
- refuses non-numeric gains instead of passing NaN through
- a ceiling below the bracket room sets the amount: $62,600 converts for $5,332 (taxable 46,500 → 1,240 + 12% × 34,100)
- a ceiling at or above the room, or no ceiling, changes nothing
- when the balance is smaller than the ceiling, the balance limits it and the ceiling is not what set the amount
- a ceiling of zero (income already at the line) converts nothing and says the ceiling is why
- a negative ceiling is treated as zero
- the ceiling applies to every year, so a longer ladder is needed for the same balance
- single, no other income: nothing inside the $16,100 standard deduction, then 10%, then 12%
- other income above the deduction removes the free zone: $20,000 other → 10% for 8,500, then 12% to 46,500
- with $40,000 of gains the middle of the conversion costs 25% and then 27% (gains leave the 0% band), and the top 12%
- the same gains with $10,000 of other income shift every step down by the income already there
- married filing jointly has twice the free zone and brackets
- the steps cover exactly [0, upTo], touch end to end, and never repeat a rate
- the rates integrate to the tax: sum of rate × width equals the tax on the whole conversion
- no step hides a change of rate: inside every step the real rate on a dollar equals the step’s rate (all statuses, incomes and gains)
- nothing to convert gives no steps
- refuses non-numeric inputs
roth-vs-traditionalCalculation engine12/12 ✓
- the base case: the Roth keeps $212,107 to the traditional $209,120, ahead by $2,987; they tie at 29%
- by payout tax: 0% −$86,635.37; 10% −$56,761.10; 15% −$41,823.97; 20% −$26,886.84; 24% −$14,937.13; 30% +$2,987.43; 35% +$17,924.56
- a payout at 29% ties exactly
- a payout before 59½ adds the 10% tax and taxes the Roth’s earnings: at 50 the Roth is behind by $1,342.07 and the tie is 31.5864%
- a payout at 58 after 25 years from 33: keeps $165,079.99 against $148,091.79
- exactly 59½ is not early: age 59.5 after 5 years is qualified
- a new country taxing a qualified Roth payout at 10% leaves $190,896.55: the Roth is $18,223.30 behind and the tie moves to 36.1%
- under five years, no penalty (payout at 61): the Roth’s earnings are taxed, it is $59.27 behind, and the tie is 30.4449%
- with no investment return the Roth is ahead by $1,131.00 and the annuity factor is the number of years
- a 45% rate today puts the Roth $44,811.40 behind at a 30% payout tax, and they tie at 45%
- the tie is null when no payout rate between 0% and 100% reaches it
- bad numbers become zero, taxes are capped, and years stay between 1 and 40
runway-2026How long cash lasts: months of runway, layoff deadlines and emergency-fund targets40/40 ✓
- the grace period is 60 consecutive days (8 CFR 214.1(l)(2): "up to 60 consecutive days")
- COBRA: whole plan cost plus 2%, up to 18 months after a termination, 60 days to elect, 45 days to pay (DOL EBSA FAQ Q2, Q10, Q12)
- Marketplace: apply within 60 days of losing job-based coverage (HealthCare.gov)
- a month is 365.25 / 12 = 30.4375 days
- the default COBRA premium is the 2024 national average single premium ($8,486, MEPS-IC) plus 2%, per month
- days in a month, leap years included
- toCalendarDate clamps an impossible date to the last day of that month
- addDays crosses month and year ends: Oct 31 + 60 = Dec 30 (Nov has 30 days: +30 = Nov 30, +30 more = Dec 30)
- Jan 15 + 182 days = Jul 16 (Jan 15→31 is 16 days; +28+31+30+31+30 = 166; +16 = 182)
- daysBetween is the inverse of addDays
- formats as "Oct 31, 2026", or "Oct 31" without the year
- is 60 days unless the I-94 ends sooner ("whichever is shorter")
- ends 60 days after the last day of work (USCIS: it starts the day after the last day paid, so day 60 = last day + 60)
- golden: $30,000 against $5,000 a month lasts 6 months = 182.625 days
- the run-out date is the last day plus the whole days of cover: Jan 15, 2026 + 182 = Jul 16, 2026
- severance is added to the pool, the health premium to the burn, other income taken off it
- identity: months × net burn = pool whenever money is drawn down
- income that covers spending means nothing is drawn: no months, no run-out date, a flat path
- no money at all: the runway is zero months and the run-out date is the last day
- bad numbers (negative, NaN) are treated as zero, never propagated
- the monthly path starts at the pool, never goes below zero, never rises, and hits zero at the runway month
- the chart horizon is the runway plus a margin, floored at 6 months and capped at 36
- the health premium counted is the one passed in: a cheaper plan lengthens the runway
- comparison with the grace period: 47.9 days of cash is short of 60, 91.3 days is past it
- a self-funding household always outlasts the grace period; with no grace period given there is no comparison
- more cash never shortens the runway; a higher burn never lengthens it
- two steady incomes, no dependents, no visa: the low end of the range, 3 months
- one income doubles it to 6 (a job loss removes all of the pay instead of about half)
- each risk factor adds months: some income risk +1, irregular +3, 1–2 dependents +1, 3+ dependents +2, a work visa +2
- is capped at 12 months and says so
- the steps add up to the uncapped months, starting from the base and listing only the factors that apply
- a riskier situation never lowers the target
- golden: $9,000 against $5,000 of essentials is 1.8 months; a 6-month target is $30,000, $21,000 short, 21 months at $1,000 a month
- the months saved are exactly the runway engine's months for the same cash and spending
- already at or past the target: no gap, zero months to fund
- a gap with nothing set aside each month never closes: monthsToFund is null
- rounds months to fund up (a partial month is still a month): $21,000 at $2,500 = 8.4 → 9
- the balance path never overshoots the target: it is capped at it
- no monthly essentials: the answer is undefined (valid: false), not Infinity
- a bigger monthly saving never takes longer to fund
safe-withdrawal-rateYear-by-year real drawdown, depletion year, and the highest safe withdrawal rate24/24 ✓
- $1M at 4%, 7%/3%, 30 years: $850,470 remaining (not depleted at year 29)
- safeRateHint is ~5.5% (exact sustaining rate ≈5.488%)
- with 0% inflation, ends at $3,569,333 (no double-counted inflation)
- annualWithdrawal is the flat first-year 4% draw
- a too-high rate depletes before the horizon
- golden: $1M, 7%/3%, 30 years → 5.48%, the exact edge (5.4883%) rounded DOWN, not the rounded-up 5.5% hint
- matches the independent closed form (never above it, within 0.011 below it): 7%/3%, 30 years (the golden case)
- matches the independent closed form (never above it, within 0.011 below it): 7%/3%, 10 years (edge above the old 10% search cap)
- matches the independent closed form (never above it, within 0.011 below it): 7%/3%, 60 years
- matches the independent closed form (never above it, within 0.011 below it): 2%/6%, 60 years (negative real return: edge below the old 1% search floor)
- matches the independent closed form (never above it, within 0.011 below it): 10%/0%, 60 years
- matches the independent closed form (never above it, within 0.011 below it): 0%/0%, 25 years (no growth at all: edge is 100 ÷ years)
- matches the independent closed form (never above it, within 0.011 below it): 4%/4%, 40 years (zero real return)
- the rate it returns lasts the whole horizon and one hundredth more does not (same test as calcSWR): 7%/3%, 30 years (the golden case)
- the rate it returns lasts the whole horizon and one hundredth more does not (same test as calcSWR): 7%/3%, 10 years (edge above the old 10% search cap)
- the rate it returns lasts the whole horizon and one hundredth more does not (same test as calcSWR): 7%/3%, 60 years
- the rate it returns lasts the whole horizon and one hundredth more does not (same test as calcSWR): 2%/6%, 60 years (negative real return: edge below the old 1% search floor)
- the rate it returns lasts the whole horizon and one hundredth more does not (same test as calcSWR): 10%/0%, 60 years
- the rate it returns lasts the whole horizon and one hundredth more does not (same test as calcSWR): 0%/0%, 25 years (no growth at all: edge is 100 ÷ years)
- the rate it returns lasts the whole horizon and one hundredth more does not (same test as calcSWR): 4%/4%, 40 years (zero real return)
- sees past the old 1%–10% window: 10 years at 7%/3% is 11.79%, and a negative real return over 60 years is 0.43%
- reports the real (after-inflation) return it searched with: 7%/3% → 3.883%
- is independent of the portfolio size (the edge is a rate), and falls as the retirement lengthens
- a lower return or higher inflation never raises the edge
savings-rate-benchmarkSavings rate versus peers by age and income (BLS Consumer Expenditure Survey, 2024)28/28 ✓
- has 6 age bands covering the full range with no gaps or overlaps
- every band matches the BLS table exactly (income before taxes and the “Retirement, pensions, and Social Security” line)
- 35-44 band: $128,285 income, $12,869 in the line, 10.03% (12,869 ÷ 128,285)
- 45-54 prints as 10.0%, not 10.1%: 14,177 ÷ 141,121 is 10.046%, and rounding it to 10.05% first would round up again
- the rates by age, in whole tenths of a percent: 9.0, 10.2, 10.0, 10.0, 9.4 and 4.2
- 25-34 has the highest rate of any band (10,447 ÷ 102,494 = 10.19%) and 65 and older the lowest (2,863 ÷ 67,462 = 4.24%)
- is transcribed correctly: weighting the six groups by their consumer-unit counts gives the all-households means, $104,207 and $9,222
- findSavingsRateAgeBand puts every age in the right group, including the edges
- compareSavingsRate: a 25% saver at age 40 is well above the ~10% peer benchmark
- compareSavingsRate: a 5% saver at age 40 is below the peer benchmark
- compareSavingsRate: within a point of the peer rate is in line, even when it is a hair above
- the band is one percentage point
- works on the rates as printed (whole tenths of a percent), so the pill, the gap and the numbers on the page never disagree
- a rate that sits exactly on a half tenth rounds up, whatever the float says: 7.65% is 7.7%, 10.35% is 10.4%
- a 3% saver reading 0.3 points over the average is in line, not “above peers”
- is monotone: saving more never moves the position toward “below”
- carries the published all-households figures: $104,207 of income, $9,222 in the line, $6,684 of it Social Security deductions, $1,991 contributions to retirement plans
- Social Security deductions are most of the line: 72% of it, 6.4% of income, against 2.4% of income for everything else
- the payroll tax the page estimates on a typical paycheck is in the same range as BLS’s reported Social Security deductions
- uses the IRS Topic no. 751 rates and the 2026 wage base
- one paycheck under the wage base is 7.65% of pay, in whole dollars
- above the wage base only Medicare keeps growing (1.45% of every extra dollar)
- two paychecks each meet the wage base separately, so two earners pay more than one on the same total
- no wages or no earners means no payroll tax, and nothing odd comes out of odd input
- never falls as wages rise
- is most of the BLS line, which is why the comparison has to include it
- treats an age with a fraction as its whole year, so no age falls between two bands
- sends a negative or non-numeric age to the youngest band, not the oldest
seeded-randomDeterministic random numbers that make simulations reproducible6/6 ✓
- is deterministic for a given seed
- different seeds give different streams
- stays in [0, 1) and is uniform: mean ≈ 0.5, variance ≈ 1/12
- produces a standard normal: mean ≈ 0 and sd ≈ 1 (not the +0.056 / 1.06 of defect #4)
- about 68.3% of draws fall within one sd
- is stable and spreads similar keys apart
sepp-72t72(t) substantially equal periodic payments under the three IRS methods38/38 ✓
- age 45, $500k: amortization $28,911/yr, RMD $12,195/yr
- age 57, $500k: amortization $32,622/yr, RMD $16,779/yr
- duration is the later of 5 years or reaching 59.5
- is not relevant at or after 59.5
- formatSeppAge renders half-years with a ½ glyph
- defaults to 5% — always permitted — and reports the rate it used
- age 45, $500k at 0.04: amortization undefined a year
- age 45, $500k at 0.03: amortization undefined a year
- age 45, $500k at 0.02: amortization undefined a year
- age 50, $500k (factor 36.2): RMD $13,812; amortization $30,156 at 5%, $26,377 at 4%
- a 0% rate spreads the balance evenly over the life-expectancy years — the RMD payment, with no divide-by-zero
- the RMD payment does not depend on the rate
- a lower rate never raises the amortization payment, and it never falls below the RMD payment
- still reports the rate when the plan is not relevant (59½ or older)
- refuses a negative or non-numeric rate instead of guessing
- is 10% of what has been taken so far, before interest
- is zero before the first payment
- stops growing at 59½: payments after that were never subject to the 10% tax
- is zero at or after 59½
- is 59½ whenever 59½ is the later test whatever month the first payment is made (start age 53 or younger)
- otherwise the end lands between endAge (first payment on the birthday) and latestEndAge (a year later)
- is never earlier than endAge, and equals the age when the plan is not relevant
- refuses non-numeric or negative payments instead of returning NaN or a negative penalty
- treats a negative number of years as none paid
- refuses a non-numeric age or balance, and a negative balance, instead of returning NaN or a negative payment
- a zero balance is a valid, zero-payment plan
- is the 5% floor when no rate is given, and the floor is the 5% Notice 2022-6 always permits
- takes the HIGHER of the two months: first payment in October 2026 → August 5.23% and September 5.40% → 5.40%; in November → September and October 5.54% → 5.54%
- is never below 5%: when both months are lower the floor applies (the mid-term 120% rate was under 5% for most of 2020–2022)
- refuses a figure that looks like a percent (5.4) instead of a decimal (0.054): it would allow a 540% rate
- refuses a rate that is not a finite number ≥ 0 instead of guessing
- age 45, $500k at 0.054: amortization undefined a year
- age 45, $500k at 0.0554: amortization undefined a year
- age 50, $500k at 0.054: amortization undefined a year
- age 57, $500k at 0.054: amortization undefined a year
- age 59, $500k at 0.054: amortization undefined a year
- age 30, $500k at 0.054: amortization undefined a year
- the higher ceiling is worth about 5.6% more at the page default: $28,911 at 5% → $30,534 at 5.40% (age 45, $500k)
sequence-riskSequence-of-returns risk: the same returns arriving in different orders12/12 ✓
- bad-first and bad-last end at dramatically different balances despite the identical 30-year average return
- both sequences survive the full 30 years at this withdrawal rate
- after year 1, bad-first is already behind bad-last by exactly the swing gap
- the two 10-year swing blocks are exact reverses of each other, so their arithmetic means are identical
- a harsh enough bad-first sequence can deplete the portfolio entirely
- bad-first is five years at mean − swing, five at mean + swing, then the mean for the rest
- bad-last is the exact reverse of the first ten years
- both orders have the same average return over the horizon, equal to meanReturn
- with no withdrawals the order cannot matter: the compounded growth of the two orders is identical
- badFirst: the returns are the ones its timeline was built from — balance(t) = (balance(t−1) − W) × (1 + r(t))
- badLast: the returns are the ones its timeline was built from — balance(t) = (balance(t−1) − W) × (1 + r(t))
- a steady market (swing 0) is the average every year, in both orders
social-security-2026Social Security benefit estimate: average indexed earnings, benefit formula, claiming age and break-even115/115 ✓
- bend points: $180 and $1,085 (1979) x AWI 2024 / AWI 1977, rounded to the dollar [FR] [BEND]
- taxable maximum: $60,600 (1992) x AWI 2024 / AWI 1992 = $184,548.71, rounded to a multiple of $300 [FR]
- earnings test: $670 (1994) and $2,500 (2002) monthly exempt amounts indexed, rounded to $10, x 12 [FR] [RTEA]
- quarter of coverage: $250 (1978) x AWI 2024 / AWI 1976 = $1,892.56, rounded to $10 [QC] [FR]
- the December 2025 COLA is 2.8% [FR] [COLA]
- born 1937: 780 months
- born 1938: 782 months
- born 1939: 784 months
- born 1940: 786 months
- born 1941: 788 months
- born 1942: 790 months
- born 1943: 792 months
- born 1950: 792 months
- born 1954: 792 months
- born 1955: 794 months
- born 1956: 796 months
- born 1957: 798 months
- born 1958: 800 months
- born 1959: 802 months
- born 1960: 804 months
- born 1985: 804 months
- born 2006: 804 months
- rejects years the schedule does not cover and non-integers
- early: 5/9 of 1% a month for the first 36 months, 5/12 of 1% after; 60 months is 30% [EARLY]
- delayed credit rate by birth year: 8% a year from 1943 (6.5% for 1937-38, 7% for 1939-40, 7.5% for 1941-42) [ARDRC]
- born 1937: SSA's percentages of PIA at 62, 63, 64, 65, 66, 67 and 70
- born 1938: SSA's percentages of PIA at 62, 63, 64, 65, 66, 67 and 70
- born 1939: SSA's percentages of PIA at 62, 63, 64, 65, 66, 67 and 70
- born 1940: SSA's percentages of PIA at 62, 63, 64, 65, 66, 67 and 70
- born 1941: SSA's percentages of PIA at 62, 63, 64, 65, 66, 67 and 70
- born 1942: SSA's percentages of PIA at 62, 63, 64, 65, 66, 67 and 70
- born 1943: SSA's percentages of PIA at 62, 63, 64, 65, 66, 67 and 70
- born 1954: SSA's percentages of PIA at 62, 63, 64, 65, 66, 67 and 70
- born 1955: SSA's percentages of PIA at 62, 63, 64, 65, 66, 67 and 70
- born 1956: SSA's percentages of PIA at 62, 63, 64, 65, 66, 67 and 70
- born 1957: SSA's percentages of PIA at 62, 63, 64, 65, 66, 67 and 70
- born 1958: SSA's percentages of PIA at 62, 63, 64, 65, 66, 67 and 70
- born 1959: SSA's percentages of PIA at 62, 63, 64, 65, 66, 67 and 70
- born 1960: SSA's percentages of PIA at 62, 63, 64, 65, 66, 67 and 70
- born 2000: SSA's percentages of PIA at 62, 63, 64, 65, 66, 67 and 70
- works to the month: 62 and 1 month for a 1964 birth is 59 months early (70.4167%)
- delayed credit: 2/3 of 1% for each month past full retirement age, and none after 70 [EARLY] [EX]
- cannot start before 62
- never falls as the claim age rises
- SSA case A: the highest 35 of 40 indexed years give AIME $5,825 [EX]
- SSA case B: highest-35 total $4,814,781, AIME $11,463 [EX]
- SSA drops the lowest years: the five smallest of case A are 1986-1990 [EX]
- years with no earnings count as zero: 23 years at $145,000 is $3,335,000 / 420 = $7,940.47, so $7,940 (derived)
- rounds down to the next lower dollar, never up [FR] "round the resulting average amount down"
- does not depend on the order of the years, ignores negatives, and an empty record is zero
- a different number of computation years changes the divisor (30 years -> 360 months)
- SSA's maximum-earner example: AIME $14,358 -> PIA $4,216.90 [BENEF]
- SSA case A: AIME $5,825 -> $2,609.88, truncated to $2,609.80 [EX]
- SSA case B (eligible in 2021, bend points $996 and $6,002): $3,317.47 truncated to $3,317.40 [EX] [BEND]
- at the bend points: 90% of $1,286 is $1,157.40; $7,749 gives $3,225.56, truncated to $3,225.50 (derived)
- small amounts: 90% of $1, $2, $3 (derived)
- is always a whole number of dimes, never falls as AIME rises, and grows more slowly in the upper tiers
- a negative or non-finite AIME gives zero
- SSA case B: $3,317.40 with the 2021-2025 COLAs (5.9, 8.7, 3.2, 2.5, 2.8) is $4,152.40, each step cut to the dime [EX] [COLA]
- no COLA, or a 0% COLA, changes nothing
- SSA case A: PIA $2,609.80 claimed at 62 (60 months early, born 1964) is cut to $1,826, rounded down to the dollar [EX]
- SSA case B: PIA $4,152.40 claimed at 66 and 10 months (born 1959) is $4,152, unreduced except for the dollar [EX]
- SSA maximum earner, AIME $14,358, claims at 62 and 1 month: $2,969 [MAX] 2026 row
- SSA maximum earner retiring in 2015 at 62 and 1 month, AIME 9066: undefined at the start, undefined in 2026 after the COLAs [MAX] [BEND] [COLA]
- SSA maximum earner retiring in 2016 at 62 and 1 month, AIME 9431: undefined at the start, undefined in 2026 after the COLAs [MAX] [BEND] [COLA]
- SSA maximum earner retiring in 2017 at 62 and 1 month, AIME 9784: undefined at the start, undefined in 2026 after the COLAs [MAX] [BEND] [COLA]
- SSA maximum earner retiring in 2018 at 62 and 1 month, AIME 9936: undefined at the start, undefined in 2026 after the COLAs [MAX] [BEND] [COLA]
- SSA maximum earner retiring in 2019 at 62 and 1 month, AIME 10296: undefined at the start, undefined in 2026 after the COLAs [MAX] [BEND] [COLA]
- SSA maximum earner retiring in 2020 at 62 and 1 month, AIME 10683: undefined at the start, undefined in 2026 after the COLAs [MAX] [BEND] [COLA]
- SSA maximum earner retiring in 2021 at 62 and 1 month, AIME 11098: undefined at the start, undefined in 2026 after the COLAs [MAX] [BEND] [COLA]
- SSA maximum earner retiring in 2022 at 62 and 1 month, AIME 11430: undefined at the start, undefined in 2026 after the COLAs [MAX] [BEND] [COLA]
- SSA maximum earner retiring in 2023 at 62 and 1 month, AIME 12427: undefined at the start, undefined in 2026 after the COLAs [MAX] [BEND] [COLA]
- SSA maximum earner retiring in 2024 at 62 and 1 month, AIME 13100: undefined at the start, undefined in 2026 after the COLAs [MAX] [BEND] [COLA]
- SSA maximum earner retiring in 2025 at 62 and 1 month, AIME 13689: undefined at the start, undefined in 2026 after the COLAs [MAX] [BEND] [COLA]
- SSA maximum earner retiring in 2026 at 62 and 1 month, AIME 14358: undefined at the start, undefined in 2026 after the COLAs [MAX] [BEND] [COLA]
- delayed credits (derived): PIA $3,000, born 1960 - $3,720 at 70, $3,480 at 69, $3,240 at 68, $3,060 at 67 and 3 months, none past 70
- a zero PIA pays nothing at any age
- SSA example, under full retirement age all year: $32,320 earned, $23,400 limit, $9,600 of benefits -> $4,460 withheld [RTEA]
- SSA example, year of full retirement age: $63,000 in the 7 months before, $62,160 limit, $1 for $3 -> $280 withheld [RTEA]
- 2026 limits applied to the same $32,320: ($32,320 - $24,480) / 2 = $3,920 (derived)
- nothing is withheld at or under the limit, and never more than the benefits at stake
- the growth SSA's Quick Calculator assumes for earlier years is 2% a year above wage growth [QCFAQ]
- 34 years old, 12 years worked, stops at 45: 11 years ahead plus 12 back, 23 counted years, 12 zeros (derived)
- someone who has already stopped: the last year worked is earned at the stated level and earlier years count back from it (derived)
- with growth switched off every counted year is the same amount
- caps each year at the taxable maximum, and clamps impossible inputs
- SSA case-style arithmetic, constant earnings: 23 years at $145,000 -> AIME $7,940 -> PIA $3,254.20 (derived)
- with SSA's 2% earlier-years growth the same person: record sums to $3,128,424.48 -> AIME $7,448 -> PIA $3,129.20 (derived)
- 35 or more years fill the record: $60,000 for 36 years -> AIME $5,000 -> PIA $2,345.80, no zero years (derived)
- earnings above the taxable maximum count only up to it: 35 years at $184,500 -> AIME $15,375 -> PIA $4,369.40 (derived)
- someone who stopped after 15 years at $100,000 (derived)
- a very short record is not insured: 40 credits (10 years of 4) are needed [QC] [FR]
- low pay earns fewer than 4 credits a year: $1,890 earns one, $5,670 three, $7,560 four (derived from the $1,890 quarter amount)
- credits are counted year by year, so earlier years that paid under $1,890 (after the 2% growth) earn none (derived)
- working more years never lowers the benefit, and earning more never lowers it
- full retirement age follows the birth year
- monthly amounts are SSA's 70%, 100% and 124% of PIA [ARDRC]
- cumulative benefits at age 80 (960 months), by hand: 1,400 x 216, 2,000 x 156, 2,480 x 120
- break-even ages with no discounting, by algebra: t = (B_late x A_late - B_early x A_early) / (B_late - B_early)
- a claim that is not later than the other one has no break-even
- with a 0.01 real discount rate the loop agrees with the closed-form present value
- with a 0.02 real discount rate the loop agrees with the closed-form present value
- with a 0.03 real discount rate the loop agrees with the closed-form present value
- with a 0.05 real discount rate the loop agrees with the closed-form present value
- a higher discount rate pushes the break-even later, and past age 100 there is none
- benefits that grow faster than prices (COLA above inflation) reward waiting sooner
- a zero PIA gives no benefit and no break-even
- claim ages outside 62-70 are held to the legal range
- $40,000 a year until 67, claiming at 62: $7,760 withheld a year, 27 full months credited back, $1,633 from 67 (derived)
- earnings at or under the limit withhold nothing
- very high earnings withhold every benefit until 67, and the full PIA is restored from 67 (derived)
- stopping work at 65: only the three years 62, 63 and 64 are tested -> 16 months credited -> $1,533 from 67 (derived)
- the earnings test never applies from full retirement age on, or to someone who has stopped working before claiming
- claiming a few months short of full retirement age is tested at the higher limit ($65,160, $1 for $3) for those months (derived)
- every input extreme gives finite numbers
solo-401k-2026Calculation engine9/9 ✓
- every field of every case matches
- 43,087.04 in all: 24,500 as employee and 18,587.04 as employer
- saves 7,813.97 of federal tax, coming out of the 22% bracket
- an S corporation owner paid 100,000 can put in 49,500
- the 72,000 total limit binds for a high earner, and catch-up sits on top
- deferrals made elsewhere use up the 24,500 for everything
- a small profit is limited by its own earnings
- S corporation pay above 360,000 is not counted for the employer share
- junk in, no NaN out
ssa-agreementsCalculation engine4/4 ✓
- has the 31 countries SSA lists, in the order SSA lists them (by date in force)
- every date is a real first-of-month date
- finds a country by name, ignoring case and spaces; countries without an agreement are not found
- the six-credit floor and the 25.5% withholding are SSA’s: 30% of 85% of each payment
state-income-tax-2026Calculation engine25/25 ✓
- has all 51 jurisdictions
- matches the reference to the cent for every state, filing status and income
- matches the reference at every threshold
- flat-rate and graduated states
- reports the taxable income and the top rate reached
- Alabama deducts the federal tax paid, and its standard deduction steps down to a floor of $2,500
- Connecticut follows the state’s own tables
- New York: no recapture at or below $107,650; a flat top rate on everything from $157,650
- no wage tax means zero everywhere
- single: worksheets 8, 9 and 10 (base + incremental at full phase-in)
- married filing jointly: worksheets 2, 3, 4 and 5
- phases in over $50,000 of AGI and stops at a flat rate on everything
- flags exactly the cases the engine cannot do exactly
- every caveat is a full sentence naming the state’s rule
- Georgia, Utah and West Virginia use their 2026 cuts
- South Carolina: 1.99% then 5.21%, with an income-adjusted deduction that ends at $95,000 ($190,000 jointly)
- Arkansas: the low table to $94,700 of net income, the high table above, and the adjustment in between
- Missouri deducts a share of federal tax paid (35%, 25%, 15%, 5%, then none), capped at $5,000 ($10,000 jointly)
- Oregon subtracts federal tax paid up to $8,500, in $1,700 steps from $125,000 ($250,000 jointly) to nothing at $145,000 ($290,000)
- never falls as income rises, in any state, single or joint
- joint filers pay no more than a single filer with the same income, except Alabama
- handles zero, negative, non-finite and huge income without NaN
- throws for an unknown state and treats an unknown filing status as single
- local income tax is a statewide average and never part of `tax`
- rankStates2026 lists every state cheapest first, with or without local tax
stock-option-tax-2026Calculation engine17/17 ✓
- the 2026 amounts from Rev. Proc. 2025-32
- the example: AMT income 180,650 less the 90,100 exemption is 90,550; 26% is 23,543, over the 22,490 regular tax by 1,053
- the exemption phases out at 50 cents per dollar: half gone at 680,200 − 90,100 = 590,100; none from 680,200
- 28% applies above 244,500 of the base: a 1,375,500 base is 63,570 + 316,680 = 380,250
- no AMT when the regular tax is at least the tentative minimum tax, and bad numbers become zero
- the spread that fits before AMT: 35,950 on the example; 50,638.46 joint; 49,407.69 on 60,000; 63,893.75 on 700,000; 160,322.32 on 1,000,000; 90,100 on nothing
- adding exactly that spread owes nothing; a little more owes something
- NSO: $40,000 spread costs $9,600 of federal tax ($8,800 withheld, $800 owed), $3,029 of payroll tax and $2,000 of state tax: $14,629
- ISO kept: no regular tax and no payroll tax, but $1,053 of AMT; 4,493 shares fit before AMT
- ISO sold the same year: $9,600 federal and $2,000 state, no payroll tax and no AMT: $11,600
- married filing jointly: NSO $13,829 with nothing owed beyond withholding; ISO kept owes no AMT (tentative 10,517 under regular 13,283); ISO sold $10,800
- high income: a $1,000,000 ISO spread owes $285,690.75 of AMT with no exemption; the NSO owes $437,876 ($220,000 withheld)
- a $2,000,000 NSO spread: withholding is 22% to $1,000,000 and 37% above ($590,000); federal tax is $719,550.75, payroll tax $48,954
- AMT begins between 4,493 and 4,494 shares (0 then $0.52), and grows with the spread: $16,653 at 100,000; $70,774 at 300,000
- AMT can still apply to an NSO or a sold ISO at a very high income, and the total includes it
- shares at or under the price have no spread and no tax
- bad numbers become zero and nothing is negative or NaN
student-loan-plans-2026Calculation engine14/14 ✓
- 2026 poverty guidelines: $15,960 + $5,680 a person in the 48 states; Alaska $19,950 + $7,100; Hawaii $18,360 + $6,530
- IBR shares and terms, and RAP constants
- RAP bands: $10,000 or less has a base of $120 a year; 1% to $20,000 … 9% to $100,000; 10% above
- RAP monthly payment: $10 minimum; 80,000 at 7% is 466.67; 150,000 is 1,250; $50 off per dependent
- the fixed payment: 60,000 at 6.5% for 10 years is 681.29; no interest divides the balance
- S1 Standard: 681.29 for 120 months, paid 81,754.54, interest 21,754.54, balance 55,594.84 after year 1
- S1 IBR: 467.17 rising to 541.57 by year 6, repaid in 165 months, paid 93,632.75
- S1 RAP: 466.67 rising to 695.56 by year 6, repaid in 127 months, paid 86,167.74
- S2 (old IBR group, $45,000, two dependents): IBR forgives 253,015.06 after 300 months; RAP forgives 71,250.91 with 88,313.26 of interest waived and 14,400 matched
- S3 high income: IBR is capped at the Standard payment (identical), RAP pays off in 34 months at 1,250 a month
- S4 low income: IBR 8.83, 240 months, forgives 135,151.74; RAP 41.67, forgives 42,368.77 (56,470.99 waived, 17,414.80 matched)
- S5 Alaska, one dependent, $40,000: IBR is $0 below 150% of the guideline and forgives 138,000; RAP starts at 50.00
- with no balance nothing is paid; bad numbers do not break it; money in equals money out
- compareStudentLoanPlans runs all three and reports the Standard payment
term-vs-whole-lifeCalculation engine14/14 ✓
- $1,000 at the start of each of 2 years at 10% is $2,310
- $4,850 a year at 6%: 67,762.47 after 10 years, 189,114.72 after 20, 406,438.14 after 30
- at 0% it is just the payments; at 5% and 8% for 20 years it is 168,388.37 and 239,701.17
- a negative return shrinks it, and bad inputs give 0
- finds the closed-form answer: $2,310 from $1,000 a year for 2 years is 10%
- the example: −5.50% at year 10, 1.35% at year 20, 1.86% at year 30
- a cash value equal to the premiums paid is a 0% return
- feeding the answer back in returns the target
- a cash value of zero is a total loss; one no return up to 100% reaches is null; unusable inputs are null
- a smaller premium or a larger cash value earns a higher return: 2.35% and 2.14% at year 20
- the example at 6%: the extra premium is $4,850 a year and each checkpoint matches the independent figures
- only years the term is in force are flagged as comparable; the term premium stops after the term
- checkpoints are sorted, and a year below 1 is dropped
- a whole-life premium that is not higher than the term premium has no extra to compare
visa-paycheck-2026Calculation engine14/14 ✓
- a resident takes the standard deduction and pays FICA; a nonresident worker takes neither the deduction nor an exemption; a practical-training student is exempt from FICA; a student from India gets both
- pay periods per year
- a resident on $145,000: federal $22,060.64, FICA $10,955.64, state $6,943.05, take-home $98,901.67 a year and $3,803.91 a check
- a nonresident worker gets no standard deduction: federal $25,924.64, take-home $95,037.67 ($3,655.29 a check)
- a student in practical training also pays no FICA: take-home $105,993.31 ($4,076.67 a check)
- a student from India gets the standard deduction too: take-home $109,857.31 ($4,225.28 a check)
- $250,000 as a resident: 401(k) $7,500, federal $48,331.52, FICA $15,471.96 with the additional Medicare tax, state $12,035.55
- a 401(k) deferral is capped at the $24,500 limit
- paycheck frequency only divides the year: monthly $8,241.81
- $60,000 with nothing else: a practical-training student keeps $52,088 (federal $7,912, no FICA); a nonresident worker keeps $47,498 (FICA $4,590)
- a low salary as a resident: $30,000 gives federal $1,420, FICA $2,295, take-home $26,285
- above the Social Security wage base and the additional Medicare line: $200,000 and $300,000
- the lines add up to the salary
- bad numbers become zero and nothing is negative
withdrawal-order-2026Calculation engine36/36 ✓
- case 0: single, age 65, 250000 / 500000 / 150000, spending 50000
- case 1: mfj, age 65, 400000 / 900000 / 250000, spending 90000
- case 2: single, age 65, 250000 / 500000 / 150000, spending 50000
- case 3: single, age 65, 250000 / 500000 / 150000, spending 50000
- case 4: single, age 65, 250000 / 500000 / 150000, spending 50000
- case 5: single, age 65, 250000 / 500000 / 150000, spending 50000
- case 6: single, age 65, 250000 / 500000 / 150000, spending 50000
- case 7: single, age 71, 250000 / 500000 / 150000, spending 50000
- case 8: single, age 60, 250000 / 500000 / 150000, spending 50000
- case 9: single, age 65, 100000 / 1500000 / 50000, spending 80000
- case 10: single, age 65, 250000 / 500000 / 150000, spending 150000
- case 11: single, age 65, 250000 / 500000 / 150000, spending 50000
- case 12: single, age 65, 250000 / 500000 / 150000, spending 50000
- case 13: single, age 65, 250000 / 500000 / 150000, spending 50000
- case 14: single, age 65, 250000 / 500000 / 150000, spending 50000
- case 15: single, age 65, 250000 / 500000 / 0, spending 50000
- case 16: single, age 65, 0 / 500000 / 150000, spending 50000
- case 17: single, age 65, 250000 / 0 / 150000, spending 50000
- case 18: single, age 65, 250000 / 500000 / 150000, spending 50000
- case 19: single, age 65, 250000 / 500000 / 150000, spending 50000
- case 20: single, age 72, 250000 / 800000 / 150000, spending 50000
- case 21: mfj, age 68, 250000 / 500000 / 150000, spending 70000
- case 22: single, age 70, 400000 / 800000 / 0, spending 70000
- case 23: mfj, age 70, 0 / 200000 / 500000, spending 40000
- case 24: mfj, age 58, 0 / 2000000 / 0, spending 40000
- case 25: single, age 62, 100000 / 200000 / 0, spending 40000
- case 26: mfj, age 70, 100000 / 2000000 / 100000, spending 70000
- case 27: mfj, age 65, 0 / 2000000 / 500000, spending 70000
- the applicable age by birth year
- the Uniform Lifetime Table (IRS Publication 590-B)
- no RMD before the applicable age, and 492,000 at 75 needs 20,000
- every order meets the spending target while money lasts
- the required minimum distribution is never skipped once it starts
- spending more than the money can support is reported with the age it first falls short
- the best order never runs out when another does not, and otherwise leaves the most
- with no return, no dividends and no Social Security the total drawn equals the spending plus the tax
What isn’t covered yet
These supporting modules have no test file of their own. They are exercised indirectly through the engines above that use them, but we don't count that as checked: .
Tools whose engines are not listed above are still being migrated, and their pages say “coming soon” rather than showing a number we have not checked.
Log
Report an error
Think a number is wrong? Email support@moneyvibe.ai with the page, your inputs, and what you expected. We'll reproduce it, fix it, and log the correction here.