One flat return, one flat inflation rate, a withdrawal that rises with prices, and a count of how long the money lasts.
—
—
Each year the balance compounds at your nominal return and that year's withdrawal is taken at year end: balance = balance × (1 + nominal) − withdrawal. The next withdrawal is this year's grown by inflation: withdrawal = withdrawal × (1 + inflation). The loop stops when a withdrawal cannot be met or at the window, whichever comes first, and never past 1,000 periods.
Also printed: the withdrawal as a share of the portfolio and the real return, nominal net of inflation, (1 + nominal) ÷ (1 + inflation) − 1. Comparing those two is most of what this tool does.
$1,000,000, $60,000 in year one, 7% nominal, 3% inflation: the money is gone in year 29. It holds $107,472 at the end of year 28, which grows to $114,995 in year 29 against a $137,276 withdrawal — that gap is the end. Drop year one to $40,000, the 4% rule, and it does not deplete inside the 60-year window, ending on $5,891,603 nominal; $40,000 a year is $3,333.33 a month.
Withdraw the $60,000 at the start of each year instead and this model runs out in year 26 — three years gone on nothing but the timing of the money leaving.
It cannot see bad early returns. The model is deterministic: one smoothed average applied in the same order every run, so it cannot show a portfolio that fails because the first years were −12%, 4%, −18%, 2%, 6% rather than +7% each time.
A single average return hides the sequence of returns, which is what actually breaks retirements: two portfolios with the same 30-year average finish in different places if one has its worst years early, because you sell depressed units to fund spending and never get them back. Also outside it: taxes, fees, pension or Social Security income, changed spending, and the purchasing power of that ending balance — it is nominal.
Educational arithmetic on assumptions you supply. Surviving this model is not a guarantee.