retirement_assets

Who is this For? What Can It Do?

You can download the files and run the tool offline in about any browser (only Brave and Chrome have been tested). Or you can directly run the tool from Github Pages here:

** nightskyguy.github.io **

There is no SUPPORT for this tool and no guarantee of accuracy, or appropriateness of use. There is also no charge. USE AT YOUR OWN RISK

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

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/401K balance (about 350K or larger) 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 lump IRMAA together with California state and Federal taxes (including NIIT and capital gains) 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 at least two other free resources that both inspired me and made realize that there is more than one way to solve problems.

The sources I found:

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, several states (8 remaining) 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:

  1. You withdraw/convert now at a higher tax rate than you will face in your future.
  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.

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.

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).
  3. If the bulk of your assets remain in an IRA/401K, any large extra expenditure will result in a corresponding hit to your taxation (think remodeling, buying a fancy car, or a vacation home).
  4. Tax rates could go up significantly in the future (I argue they will go up!).
  5. To spend more, you have to withdraw more and pay more tax.
  6. 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… increasing your taxation.
  7. Your spouse passes away. Now you’re in a single tax bracket paying 30% more taxes for the same income (unless you remarry).
  8. 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.
  9. 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).
  10. 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.
  11. 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.
  12. IRA/401K withdrawals are taxable income in MOST states. ROTH withdrawals are not taxable in any state.