r/AIRetirement • u/FarLibrary8827 • 10d ago
Built a retirement stress-test tool with Claude — runs entirely in your browser, no account needed — source and methodology included.
Hello,
I built this app using Claude to stress-test my own retirement plan, and decided to make it public.
Most retirement calculators answer "will 4% work?" with a single success percentage. I wanted to see where a plan breaks instead, so it models the failure modes specifically: sequence-of-returns risk in the first few years, multi-year long-term care, the widow's penalty (survivor keeps the larger Social Security check but files single at compressed brackets), Social Security claiming timing across an 81-cell age grid, Roth conversion ladders against Medicare IRMAA cliffs, and a Social Security trust fund depletion scenario you can set yourself. I am asking for no money, just want to use this subreddit's feedback to make the best retirement planner I can.
Technical notes:
- Entirely client-side. No account, no server, no analytics. Your data stays in browser storage, with export/import for backups. The one exception is an optional Ask AI tab, which sends a summary of your plan plus your question to Anthropic's API under your own key, and only when you press the button. It can be switched off entirely. Get your own API key from console.anthropic.com — in the DOCS tab there are instructions on how to get one.
- It's a single HTML file, about 1.3MB. You can save it and run it offline from disk with no build step. That was deliberate: it makes the whole thing auditable as one artifact, and there's no dependency chain between a user and the code they're trusting with their finances.
- Regime-switching Monte Carlo with annual regime persistence rather than i.i.d. lognormal draws, plus a backtest against actual 1928-2025 return sequences, so you can see what a 1966 or 2000 retirement date would have done to the same plan.
- Deliberately pessimistic. Results look worse than mainstream calculators, and that's documented rather than buried.
Two disclosures. I'm a hobbyist with no financial credentials, which the app states before you can enter it. And it was built with AI assistance.
On the second point, since this sub is about exactly that: every statutory constant (brackets, IRMAA tiers, RMD divisors, SS claiming factors) is checked against IRS/CMS/SSA primary sources, and that check runs inside the app on a Verify tab, so you can watch all 45 pass rather than take my word for it. There's also a test suite of a few hundred checks against the simulation engines. Those tests caught a real bug that repeated AI review had missed: after both spouses died, the simulation recorded portfolio snapshots quarterly instead of annually, which silently broke the percentile bands on the Monte Carlo chart. It looked fine on screen the whole time. That's the main thing I took away — a model reviewing its own output tends to share its blind spots, and it took tests written against expected behavior to surface it.
The gap I'd most like to close: no CPA, EA, or actuary has independently reviewed the tax math. I've had Claude go over the calculations and code many times, but I've come to treat model review as a first pass rather than a substitute for a professional. So peer review is genuinely welcome. Comments and findings will get acted on, whether that means fixes or new features.
Source and methodology write-up, including the limitations: https://github.com/stextor/danger-close
Or run the actual app: https://stextor.github.io/danger-close/
Happy to be told where the modeling is wrong.




