retirement_assets

Who Are These Tools For? What Can They Do?

First, NOTE this

I use the term “IRA” for any account that is “Pre Tax”. And “Roth” for any tax free account. IRA in this context could be any number of actual account types: IRA, Traditional IRA, Solo IRA, SEP-IRA, Simple IRA, 401(k), 403(b), 457(b), Keogh plans, and probably more. Roth includes Roth IRA, IRA 401(k), HSA, TFRAs. HSAs are a bit of a different animal, actually.

Trivia for fun: “IRA” stands for “Individual Retirement AGREEMENT”, not account. Yeah, weird. And it’s not ROTH but Roth. It’s named after Senator William Roth who introduced it. Oh, and the “(k)” in 401(k) does NOT refer to Eugene Keogh, it’s a reference to the Internal Revenue Code.

You can inspect or download the files and run the tool(s) in about any browser (only Brave and Chrome have been tested). Or you can directly run the tools from Github Pages (nightskyguy.github.io). You need internet access for the fonts and charts to work properly because those are downloaded from public sources.

You can DIRECTLY invoke these tools:

There is no SUPPORT for these tools and no guarantee of accuracy, or appropriateness of use. No warranty of suitability for any purpose. There is also no charge. USE AT YOUR OWN RISK

A California resident built these with Google gemini, claude.ai and ChatGPT AI assistance. The author is a retired software engineer, spreadsheet twiddler, has a strong knowledge of Python, and Javascript. See Standalone Tools and Key Features below for a summary of what the tools can do - and be sure to look at What the Tool IGNOREs (and Known Bugs, below) so you understand the limitations of the Retirement Optimizer.

Here are less ambitious, standalone tools. Each should have a “How to Use” set if instructions, many have a way to generate a URL (called share) to capture your settings so you can either run again without reentering, or share with friends (or Redditors) for advice.

Standalone Calculator Tools

These tools are still being developed, while the main tool is currently taking a backseat. Each one runs standalone in your browser. Internet connection is needed to lead fonts and the tool for graphing charts. There is no “tracking” or reporting or sneaky stuff going on. You are welcome to see for yourself by inspecting the source code.

Retirement Projection — How might most of your retirement assets fare during your lifetime. This is a fuller, busier implementation than IRA Projection below. Indeed, eventually IRA Projection will be removed and Retirement Projection will introduce a “simple” mode with fewer controls.

This tool DOES include state taxation and a fairly rigorous tax calculator - the same calculator used in Retirement Optimizer, in fact. Also included are TWO IRA accounts, one Brokerage account, one cash account, and ONE Roth account. Why only one? Because Roth accounts are “interchangeable” tax wise, so if you already have balances in multiple Roth’s just sum them. Ditto with Brokerage and cash accounts. In fact, perhaps the two must difficult problems (which it would be nice to have a solution for) are determining what a “correct” dividend and “growth” rate are.

Like the “Retirement Optimizer” you cannot specify different growth rates for Brokerage, IRA/401k or Roth accounts. There are several reasons why, not the least of which is that you can make an IRA better than a Roth by significantly increasing it’s dividend or growth rate - but then you’re not comparing the value of the account taxation consequences as much as the difference in growth rates.

In real life, yes you are very likely to put your Bonds, TIPS, and Money Market funds in your IRA when you move your faster growing assets to your Roth - to take advantage of the magic of compounding tax free. And if you have a choice, your high dividend, and high interest assets are better placed in a Roth where the tax moth won’t feed.

There is no provision for adding lumpy withdrawals, but there is a way to apply a “spending smile” curve to withdrawals.

IRA Projection — How your pre-tax IRA/401k may (mis)behave In following various Reddit and YouTube discussions I notice a lot of handwaving about IRA/401K balances. What this tool does is allow you to set your current age, current IRA value, growth and inflation, filing status, and withdrawal rate. It then calculates the IRA balance and RMDs (once they kick in). If your current age is > 66 it assumes you have RMDs starting at 73, otherwise it assumes at 75. You can view the plot in Current or Future dollars. It’s particularly useful for noticing if/when RMDs (by themselves) would exceed certain thresholds (like the Federal 22% bracket). Note that the thresholds provided by default assume the standard deduction has been applied. All brackets are adjusted by the inflation figure given. There is no provision for including “additional” income like Social Security, pension, dividends, capital gains, or interest - so there is no semi-accurate way to determine actual taxes.

Where I think it will shine is to quickly determine: how your spending power erodes with inflation, and whether you are going to face RMD jeopardy (and the scale of that jeopardy). There is no state taxation included.

My main tool, Retirement Optimizer is geared to doing more SPECIFIC tax calculations. In some ways it’s simpler, but it’s optimizer is quite powerful.

FutureCost.html — Present Value of Growing Payments Answers the question: how much money must be set aside today — and left to grow — to fund a stream of payments that increase faster than inflation? The primary use case is Medicare IRMAA surcharges: because IRMAA penalties are paid from pre-tax IRA/401k withdrawals, the tool tracks federal and state marginal tax rates separately and grosses up every payment to reflect the actual account draw required. Sliders control the annual penalty, planning horizon, CPI inflation, extra growth above inflation (Medicare premiums have historically risen 2–4% above CPI), portfolio return rate, and income (MAGI). Four result metrics — funds to allocate now, year-1 pre-tax draw, final-year pre-tax draw, and total real cost in today’s dollars — plus a year-by-year chart of the payment as a percentage of income make the central point viscerally clear: those “small potatoes” grow in real purchasing-power terms every single year.

AfterTaxRealGrowth.html — After-Tax Real Growth Rate Did you know that your 2.5% interest bearing savings account LOSES money even if inflation is LESS than 2.5%? I suspected that, but this tool will show you the real answer - and surprise, it matters what your tax bracket is!

Visualize how inflation and taxation combine to erode nominal investment returns. Set an inflation rate and your portfolio’s nominal return, and the tool plots the real after-tax return across six federal tax brackets (0%, 12%, 22%, 24%, 32%, 37%), with the 24% bracket highlighted as the typical IRMAA Tier 1 landing zone. A dashed break-even line at 0% real return makes immediately visible that a 2.50% nominal return at 2.50% inflation and 25% tax is not a wash — it is a net loss of purchasing power (~0.61%/year). Each bracket card shows your real return at the current portfolio return alongside the minimum nominal return needed to merely preserve purchasing power at that bracket and inflation rate. Useful for stress-testing conservative accounts (CDs, money markets, bond funds) where the real return is easily negative without realizing it.

IncomeTaxPlanner.html — Federal + State Tax Sweep with IRMAA & Capital Gains Sweeps ordinary income from $0 to $1.1M in $10k steps and plots your true all-in effective tax rate — federal, state, and IRMAA combined — alongside a marginal rate curve that makes the Social Security torpedo, IRMAA tier crossings, and NIIT threshold immediately visible. Configure filing status, state (13 options), taxpayer ages, fixed Social Security income, capital gains proceeds and basis, a target year 2026–2035 with configurable CPI, and OBBBA provisions (senior deduction, elevated SALT cap). Two linked charts update instantly on any control change, and hovering either chart activates the corresponding tooltip on the other at the same income level.

Uses 2026 IRS Rev. Proc. 2025-32 federal brackets inflated forward by your chosen CPI rate; IRMAA premiums grow at that rate plus a configurable Medicare-specific increment. Designed to answer four questions: How sensitive is my tax burden to a $10k income change? Where are my sweet spots and danger zones (SS torpedo, IRMAA cliffs, NIIT)? What is my real all-in effective rate? What withholding should I target? The Share button encodes all settings into a compact URL that works from a local file or a web server — save it as a bookmark or paste it into a discussion to let someone else load your exact scenario.

The Retirement Optimizer

This is the OG tool. And while I like it, it’s definitely not for everyone. There is no “accumulation phase”. It focusses on managing withdrawals from your various accounts. But it has something I haven’t found in any tool: a withdrawal optimizer. Currently it applies a flat growth rate (sooner or later it’s going to feature some Monte Carlo “market shaking” - probably later).
My primary motivations for this tool are:

  1. What does the withdrawal phase look like?
  2. What happens to my assets?
  3. What withdrawal strategy results in: the lowest taxation, the highest ending wealth, and my favorite: the most lifetime spending.
  4. Is it really true that heavy Roth conversions, no Roth conversions, or “some” Roth conversions are BETTER? (Setting aside some of the significant advantages of Roth)
  5. How painful is the widow’s penalty, really?
  6. How different might things look for me if I move to another state?
  7. How much should I withdraw, convert or sell from each of my accounts to stay on track, and what will the tax consequences be?

[!WARNING] While I’ve renewed developing this tool and wiped out some of the daunting bugs, it’s still a work in progress.

Features in the Works (and Known Bugs):

Recent Fixes / Improvements

Why This Tool?

Because the author is in retirement and has an unhealthy IRA balance to manage - it became obvious that no tool he could find offered the flexibility and ease of use he desired. He and his wife are of different ages (so have different IRAs, RMD timings, Social Security amounts, etc.) Some really powerful tools did not offer California tax calculations (California is a high tax state), or did not provide for life expectancy, and more. Some of the questions the author sought to answer by modeling are these:

Therefore, the purpose of this tool is to model the remaining years of life with respect to spendable cash and taxation - and to determine how to optimize spendable cash. This tool may be useful to those who are in or very near retirement. It is not designed to analyze portfolios, in fact you must provide a best guess on the growth rate you expect for your particular portfolio(s). Signficantly more analysis is needed to do pre-retirement optimization, or optimization of asset mixes - this is not a tool for that. Some general principles apply, however: in general if you have a large IRA, it is usually best to put more bonds and conservative assets in the IRA, and put more aggressive assets in the Roth so that they can grow tax free.

Many focus on Roth Conversions and that is not wrong thinking, but such a view misses the big picture of WHY to do conversions. Also from the time one stops getting regular W2 income until the time one starts receiving pensions or social security is known as the “valley of opportunity”.
During this otherwise low income period, strategic withdrawals and movement is possible. Ultimately you are in a better place if you have degrees of freedom in your assets - more on this in a moment. It also does not make sense to pay more tax than necessary. I do not see taxation as evil, but it does not feel “right” to pay up to 14,000/year in IRMAA fees for no net benefit in Medicare - but that is one of the many pitfalls of having too much forced income.

Having a large tax deferred IRA balance (about 750K or larger at the start of drawing from your IRA) can have many consequences, the worst being taking forced income (RMDs) at higher tax rates and incurring those IRMAA penalties just described.
In this tool, we show each: IRMAA, state and Federal taxes to show the big picture: net taxes/net spendable income, year by year spend and “Final Wealth”.

Key Features:

What the Tool IGNORES

Limitations and Restrictions

A. The tool models things a year-at-a-time. This is not strictly accurate, because, for example, when you make withdrawals or conversions may affect the net. For example, if you wait until the end of the year to make your withdrawals has a different result than making a withdrawal at the beginning of the year. The order of calculations is: RMD withdrawals, calculation of spending/conversion withdrawals (and removal of those funds from the needed accounts) THEN taxes, interest and dividends on the remainder are calculated. Surplus funds after minimum spending levels are deposited into a Roth. In real life, you must do Roth conversions as a separate operation, but this tool can help forecast what that conversion would be. B. As noted, it tracks ONE total Roth balance, even if you’re married. C. IRA withdrawals are done proportionately. Some improvement may result by reducing a large balance first. You can model this by moving the total balance to one person. D. There is no SUPPORT for this tool. If you ask nicely, or offer a pull request to actually implement a feature, of course we can talk. It is a best effort/time available endeavor.

What about Other tools

One of the lovely things about engineers, is they like to build things. I’ve found many other free resources that both inspired me and made realize that there is more than one way to solve problems.

The sources I found around the interweb.

Operational Tools (All Free, though one is only free to try)

Ramblings and Observations

Some of the Things I Learned About Taxation

Moldy Brackets While the Social Security payments are adjusted annually by the CPI (Consumer Price Index), the rate at which Social Security is taxed is based on thresholds have NEVER been adjusted for inflation since they were established (1983 for 50%, and 1993 for 85%). This is no doubt why congress has churned and churned on trying to make Social Security non taxable.

IRMAA Escalation My original model assumed that the IRMAA tax brackets and amounts are adjusted by CPI, but that’s not true. The brackets are adjusted per CPI, but the amounts are tied to Medicare. The CPI has averaged about 2.8% annually over the last 20 years, but Medicare has averaged 5.6% annual increase. IRMAA, as mentioned is a TAX CLIFF, not a graduated bracket. That means if you make $1 more than the maximum you move up an IRMAA tier. The result is not only the need to pay the tax, say an extra 4k per year, but you may have to withdraw more from an IRA to pay the tax. At a 20% nominal tax rate, that extra $1 costs at least $5K AND may result in pushing you up into higher marginal brackets.

Those Moldy Brackets have added to another problem: there is a “Tax Torpedo” - along with several other tax “pitfalls” - that hits middle income retirees particularly hard. The so-called Tax Torpedo turns a portion of your income in the federal 10%, 12% and 22% brackets into an effective tax rate of 18.5%, 22.2% and 40.7% respectively. To add more injury, eight states tax Social Security and that can make these rates even worse. Here are the net effects:

State Tax Rates on Social Security Income by Federal Bracket Level (2026)

State Tax Structure Rate at 10% Fed Level (~$10-20K) Rate at 12% Fed Level (~$30-70K) Rate at 22% Fed Level (~$75-150K)
Colorado Flat 4.4% 4.4% 4.4%
Connecticut Progressive (7 brackets) 2.0% - 4.5% 5.0% - 5.5% 5.5% - 6.0%
Minnesota Progressive (4 brackets) 5.35% 6.80% 7.85% - 9.85%
Montana Two brackets 4.7% 4.7% - 5.65% 5.65%
New Mexico Progressive (5 brackets) 1.7% - 3.2% 4.7% - 4.9% 4.9% - 5.9%
Rhode Island Three brackets 3.75% - 4.75% 4.75% - 5.99% 5.99%
Utah Flat 4.55% 4.55% 4.55%
Vermont Progressive (4 brackets) 3.35% - 6.60% 6.60% - 7.60% 7.60% - 8.75%

Combined Tax Torpedo Examples (during 85% SS phase-out):

At 12% Federal Bracket:

At 22% Federal Bracket:

No “Long Term Capital Gains” in most states

33 of 50 states tax capital gains the same as regular income. Unfortunately many tools and many discussions neglect this aspect, which is another reason I wrote this tool. 9 states have no taxation or do not tax capital gains (as of 2025), and 9 states have preferential treatment of capital gains. [Source]

If you live in, or plan to move in a different state and you want to use this tool, you can! It now includes several states - and more can be added. If you’re impatient, you can get creative and ask AI to add your state to the TAXdata embedded in retirement_optimizer_taxdata.js file.

Roth Conversion Gotchas

The bad scenarios for Roth conversions are these - and most can be modeled with the IRA Projection Tool

  1. You withdraw/convert now at a (significantly) higher tax rate than you will face in your future. Converting into the 24% bracket might save you even if you expect to be in the 22% bracket, but converting into the 32% bracket will likely not help - at least this is the conventional wisdom.
  2. You withdraw + convert in an amount that pushes your taxation up (this is a specific case of 1)
  3. You convert before you’re 59.5 and do not have funds to pay the taxes AND/or that conversion pushes you into a higher taxation situation.
  4. You have modest IRA balances and expect that to be the case once you start drawing them in retirement. Modest here means something less than 1 million with 12 or fewer years before you plan to start drawing down assets. If you have 1M now, 10 years of 10% gains like those from 2016 to 2025 could TRIPLE that 1M to 3M. 3M would force you to take about 115k from your IRA at age 75. If married the RMD plus 70k in social security and other income lands you in the Federal 24% bracket. At 83 just the RMD will put you in the 24% Federal Bracket. If single, your first RMD will land you in the 24% Federal Bracket above the IRMAA tier 1.
  5. Your remainder estate is going to charity (not people). Charities pay zero tax regardless of the income source. If you can stomach the RMD forced income, it may not be necessary to bother with conversions.
  6. You plan to take advantage of QCDs (Qualified Chraritable Deductions) after 70.5 years of age. QCDs satisfy RMD requirements, and do not count against your MAGI so do not incur IRMAA penalties.
  7. You already have a healthy mix of assets (e.g. 60% IRA/401K, 30% Roth, 10% or higher Cash/CDs/Bonds in taxable).
  8. You have to pay conversion taxes solely from the IRA withdrawals. This is not always a bad thing.
  9. You plan to make relatively large annual withdrawals. For example, assume you’re 59 now and your IRA balance is 1M. It grows at a steady 8% annually. In 3 years you start taking 70K (adjusted for inflation, so actually 77k), at age 75 your RMD will be less than your planned annual withdrawal and remain so to age 99. This is “living on the edge”, but if you have other assets (Roth, Brokerage)

There are more than a dozen ways that not doing a conversion (to Roth or brokerage) can result in less spendable money and reduce spendable asset value. These scenarios mostly affect those with proportionately large IRA/401K balances. Even modest IRA/401K balances can significantly improve their asset balance and spendable cash through thoughtful withdrawals and conversions.

Here are some of the harms of having or accruing a large IRA/401K:

  1. Growth in or size of the IRA/401K balance reaches a point where you end up in a higher tax bracket before or after RMDs start.
  2. RMDs cause you to have little to no room for managing your desired spend (i.e. avoiding higher taxes and/or IRMAA and/or NIIT) - if you don’t plan to invoke QCDs.
  3. If the bulk of your assets remain in an IRA/401K, any large extra expenditure may cause a corresponding hit to your taxation (think remodeling, buying a fancy car, repairing a roof, or buying a vacation home).
  4. Tax rates could go up significantly in the future (I argue they will go up!).
  5. Social security bottoms out in 2033 (as it is on track to do), and you have to withdraw more to cover the loss of Social Security funds to maintain your style of living … increasing your taxation.
  6. Your spouse passes away. Now you’re in a single tax bracket paying 30% more taxes for the same income (unless you remarry).
  7. Your IRA (not 401K) crosses about 1.5m - in that case you could be forced to surrender some of it in a lawsuit. (401Ks have stronger protection). Roths are similarly exposed, but because Roth is not taxed, a smaller balance has greater value to you.
  8. You (and your spouse) pass away. Your heirs will be forced to liquidate the IRA/401K balance within 10 years at THEIR tax rate. (Roths must be liquidated, too, but there is no tax).
  9. If you or your spouse pass away, usually the most effective way to manage this is for the survivor to “take over” the deceased’s IRA/401K balance. The now larger balance will be subject to the survivors RMD requirements. This might be better if the surviving spouse is younger, but could go the other way.
  10. As your IRA/401K grows, your RMDs will also grow. At some point this causes 85% of your social security to become taxable, AND causes IRMAA taxes, AND possibly NIIT.
  11. IRA/401K withdrawals are taxable income in MOST states. Roth withdrawals are not taxable in any state.
  12. You die wealthy, not having spent what you could have, and your heirs pay the highest taxes of their lives to draw down the remaining balance in 10 years. Though they may still be able to use QCDs if they are 70.5 at the time.