Behind the Tool

Why I Built This Tool and How

A spreadsheet that became unwieldy, and an AI collaboration that turned into a working retirement income model.

I've spent almost all of my adult life working in information technology, and since founding RetirementStewardship.com in 2015, I've written a fair amount over the years about generating retirement income, the bucket strategy, Required Minimum Distributions (RMDs), Qualified Charitable Distributions (QCDs), and the tax mechanics that cut across them all. I've used spreadsheets in various ways to illustrate different pieces of that picture, both on the blog and in my books. But I'd never built one that brought nearly everything together in one place to show a holistic view of retirement income flows over an entire retirement.

This modeling tool came out of trying to fix that, and I built it with AI doing the heavy lifting (the coding), under close, detailed direction, and with a lot of double-checking.

What I actually wanted, and why the existing tools fell short

This all started after I read an article by CPA Mike Piper on Qualified Longevity Annuity Contracts (QLACs), and it got me thinking less about QLACs specifically and more about longevity risk generally, in particular what my wife's financial situation would look like if I predeceased her in my 80s and she lived well into her 90s. (Obviously, I have no idea if that will happen or not, but it's a possible scenario that should be planned for.) It's especially important because my wife would still be taking RMDs, with reduced Social Security, and filing as a single taxpayer at higher brackets than we were in together.

I ran some simulations for that scenario using honestmath.com, a really good, easy-to-use, single-portfolio simulator with income, expenses, an estimated return distribution, and a probability of success based on ten thousand trials. But it doesn't have account-level granularity. It can't differentiate an RMD from ordinary spending. It can't exclude a QCD from an RMD calculation the way the actual rule works. And it can't automatically reduce Social Security at a specific age for a specific surviving spouse, which was exactly the scenario I wanted to analyze. I could have run two separate simulations, one for us as a couple and one for a single survivor, but that still wouldn't reflect the account-level mechanics I actually cared about.

I looked at more sophisticated, subscription-based planners too, tools like MaxiFi, Boldin, and Projection Lab. I didn't want an ongoing subscription fee, and it would have taken real time to figure out whether any of them modeled what I wanted. So I decided to build something myself, partly for the tool, and partly, honestly, just to see if I could.

Why I used AI for this

I'm interested in AI, and I try to use it for things I either can't do myself reliably or just don't want to. Building a calculation engine from a detailed, fully specified set of requirements is exactly the kind of work I think AI is well suited for. I'm not a programmer, but I didn't ask it to "write me some code to ..."; I told it precisely what calculations I wanted, what assumptions to use, and what scenarios to consider, the type of layout and design I wanted, the same way a business analyst would guide a developer.

Double-checking the AI's work was more necessary than I expected. If I asked for a change, it would make the change, but it didn't always think through everything else that change should logically affect. Every revision meant going back through the affected calculations by hand to confirm they still lined up. AI is very good at producing what you asked for, but you're still responsible for confirming it's actually correct.

From spreadsheet to working tool

The first version was a spreadsheet, which I started calling, half-jokingly, One Big Beautiful Spreadsheet (OBBS). I set it up with my own numbers first and ran a handful of scenarios. As I worked with the tool, I made numerous "tweaks" to improve usability and accuracy. I also gained a better understanding of retirement income cash-flow dynamics.

The size of the annual withdrawal drives almost everything else. It's always the larger of the RMD or the income you need minus Social Security. Early in retirement, real spending usually exceeds the RMD, so spending drives the withdrawal. But the RMD's required percentage climbs every single year purely because the IRS divisor shrinks, nothing to do with markets at all, while a spending need only grows with inflation. Eventually the RMD crosses over and becomes the larger number, often forcing you to withdraw, and pay tax on, more than you actually need to live on. Which side of that crossover you're on in a given year determines almost everything about how sensitive that year is to everything else.

The ratio of income needed to portfolio size matters more than almost any single return assumption. Fifty thousand dollars against a million-dollar portfolio is a 5% initial draw; a hundred thousand against the same portfolio is 10%. Before you get to investment assumptions, getting the actual spending number right determines everything else.

How much of your total need Social Security already covers determines how exposed you are to a reduced benefit. Since Social Security and income need both grow with inflation, a household where Social Security covers a large share keeps a small, stable gap that the RMD usually absorbs on its own. A household where Social Security covers only a small share sees that dollar gap grow every year, and is far more exposed to anything that reduces Social Security further, including the transition to survivor status.

The same shock impacts retirees differently depending on when it happens. I ran the same market decline in year one versus year seven of the model and got different outcomes, because by year seven the portfolio had already absorbed six years of ordinary withdrawals and had less flexibility left to take a hit. Sequence matters as much as magnitude.

Withdrawal order affects compounding, not just which account gets drained first. Pulling from cash and short-term holdings before touching equity isn't only about avoiding a forced sale at a bad time; it's about giving the growth assets more years to keep compounding. In nearly every version I ran, equity wasn't touched until deep into the 90s, as long as the fixed-income side was large enough to cover the need along the way.

Modestly better return assumptions compound into a surprisingly large difference over two decades. Moving from conservative to moderate assumptions, with the same shock-and-recovery structure otherwise unchanged, increased the ending equity balance by roughly a third. A one- or two-point difference in assumed annual return looks small on paper and does most of its real work by year twenty.

Guaranteed income makes the most sense exactly when you doubt RMD and Social Security alone will carry you. The longer those two already meet your needs, the less urgency there is for something like a QLAC, a bond ladder, or a fixed-income annuity, and any money not committed to one keeps generating its own investment income instead. But if a gap shows up early and grows quickly, from a prolonged market event or a real increase in spending, that's precisely the situation those products exist for.

Turning it into a real tool

The spreadsheet worked, but it was inelegant, and mostly only useful to me. So I asked whether AI could turn it into something I could actually put in front of readers: an input form that mirrored the spreadsheet's assumptions page, producing a result: when a gap first shows up, whether there's a surplus, when specific assets have to be tapped for income, and whether the portfolio lasts to the age you're targeting. Plus, I wanted users to be able to introduce their own market shocks at whatever age they chose.

The result started as a single, self-contained HTML file with the whole calculation engine embedded inside it, built so I could drop it into a blog page with no external dependencies to maintain. That's still true of the calculation engine itself, one JavaScript file underneath everything. But the tool outgrew that single-page format and became what you're using right now: its own standalone set of pages: an instructions manual, a dedicated input form, a results page, and this article on the same website.

As you (hopefully) read in the instructions, under the hood, each asset bucket gets its own return applied every year, bonds get a price return, TIPS accrue, equities get their own price return, cash grows at its own rate, and in a shock year, every one of those gets overridden by whatever values you set for that scenario. Once the core engine was solid, I kept extending it with additional input options: pension income, QLACs, QCDs, multiple stacked market shocks, and eventually a Monte Carlo option I didn't really expect to be feasible. That one uses something called a Box-Muller transform to generate real statistical randomness in JavaScript, a better approach than averaging a handful of random numbers together, though it's nowhere near as sophisticated as what a dedicated simulator like honestmath.com runs in their model.

What this tool is not trying to be

This isn't meant to be a do-everything retirement planner. It's deliberately focused on modeling retirement income and cash flow, not the saving and investing side of building a portfolio. It doesn't include a Roth conversion calculator; I think that probably belongs in a purpose-built tool of its own, with its own results feeding into a model like this one.

I also want you to know how this tool stays current because some of that doesn't happen automatically. The RMD tables and tax figures the engine relies on are static data, not something pulled live from a government source, because the IRS doesn't publish an API for that kind of thing the way some private services do. When tax law changes, I will have to actually update the numbers, either by hand or by asking AI to do it with the correct source material in front of it. That's an ongoing maintenance commitment, not a one-time, set-and-forget build, and I intend to keep up with it as the tax code changes.

A caution

This tool gets into the weeds of modeling and analyzing retirement income, and I think that's a really productive exercise for us retirees. But we can also overthink our income, how long it will last, and how well investments perform, turning a useful planning exercise into a source of ongoing anxiety instead. If you use this and it gives you the answer you were hoping for, good. If it doesn't, consider that thoughtfully rather than overreacting and adjusting inputs until it does.

Chris Cagle, RetirementStewardship.com

See how your own numbers hold up. Head to the Tool and run your own scenario, your balances, your Social Security, whatever combination of QCDs, QLACs, pension income, or market shocks actually applies to your situation.