401k vs Taxable Account Calculator

See whether a tax-deferred 401k or a taxable brokerage account leaves you with more money after taxes at retirement.

How it is calculated

The same yearly amount of pre-tax pay is routed two ways and both are valued after tax at the end.

F = ((1 + r)n − 1) ÷ r (one deposit a year at year end)
401k = C × F × (1 − tret)
invested = C × (1 − tnow)
taxable = invested × F − 15% (or your rate) × gain, where gain = invested × F − invested × n

C is the yearly contribution in dollars, r the return as a decimal, n the years (up to 80), and the three tax rates are percentages. In the 401k the full amount is invested and taxed once on withdrawal. In the taxable account income tax is paid first and capital gains tax is charged once, on the final gain only. The tool does not tax dividends or gains year by year, and does not model an employer match. If the return is zero or negative the gain is floored at zero and no capital gains tax is charged.

Worked example

You set aside $10,000 a year for 25 years at 7%, with 24% income tax now, 22% at retirement and 15% capital gains tax. The growth factor is (1.0725 − 1) ÷ 0.07 = 63.249. 401k: 10,000 × 63.249 = $632,490 before tax, times 0.78 = $493,342.49. Taxable: after tax you invest $7,600 a year, which grows to $480,692.69. Gain = 480,692.69 − 7,600 × 25 = $290,692.69; capital gains tax at 15% is $43,603.90, leaving $437,088.78. The 401k comes out $56,253.71 ahead.

Try this example →

Common mistakes

  • Entering a rate as a decimal. Tax rates and the return are percentages: 24 means 24%, and 0.24 is read as 0.24%.
  • Expecting yearly dividend or capital gains tax in the taxable account. Here tax on the gain is taken only once at the end, so the taxable result is flattered compared with a fund that pays taxable dividends every year.
  • Using the same tax rate for the income tax now and the retirement tax rate when you expect them to differ. This choice drives the result: with a retirement rate equal to today's and 0% capital gains tax, the two accounts come out identical.
  • Entering the contribution after tax. The field is the pre-tax amount; the tool itself subtracts the current income tax for the taxable side.
  • Forgetting the employer match and the early withdrawal rules. Neither is modelled, so a match would make the 401k look even better, while access before retirement age favours the taxable account.

Sources

About this calculator

A traditional 401k lets contributions grow tax-deferred, with taxes owed only on withdrawal in retirement, while a taxable brokerage account is funded with after-tax money and its gains are subject to capital gains tax. Because 401k contributions reduce taxable income today and grow untaxed until withdrawal, they typically compound to a larger after-tax balance than an equivalent taxable account, especially over long horizons — though withdrawals are eventually taxed as ordinary income.

Financial planners and individual investors use this comparison to decide how to prioritize retirement savings, particularly when choosing between maxing out a tax-advantaged 401k versus investing in a flexible taxable account that offers penalty-free access before retirement age, and the answer often depends on current versus expected future tax brackets.

This calculator compares the after-tax final value of contributing to a 401k against investing the same money in a taxable account, so you can see which leaves you with more spendable money at retirement under your assumptions. The taxable account is modeled with capital gains tax charged once, on the total gain at the end, not as a yearly drag on returns.

Was this helpful?

You can pick up to 3 reactions.

Comments

  • Be the first to comment.

Popular calculators

All Calculators