|June 11th, 2013|
First off, imagine they don't use a retirement plan and just invest the money on their own. The 20% ($10k/year) they're saving becomes about $8k after taxes , and after 40 years they've saved $320k. They average a 3.5% real return, bringing the total up to $700k. The spend the money over 25 years, selling $28k of investments each year. About 73% of those investments would count as "gains" , and paying tax on the gains brings the $28k down to $25k. Their total savings were $400k before taxes and after tax they received $625k.
Now imagine they had instead invested in a Roth 401(k). This means that you pay taxes on the money you contribute, but you don't pay taxes on growth. They end up with the same $28k, but they don't have to pay taxes on their gains. Their total savings were $400k before taxes and after tax they received $700k.
Finally, imagine they invest with a traditional 401(k). They don't pay taxes on the money they contribute, but they do pay taxes on the money they withdraw. They put in $10k/year pre-tax, for a total of $400k over 40 years. With investment gains this is aroun d$875k. Over 25 years they withdraw $35k/year, and their income tax would be around 15%, bringing the $35k down to $30k. Their total savings pre-tax are $400k, and the total amount the receive after tax is $744k.
(The key difference between the two 401k examples is that the marginal tax rate in the Roth case was 20% but that the tax rate when withdrawing from the traditional 401k was 15%. If both tax rates were 20% then both investments would end up at $700k after tax. There's no advantage to paying the tax sooner or later except how it affects what your tax rate is.)
This gives us:
|Standard investment||56% ($400k becomes $625k)|
|Roth 401k||75% ($400k becomes $700k)|
|Traditional 401k||86% ($400k becomes $744k)|
 If they earn $50k they deduct $10k for the standard deduction and one exemption, have $40k of taxable income, and pay $6k in federal tax. If they had instead only earned $40k, then after their $10k of deductions they would have had a taxable income of $30k for $4k in taxes. In earning an additional $10k they paid an additional $2k in taxes.
 I've been using just real returns and 2013 dollars everywhere, but to figure out how the money is taxed we need to know what happens with inflation because the 15% long term capital gains tax is on nominal growth, not real growth. If inflation were 0%, then a 3.5% real return over 40 years means that of your final balance 46% would be the initial after-tax contribution and 54% would be gains. Add an estimated 3% annual inflation, however, and 73% would be gains. (In this case after 40 years of inflation-adjusted $8k contributions they would have put in $600k (nominal) and ended up with $2.2M (nominal).)