The arithmetic, in full
Every calculation retirementDIY.org performs, written out so that somebody could check it or reproduce it from scratch. This describes what the engine actually does, including the places where it departs from what a textbook would say — those are marked.
Companion to the calculator and its “How this works” summary. Last revised 28 September 2026.
1. Conventions and timing
The model steps one year at a time. Write A for the reader's current age, R for the retirement age, H for the plan age. The number of steps is
and the loop runs over k = 1 … nY−1, with the age during step k being
Index 0 holds the opening balances, before anything happens. Every recorded balance at index k is the balance after that year's contributions, income, spending, withdrawals and growth. Flows happen during the year; balances are quoted at the end of it. Charts that plot a flow against an age therefore read it one index later than the balance for the same age.
Each path carries a cumulative inflation index f, starting at f = 1 and multiplied at the close of every year. So the first simulated year uses f = 1: today's dollars and that year's dollars are the same thing. All internal arithmetic is in nominal dollars of the year concerned, and “today's dollars” anywhere in the interface means a nominal figure divided by that path's f. Which f matters: a balance quoted at the end of year k is divided by the index after that year's inflation, fk, but a flow — income, spending, withdrawals, tax — was priced during the year at the index in force when it began, fk−1, and is divided by that. The spending and tax charts, the lifetime tax total and the spreadsheet's tax columns all plot a year's flows at the age that year starts.
Three modes fill the return series, and nothing else about the engine changes between them:
| Mode | Paths | Returns for year k |
|---|---|---|
mc | 2,000 | drawn at random (§2) |
hist | nY windows | row i+k−1 of the historical table, so path i begins in the i-th year on record |
stress | 1 | a fixed prescribed sequence |
In historical mode the number of paths is the number of complete windows,
nP = 155 − (nY−1) + 1, which for a 30-year plan over
1871–2025 is 126.
2. Where returns come from
Random draws
Stock and bond returns are lognormal. The figure the reader picks is the compound rate g, so no half-variance is subtracted from it:
The presets are what money grows at when inflation is 2.5%, so each year's nominal returns move with that year's inflation i and the return after inflation does not depend on it. Until 28 September 2026 returns were fixed in dollars while spending, benefits and brackets rose with inflation, so the inflation setting was a hidden second return dial: 2% to 3.5% swung the default plan by 30 points, of which inflation itself accounted for about 3. The stress tests' ordinary years are adjusted the same way; the backtests use each real year's own returns and inflation. The reader chooses the average inflation from five figures: the Fed's 2% target and, from this page's own record, 2.5% (1996–2025), 2.9% (1926–2025), 3.7% (1946–2025) and 5.4% (1966–1995, the worst thirty years). The worst decade, 8.7% from 1973, is a sequence rather than an average and is covered by the stress tests.
σ is the standard deviation of the log return. The standard deviation of the simple return is larger, at (1+g)·eσ²/2·√(eσ²−1), which for σ = 17% and g = 7.5% is 18.7 points. Quoted spreads in the interface are the log figure.
Inflation and cash are normal, not lognormal, and are floored:
The floors prevent the tail of a normal distribution producing hyperdeflation or negative nominal cash. They bias both series very slightly upward.
Parameters
| Symbol | Meaning | Value |
|---|---|---|
| gS | stock compound return | 5.5%, 7.5% or 9.2% |
| σS | stock log volatility | 17% |
| gB | bond compound return | 4.0% |
| σB | bond log volatility | 6% |
| ρ | stock/bond correlation | 0.10 |
| μC, σC | cash | 3.0%, 1.0% |
| σi | inflation spread | 1.2 points |
The generator
Uniforms come from mulberry32, a 32-bit counter-based generator seeded with an
integer the reader can see and change; normals come from the Box–Muller polar transform, which
produces two at a time and caches the spare. The seed travels in the scenario code and the CSV, so
any published result is reproducible exactly.
Historical data
One row per year, January to January: stock total return, bond return, CPI inflation. 1871–2022 is built from Robert Shiller's dataset, where
with P the monthly-average S&P composite price and D the year's dividends. Shiller's file stops in 2023, so 2023–2025 come from the S&P 500 total return index (daily closes averaged per month, matching his convention), the Federal Reserve's GS10 series and CPI-U. Rebuilt over the 23 overlapping years, the second method reproduces the first exactly for bonds and inflation and to 0.23 points mean absolute for stocks.
In historical mode cash is not a separate series; it is set to inflation plus half a point.
3. The bond instrument
“Bonds” means a 10-year par Treasury bought each January at the prevailing yield y0 and sold a year later, when the prevailing yield is y1 and nine years remain:
The first term prices the remaining coupon stream, the second the principal, and the coupon received during the year is added. This is used to build the historical series. In random mode bonds are simply drawn from the lognormal above — there is no yield state, so a random path cannot reproduce the mechanism by which a rise in rates hurts now and helps later.
4. Tax
All thresholds are 2026 federal figures. Within a path they are multiplied by that path's f — with two deliberate exceptions noted below. The law indexes them by chained CPI-U, which has run about a quarter of a point a year below CPI-U; the model uses the path's own inflation for simplicity, so brackets decades out are slightly too wide and tax there slightly understated (timing audit X2, 28 September 2026). Write o for ordinary income other than Social Security, c for long-term capital gains, s for Social Security benefits, N65 for the number of people aged 65 or over (0, 1 or 2).
4.1 How much Social Security is taxable
Provisional income is
and the taxable portion follows the two-tier rule:
with T1, T2 = $32,000 and $44,000 filing jointly, $25,000 and $34,000 single.
4.2 Deduction and taxable income
Dphase is $150,000 jointly, $75,000 single. The $6,000 senior deduction is written into law only through 2028, and the model drops it from 2029 exactly as the statute does. It is not multiplied by f, because the statute does not index it either.
4.3 The tax itself
Ordinary income fills the brackets from the bottom; long-term gains are then stacked on top and charged at the capital-gains schedule, which is evaluated as the difference between the schedule at the top and bottom of the gains slice:
The min is the last line of the IRS Qualified Dividends and Capital Gain Tax
Worksheet: the result is never more than ordinary rates on everything would have cost. It matters only
in a narrow band where the 20% gains rate sits above the ordinary bracket the gains land in, and is
worth at most about $57 a year; it was added on 28 September 2026.
where B integrates a marginal schedule whose thresholds have been scaled by f:
st is a single flat rate applied to
federal taxable income, including whatever part of Social Security is federally taxable.
Real states differ enormously: some exempt Social Security entirely, some exempt pension income,
some have their own brackets and deductions, and nine have no income tax at all. A flat rate is a
deliberate simplification and will be wrong in the specifics for almost everybody.4.4 Withdrawing enough to cover your own tax
A withdrawal is taxable, so covering a shortfall gap requires taking more than gap, which is itself taxed. The engine solves the fixed point
by direct iteration — at most 12 passes, stopping when successive estimates agree within fifty cents. Each pass re-runs the withdrawal ordering, because which pot the extra dollar comes from changes what it costs. g is the gain fraction of the brokerage account,
so a brokerage sale realises gains in proportion to how much of the account is gain, and the remainder is a tax-free return of basis. Tbase is the tax that would have been due on income alone, before any withdrawal.
The iteration is a contraction whenever the marginal rate is below 100%, so it converges quickly; twelve passes is a safety net, not a typical cost.
4.5 The early-withdrawal penalty
5. Guaranteed income
Three streams arrive whether or not they are wanted: Social Security, other income cards, and required distributions. Social Security is two benefits for a married plan, each from its own claiming age on the reader's age timeline (the model treats both spouses as the same age), and one for a single filer. Plans and codes from before 28 September 2026 held one household figure claimed at one age; they load with that figure whole and the spouse's at zero, so their results do not change.
Each amount is entered at full retirement age, 67 for anyone born in 1960 or later and 66 plus two
months a year for 1955-59, and c is the law's reduction for claiming early or its credit
for waiting, whole years assumed: 70% at 62 and 124% at 70 for the 1960 cohort. Until 28 September 2026
the amount was entered at the claiming age and the age moved only the start date, so claiming early read
as better; plans and codes from before then are converted on load, keeping the same cheque. A spousal
benefit claimed early is reduced slightly faster in law (25/36% a month for the first 36 months) than the
own-benefit schedule used here.
Their net contribution is the gross less the extra tax they cause:
where Tbase is the tax on wage + rmd + taxable other + the brokerage's coupon interest, with its qualified dividends as long-term gains and with Social Security (§10), and Twage is the tax on the wage alone. The difference isolates the tax caused by the retirement income rather than by employment.
6. What gets spent
The figure the reader enters is after-tax spending, and it is used as such. The planned amount in year k is
with d the optional decline after 75. Under the two target-based rules that is the amount; under the three portfolio-based rules it is discarded and replaced:
| Rule | Amount spent |
|---|---|
| Steady | planned |
| Guardrails | planned · m, with m adjusted as below |
| Percent of portfolio | W′ − extra(W′) + max(0, guarNet − x), W = P·rate |
| Divide by years left | W′ − extra(W′) + max(0, guarNet − x), W = P/(H−a) |
| VPW | W′ − extra(W′) + max(0, guarNet − x), W = P·v(a) |
A required minimum distribution counts toward the rule's withdrawal. P includes the year's RMD, W′ = max(0, W − RMD) is all that is drawn on top of it, and x is the part of the RMD beyond W, after its own tax, which is reinvested rather than spent (zero when the RMD is smaller). Until 29 September 2026 the RMD was added on top of the whole share, so from RMD age these rules spent roughly twice what they should.
For the three portfolio rules W is a withdrawal before tax, as the 4% rule and VPW define
it, and extra(W) is the income tax and early-withdrawal penalty that drawing W
in the usual order adds to the year's bill (section 7). The reader lives on what is left. Until 28
September 2026 the share was spent after tax with the tax drawn on top, which withdrew about 10% more
than the rate shown.
P is the whole portfolio at the start of the year and v(a) is linearly interpolated from a table rising from 3.9% at 50 to 20.9% at 95. The percent rule is clamped to 2–8%. Note that under the portfolio rules the guaranteed income is added to the portfolio draw rather than subtracted from a target, so total spending rises with income rather than displacing withdrawals.
Guardrails
Each year the current withdrawal rate is compared with the rate in the first year of retirement:
with wr0 captured in the first retired year. The multiplier moves by 10% at a time and is bounded at 70% and 150% of plan. The test uses the previous multiplier and the new one is applied afterwards, so a cut takes effect in the year it is triggered.
7. Funding the year
The year's requirement is
where the gift is the yearly amount given to people while alive, from the age chosen (Level 6; §10).
If the gap is negative, income exceeded the requirement. Any unspent required distribution goes to the brokerage account, counted entirely as basis since its tax has been paid; any remaining surplus goes to cash at Level 3 and above, or to the brokerage below it. Nothing is discarded.
If the gap is positive, it is funded by withdrawing G from the pots in one of three orders:
| Order | Sequence |
|---|---|
| Conventional | cash → brokerage → pre-tax → Roth |
| Pre-tax first | cash → pre-tax → brokerage → Roth |
| Proportional | each pot supplies its own share of the total, with any shortfall in one pot made up from the others in conventional order |
Each pot supplies whatever it has, up to what is still needed. If the pots together cannot supply G, and the shortfall exceeds one dollar, the path is marked as having run short: the age is recorded, all balances are set to zero, and that year's spending is recorded as zero.
8. Level 5
8.1 Required minimum distributions
Applied at every level, since they are law rather than strategy; Level 5 only adds a switch that turns them off, to show the difference they make. (Until 28 September 2026 they applied only from Level 5, which left a large pre-tax balance untouched below it in any year something else paid the bills.) At Levels 1 and 2 the whole of the single pot is treated as pre-tax. From the statutory age — 73, or 75 for anyone born in 1960 or later — the year's distribution is the pre-tax balance divided by the IRS Uniform Lifetime Table factor:
It is removed from the pre-tax account before anything else happens, taxed as ordinary income, and treated as income that covers spending first. Whatever is not needed is reinvested in the brokerage account as basis. The divisor falls from 26.5 at 73 to 2.0 at 120, which is roughly 3.8% of the balance at 73, 5% at 80 and 8% at 90.
8.2 Roth conversions
After the year's spending is settled, the conversion c is the largest amount, up to
the pre-tax balance, that keeps ordinary taxable income inside the chosen bracket:
found by bisection, since the left side only ever rises with c. The bracket is an
ordinary-income bracket, so only ordinary taxable income occupies it: gains and qualified dividends
stack on top at their own rates. It is a search rather than a subtraction because a converted dollar
is not always one dollar of taxable income: while the standard deduction is unused the first dollars
are taxed at nothing, once Social Security is partly taxable each dollar can make up to 85 cents more
of it taxable, and the senior deduction phases out. Subtracting, as the model did until 28 September
2026, undershot in the first case and spilled into the next bracket in the others. Where the
conversion pushes gains out of the 0% band, the extra tax is part of the bill below.
Its tax is the increase in the year's bill, and it must be payable from outside the retirement accounts:
If the tax exceeds the purse, the conversion is scaled down by the ratio and retried, up to eight times. Nothing is converted unless the tax can be paid, which is the point: a conversion funded from the converted money itself is a much weaker move and the model will not pretend otherwise.
The tax is taken from cash first, then the brokerage. Selling in the brokerage realises gains,
which are taxable in their own right, so the bill is circular — a larger sale owes more tax,
which needs a larger sale. Writing g for the brokerage gain share and c
for the conversion, the bill solves
by the same fixed-point iteration the withdrawal uses, to within fifty cents or eight passes. The realised gain stacks above ordinary income at long-term rates, so it does not consume the ordinary bracket room the conversion is filling, and it enters the MAGI series, which is why a conversion can raise a Medicare surcharge two years later by more than the conversion alone would suggest. The brokerage basis falls proportionally with the balance.
8.3 Medicare surcharges
IRMAA is charged on income from two years earlier, so the model keeps a MAGI series and looks back:
The two years before the plan starts have no income on record, so year 1's MAGI stands in for them. It is not known until year 1 ends, so year 1's own surcharge is charged a year late, in year 2, beside year 2's; until 28 September 2026 neither year was charged at all. The thresholds follow the filing status of the return being looked back at, so in the first two years after a death a joint return is judged against the joint thresholds, while only the survivor pays.
It is a step function, not a taper: one dollar over a threshold costs a full year of the higher premium, per person. The 2026 figures are used (CMS; SSA POMS HI 01101.020): the Part B adjustment over the $202.90 standard premium plus the Part D adjustment, $1,148 to $6,936 a person a year, from $109,000 single or $218,000 joint. The lower thresholds are indexed by f; the top one, $500,000 or $750,000, is fixed in law through 2027 and indexed after. MAGI here is AGI including the taxable part of Social Security; no tax-exempt interest is modelled, so nothing else is added back. Only the surcharge is modelled — the standard premium everybody pays belongs in the spending figure.
8.4 Survivor years
From the chosen age the Social Security benefit falls to the chosen share, other income falls to its chosen share, and spending falls to its chosen share. From the following year the filing status becomes single, so brackets narrow and the standard deduction roughly halves: the law allows a joint return for the year a spouse dies, and qualifying surviving spouse status needs a dependent child, which the model does not have. The Social Security taxation thresholds fall from the joint pair to the single pair, which are not half of them — part of why a survivor often pays more tax on less income.
9. Closing the year
After every flow, growth is applied and the inflation index advances:
with w the stock share and fee the reader's yearly fees as a share of savings (Level 2, default 0; Level 1 assumes none). It is one blended figure - fund costs, plan fees and any adviser - taken off the invested accounts after the year's growth; a flat fee belongs in spending instead. Added 28 September 2026: returns were gross of all costs before, with no way to enter them. At 1% it lowers the share of futures that last by roughly 10 to 20 points across the example plans. Rebalancing to the target mix is implicit and exact every year, at no cost and with no tax.
10. Turning paths into answers
Success
A path succeeds if it never ran short. The headline figure is the share of paths with no recorded failure age — out of 2,000 futures in random mode, or out of the number of historical windows in backtest mode.
Percentile bands
For each year independently, the values across all paths are sorted and the 5th, 10th, 25th, 50th, 75th, 90th and 95th percentiles taken, with linear interpolation between order statistics:
Ranking a path
To pick a typical, lucky or unlucky future, paths are ordered by ending balance in today's dollars, with failures pushed below all survivors and earlier failures below later ones:
Spending that lasts in 90% of futures
The largest whole $1,000 of spending that still succeeds in at least 90% of futures, up to $5,000,000. Success can only fall as spending rises, so the search keeps the highest figure known to pass and the lowest known to fail, and stops when they are $1,000 apart. It starts from the success rate already worked out at the planned spending, steps away from it until the 90% line is crossed, then aims each guess at the crossing by interpolating between the two nearest results, bisecting instead when an end sits at 0% or 100% or interpolation stalls on one side. It narrows in on the first 150 futures, which are exactly the first 150 of the full run because every future is drawn in turn from the same random sequence, then confirms on all 2,000, stepping $1,000 at a time from the rough answer until a figure that passes sits next to one that fails. The answer is the same as a plain bisection on all 2,000 would give, for the cost of about three full runs instead of fifteen. Everything else about the plan is held fixed. It is not reported for the portfolio-based spending rules, where the question is meaningless because the rule itself decides spending and no amount can ever fail.
Brokerage distributions
A taxable account owes tax every year on what it distributes, whether or not anything is sold. On the balance held at the start of each year, split by the same stock share as the rest of the portfolio:
The dividends are stacked as long-term gains and the interest as ordinary income, both inside the same yearly tax calculation as everything else, so they push Social Security across its thresholds, consume bracket room a conversion would otherwise have filled, and enter the MAGI series that sets a Medicare surcharge two years later. Neither is subtracted from the balance: both are already inside the year's total return and are assumed reinvested. What the plan loses is the tax, which it has to find like any other cost. Because the distribution has now been taxed, it raises the basis, capped at the balance, so the same money is never taxed again when the shares are sold.
1.5% is a forward figure for the dividend yield, not today's: the S&P 500 paid 1.05% in September 2026 against a 1.61% long-run average, and a broad total-market fund yields slightly more than the index. It is deliberately far below the 4% of the deep past, because buybacks have structurally replaced a good deal of dividend payout. The bond side needs no separate constant: a par bond's coupon is its yield, so the taxable income is the 4% bond assumption, and unlike the bond's total return it never goes negative in a year when rates rise. Neither figure is under the reader's control, for the same reason volatility is not.
Ending wealth after tax
Every balance the page draws is a face value, and pre-tax money has never been taxed, so an ending total mixes dollars that are not worth the same. The after-tax figure prices the pre-tax balance at the rate one more dollar of ordinary income would cost that household in its final year, federal and state together, obtained numerically from the same tax function:
where o is that year's ordinary income including any conversion, g its
gains and qualified dividends, m the marginal ordinary rate and mg
the marginal long-term rate, both clamped to [0, 1]. The brokerage is charged the long-term tax on its
unrealised gain because the household would owe it to sell; that rate is genuinely zero for a
low-income household, since the 0% band is real. One figure is kept per path and the median is
reported beside the face-value balance, in whichever dollars the page is showing. A path that ran short contributes zero to both.
Giving while alive
A gift is a cost the plan has to find, so it is added to the year's requirement alongside spending and any life event, and funded by the same withdrawals in the same order, carrying whatever income tax and early-withdrawal penalty those withdrawals actually trigger. It is deliberately not treated as consumption: it is excluded from the spending series, so that series still answers what the reader lives on, and it is outside the spending rule, because a guardrail cutting a promised gift is not what a guardrail is for.
Gift tax is not modelled. The 2026 annual exclusion is $19,000 per recipient and the lifetime exemption $15M a person, so few plans approach either.
Qualified charitable distributions
Money moving straight from a traditional IRA to a charity, from age 70 — the law says 70½ and this model counts whole years throughout. Capped at the 2026 ceiling of $111,000 a person, indexed, which the model applies once per household rather than once for each spouse (the cautious reading), and at the balance available. Two things make it worth more than withdrawing the money and claiming a deduction, and both fall out of where it sits in the calculation rather than being special-cased.
First, it never enters income. It is subtracted from the pre-tax balance before any of the tax machinery runs, so it does not raise taxable income, does not push Social Security across its provisional-income thresholds, and does not reach the MAGI series that sets a Medicare surcharge two years later. A deduction can do none of that, because by then the income has already counted.
Second, it satisfies the required minimum distribution dollar for dollar. The requirement is worked out first, on the balance before the gift, and only the unsatisfied remainder becomes taxable income:
On a $3M plan giving $40,000 a year this way, lifetime tax falls by about $327,000. A second, less obvious consequence: because the gift replaces a distribution that would otherwise have moved money out of the pre-tax account and into a taxable one, the estate left behind is more pre-tax-heavy than it would have been, and carries more income tax for beneficiaries. Both effects are real and the model shows both.
What beneficiaries receive
A different question from the one above, and not a rescaling of it, because three things change at
death. The brokerage's cost basis steps up to market value, so its growth is never taxed. Pre-tax
money is taxed at the heir's rate rather than the owner's. And a charity pays nothing on pre-tax money
at all. Writing c for the charitable share of the pre-tax pot and h for the
heir's rate:
And h is worked out rather than chosen. Since 2020 most beneficiaries must empty an
inherited retirement account within ten years, so what they inherit arrives as a decade of extra
ordinary income stacked on whatever they already earn. For n people sharing a pot
P, each taking P/n across ten years on their own income y:
with tax including the reader's flat state rate as a stand-in for the beneficiaries',
P in today's dollars and tax on this year's brackets, whatever the
page is showing: projecting an heir's tax return decades out would be false precision on top of a
guess, and pricing a future-dollar pot on today's brackets would push it into brackets it would never
reach.
which is why the number of heirs changes the answer at all: the same pot divided four ways is four
smaller slugs, each of which may stay inside the bracket that person was already in. On a $1.5M pot
left to people earning $120,000 the federal part of the rate falls from 21.5% to 18.5% going from one
heir to four; on a $6M pot, from 28.0% to 21.5%. The state rate adds the same few points to every one of
these, since the inherited income sits above the heirs' deduction. It is equally why the effect sometimes vanishes: on that $1.5M pot left
to someone earning $250,000 the federal part is 24.0% however it is divided, because every slug lands inside one
bracket. Note also that h is evaluated on the amount actually inherited, so giving part
of the pot to charity lowers the rate on what is left.
Those three sum to the ending balance by construction, and they are reported from a single path — the middle future by ending balance, the same one the account charts draw — rather than as three independent medians. Three medians would not add up, because the path sitting at the middle of what heirs receive is not the path sitting at the middle of what charity receives, and three figures presented as the split of one balance have to sum to it.
Note that to heirs can exceed the owner's own after-tax figure, and frequently does.
The brokerage is the reason: the owner owes long-term gains tax to sell those shares and a beneficiary
does not. Whether that outweighs the heir's rate on the pre-tax pot depends entirely on the mix of
accounts, which is the comparison the level exists to make.
h are guesses, and this is not estate
planning. Computing the rate removes the arithmetic from the reader but not the uncertainty: who
inherits, what they earn at the time, where they live and what the brackets look like decades hence are
all unknown, and asking for an income rather than a bracket only puts the same guess in a form the tax
code can use. The right use of it is to move the inputs and see which way the answer leans, not to
trust any single figure. The reader's own state rate stands in for the beneficiaries' (added
28 September 2026, so the heirs' figure is not flattered against "Worth after tax", which charges it).
What it does not model: a beneficiary's own deductions, other investment income or their own state's
rules, the year they actually inherit, or the fact that a spouse, a minor child, a
disabled beneficiary or anyone within ten years of the account holder's age may stretch withdrawals
across a lifetime instead of ten years.
Everything that actually governs who inherits — wills, trusts, beneficiary designations,
titling, probate, state law — is legal machinery this page does not touch and does not model. On
most retirement accounts the beneficiary form overrides the will, and this tool has never seen
yours.The home
From Level 3 the reader can enter a home: its value today V, the mortgage still owed today
M and the years left on it Y. It is counted, and by default not sold: unless a sale is added (below), the plan cannot spend it,
so it changes neither the success rate nor the spending that lasts, and it is kept out of Total savings. At
index k of a path with cumulative inflation CIk:
so the value keeps pace with that path's inflation, flat in today's dollars, and the balance is paid down
evenly, in dollars, to nothing after Y years (with Y = 0, nothing is owed). A real
loan pays mostly interest at first, so this flatters equity slightly in the early years. The payments are not
modelled as a cost: before retirement they come out of the salary, and after it they are taken to be inside
the yearly spending the reader entered. The note under the mortgage question gives the balance at retirement,
M · max(0, 1 − (R − A) / Y), and the payoff age A + Y.
At death the equity goes to heirs in full: inherited property takes a new cost basis at its value on the day of death, so no income tax is owed on the gain, and estate tax is out of scope here as everywhere. It is drawn as its own block on Assets by class and its own band on the Level 6 chart, it is included in what heirs receive and in the share of futures clearing the reader's target at the plan age, and a future that ran short still leaves it. Home prices over long stretches have run a little ahead of inflation nationally and a long way behind it in some places and decades; inflation is the neutral assumption.
Selling it is a Level 4 life event, the one whose amount the model works out, once per plan. In its year
k, priced at the index in force when that year began, like every other event:
with 6% for agents and closing and N the next home's cost in today's dollars (zero for a renter). A
positive amount goes into the brokerage as basis, like money coming in; a negative one, a dearer next home, is paid
for like any other cost that year. From index k the next home is the equity counted, owned outright at
N · CI. The gain is taken to be inside the exclusion for a main home, $250,000 single and $500,000
married, so no tax is charged on it; moving costs, and rent for a renter, are the reader's to put in spending. The
card, the arrow on the charts and the events key show freed in today's dollars at the plan's average
inflation, an estimate, since each future's prices differ.
11. What is not modelled
- Fees beyond one blended rate. Level 2 takes a single yearly percentage off the pre-tax, Roth and brokerage balances after each year's growth (never cash); per-account and tiered adviser fees are not separated.
- Borrowing against the home. A reverse mortgage or a home equity line is not modelled; the home is spent only by selling it (section 10), and tax on a gain beyond the main-home exclusion is not charged.
- A glide path. The stock share is fixed and rebalanced to it every year.
- Healthcare inflation running ahead of general inflation, and long-term care.
- ACA premium subsidies before 65, which can be worth thousands and which interact sharply with Roth conversions.
- State-specific rules beyond a flat rate; 72(t) substantially equal payments; NIIT and AMT.
- Estate and inheritance tax, federal or state. The federal exemption is $15M a person in 2026 and reaches very few households, but several states tax estates from a far lower threshold and a handful tax the recipient instead. None of that is here.
- A beneficiary's tax position beyond an income and a filing status. The ten-year rule is modelled, but through a single income figure: their own deductions, other investment income, their own state (the reader's rate stands in) and the year they actually inherit are not. Nor is a beneficiary who may still stretch withdrawals over a lifetime rather than ten years — a spouse, a minor child, a disabled or chronically ill person, or anyone within ten years of the account holder's age.
- Serial correlation of any kind in random mode. Years are independent draws. Momentum, mean reversion and volatility clustering are all absent; the backtests contain whatever of them history contained.
- Anything about your actual holdings. The model knows a stock share and a bond share, not what you own.
12. What has been checked
Against the Trinity study
Restricting the data to 1926–1995 gives 41 overlapping 30-year windows, exactly as many as theirs. At a 4% inflation-adjusted withdrawal with no tax either side:
| Portfolio | This model | Trinity |
|---|---|---|
| 100% stocks | 38 of 41 (92.7%) | 39 of 41 (95%) |
| 75% stocks | 39 of 41 (95.1%) | 40 of 41 (98%) |
| 50% stocks | 38 of 41 (92.7%) | 39 of 41 (95%) |
One window apart at every allocation. The systematic difference is the bond instrument: Trinity used long-term high-grade corporates, this uses 10-year Treasuries, which earn less. The gap is invisible where stocks dominate and widens as bonds take over, which is the observed pattern.
Against FI Calc
$1,000,000, 30 years, constant inflation-adjusted spending, 1871 data, no tax either side: 100% / 96.8% / 91.3% / 77.8% at $35,000 / $40,000 / $45,000 / $50,000, against their 100% / 96.8% / 91.2% / 79.2%. The remaining gap at $50,000 is their default 5% cash sleeve.
Against Portfolio Visualizer (Monte Carlo)
FI Calc checks the backtests only; this checks the projections. Portfolio Visualizer's Monte Carlo tool, "Forecasted Returns" model, was given this model's own assumptions converted to the arithmetic means and standard deviations it asks for: stocks 9.06% and 18.7% (the moments of a lognormal whose log has mean ln 1.075 and spread 0.17), 10-year Treasuries 4.19% and 6.26%, parameterized inflation 2.5% and 1.2%, annual rebalancing, $1,000,000, 30 years, inflation-adjusted annual withdrawals, pre-tax returns. It draws 5,000 futures; ours are 20,000 (ten seeds of 2,000), run with every dollar in a Roth and no state tax so no tax is charged. Measured 29 September 2026.
| Spending | 100%: ours | PV | ours, end-of-year | 60/40: ours | PV | ours, end-of-year |
|---|---|---|---|---|---|---|
| $35,000 | 87.3 | 88.0 | 87.5 | 92.6 | 92.1 | 93.0 |
| $40,000 | 80.6 | 79.9 | 81.0 | 84.8 | 85.5 | 85.7 |
| $45,000 | 72.8 | 74.0 | 74.5 | 73.4 | 75.4 | 76.1 |
| $50,000 | 64.4 | 67.6 | 66.9 | 60.5 | 65.0 | 64.4 |
The gap that grows with spending is withdrawal timing. With both spreads set to 0.01% the tool reports a median ending balance of $4,589,365 at $50,000; the recurrence Bt+1 = Bt(1+r) − W(1+i)t+1, spending taken after the year's growth at that year's end prices, gives $4,589,342, while this model's Bt+1 = (Bt − W(1+i)t)(1+r) gives $4,019,793. The "end-of-year" columns come from an independent re-implementation of section 2's return model, which reproduces this engine's own figures under its own convention and then switches only the timing: all eight land within 1.1 points of Portfolio Visualizer, inside the sampling error of 5,000 futures (about 0.6 points). Three smaller differences remain and pull against each other: their returns are normal rather than lognormal (a fatter left tail, which is harsher), their stocks and bonds are correlated with inflation at the historical −0.08 and −0.15 where this model scales nominal returns with inflation, and their stock-bond correlation is the historical 0.07 against this model's 0.10.
The distribution against 155 years of returns
| Statistic | History | Lognormal |
|---|---|---|
| Standard deviation of log returns | 0.166 | 0.170 |
| Skewness | −0.73 | 0 |
| Excess kurtosis | +1.07 | 0 |
| Years beyond 2σ | 7 | 7.1 |
| Years beyond 3σ | 2 | 0.42 |
The body of the distribution is well calibrated and the far tail is not. 1931 (−42.5%) is a −3.66σ event that 155 independent draws reproduce only 2% of the time, while the best year on record is only +2.18σ — an asymmetry a symmetric-in-logs distribution cannot represent. Against expectation, losing years in the record do not cluster more than independent draws would produce: 6 runs of two consecutive losses against 7.8 expected, 1 run of three against 2.7. Volatility clustering is a daily and monthly phenomenon that washes out by annual aggregation.
Model against itself
Set the compound return to history's own 9.2% and the random projections return 64% where the backtest of the same plan says 67%. Feeding the model history reproduces history to within three points, and the residual runs in the direction the tail and skew findings predict.
retirementDIY.org — for planning and education, not financial advice. © 2026 Brad Boyce. The engine is a single readable file; this document describes it as it stands, and where the two ever disagree, the code is what runs.