I'm seeking feedback on this tool. Please see the considerations at the bottom and leave a comment if the tool draws the wrong conclusion or is missing important variables. Thank you, and I hope this is useful for you.

Your annual income, before tax.
Your annual contribution to your retirement account.
How many years until you stop contributing to your retirement account, and start withdrawing from it.
How many years you want your retirement funds to last.
Annual appreciation rate of your retirement account.
Taxable income before pre-tax 401(k) contributions. Overrides "Income" above, in case you itemize deductions.
The current value of your existing 401(k) account.

How It Works

  1. Figure out what a Traditional 401(k) saves per year in taxes while working
  2. Figure out what a Roth 401(k) saves per year in taxes while retired

If the first result is higher, a pre-tax account saves you more in the long run. Otherwise, a post-tax account saves you more in the long run.

Considerations

  • This tool assumes your retirement account's balance stays the same once you hit retirement. In reality, this isn't the case. Your account's value still fluctuates due to market conditions. The tool does, however, take the market into account when calculating the final value of your account once you hit retirement.
  • When calculating the final account value when hitting retirement, this tool may slightly over-estimate the balance. This is because it assumes "monthly compounding" based on your monthly contributions, but it should use annual compound interest while also taking into account monthly contributions. This is just a formula I haven't put time into figuring out.
  • The standard deduction is used by default when calculating the tax you owe. This can be overridden using the "advanced" view and you can put in your taxable income directly.