I'm trying to do the math behind the value of a 401k roth versus 401k traditional.

Here is what I have deduced so far, but I can guarantee you I am overlooking something, as the answer is just not what I expected. Perhaps the numbers are too simple, or I'm missing a big section of tax code... please let me know.

Assuming 2015 tax brackets of:

income step rate

9225 10%

37450 15%

90750 25%

189300 28%

And an annual salary of 103500 (roth), or as far as taxes are concerned, an annual salary of 85500 (traditional) with 18k into the 401k. This is the amount I would be paying into each tax bucket.

103500 85500

10% 922.5 922.5

15% 4233.75 4233.75

25% 13325 12012.5

28% 3570 0

total 22051.25 17168.75

Which offers a leftover 4882.5 for investing elsewhere (a taxed account).

Let's assume a post-inflation growth of 5%, my accounts would both contain 77794.96 after 30 years (principal * (growth^years)). The principal for each investment is 18k.

But in the case of the traditional, I took the tax-saved dollars and put them into another investment, also earning 5% post-inflation.

investment

21101.88365

capital gains 15%

after tax 17936.6011

So my total value of each would be 77794.96 (roth) and 95731.56 (traditional + investment).

But now to factor in the taxes I have to pay on the withdraw, assuming an income of 37450 per year.

10% 922.5

15% 4233.75

traditional tax total 5156.25

Leaving my total value...

401k roth: 77794.96

401k trad: 90575.31

At first glance, traditional is clearly the way to go, but I want to be sure. Do these numbers change as my salary grows? I'm smack in the middle of the 28% bracket, so there's really no way to get out, or any expectation that my taxes will go up.

Can someone point out me errors here, or offer some additional variables? Is state/local tax large enough to be considered in this calculation? What else am I missing?