?

Log in

No account? Create an account
   Journal    Friends    Archive    Profile    Memories
 

Traditional 401k vs Roth 401k - morfizm

Jul. 25th, 2016 09:42 pm Traditional 401k vs Roth 401k

Update: the original version of the post have bugs. Sorry about inconvenience.

Everyone is puzzled whether Roth 401k is better than Traditional 401k. Usually financial advisors will not give a good explanation why one or another is better. They tend to compare the same amount invested in one and another, which is wrong amount of investment, because IRS limit works differently for Traditional vs Roth. For Traditional it's pre-tax and for Roth it's after tax. Same amount invested in Roth is actually a larger investment.

To make things fair, I compared Roth 401k with a combination of Traditional 401k plus regular investments, so that we would look at the same amount spent pre-tax. The code below does the modelling. It assumes your current marginal tax rate is 50% (pretty common for software engineers in SF Bay Area), you'll invest up to Roth maximum every year for 15 years, make 10% annually less 3% inflation, have 6K company match limit (it actually doesn't matter for comparison! thanks rezkiy for pointing that out, which led to discovery of bugs in the original version of this post). All that matters is expected average tax rate at retirement, and it seems that breakeven point is around 20%.

     avg tax     Roth401k Trad401k+Inv
          10%       875588       941751
          15%       864363       896849
          20%       853137       851947
          25%       841912       807045
          30%       830686       762143
          35%       819461       717241

Here is the source:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# initial constants
class const:
    def __init__(self, retirement_effective_tax_rate):
        self.irs_cap = 18000
        self.company_match_limit = 6000
        self.current_marginal_tax_rate  = 0.5
        self.retirement_effective_tax_rate = retirement_effective_tax_rate
        self.long_term_capital_gain_tax_rate = 0.2
        self.inflation_rate = 1.03
        self.investment_growth = 1.07
        self.years_before_retirement = 15

# money made with Roth 401k
def roth401k(const):
    roth401k_account_value = 0
    roth401k_company_match_value = 0
    current_irs_cap = const.irs_cap
    current_company_match_limit = const.company_match_limit
    for i in range(const.years_before_retirement):
        roth401k_account_value *= const.investment_growth
        roth401k_company_match_value *= const.investment_growth
        roth401k_account_value += current_irs_cap
        roth401k_company_match_value += current_company_match_limit
        current_irs_cap *= const.inflation_rate
        current_company_match_limit *= const.inflation_rate
    after_tax_available_at_retirement = roth401k_account_value
    after_tax_available_at_retirement += (roth401k_company_match_value
                                          * (1 - const.retirement_effective_tax_rate))
    return after_tax_available_at_retirement

# money made with traditional 401k + investments
# if the same amount after tax is kept for spending.
def trad401kAndInv(const):
    trad401k_account_value = 0
    investment_account_value = 0
    investment_cost_basis = 0
    current_irs_cap = const.irs_cap
    current_company_match_limit = const.company_match_limit
    for i in range(const.years_before_retirement):
        trad401k_account_value *= const.investment_growth
        trad401k_account_value += current_irs_cap
        trad401k_account_value += current_company_match_limit
        investment_account_value *= const.investment_growth
        equivalent_roth401k_contribution_pretax = current_irs_cap / (1 - const.current_marginal_tax_rate)
        extra_investment = ((equivalent_roth401k_contribution_pretax - current_irs_cap)
                             * (1 - const.current_marginal_tax_rate))
        investment_account_value += extra_investment
        investment_cost_basis += extra_investment
        current_irs_cap *= const.inflation_rate
        current_company_match_limit *= const.inflation_rate
    after_tax_available_at_retirement = (trad401k_account_value
                                         * (1 - const.retirement_effective_tax_rate))
    after_tax_available_at_retirement += investment_cost_basis
    after_tax_available_at_retirement -= ((investment_account_value - investment_cost_basis)
                                          * const.long_term_capital_gain_tax_rate)
    return after_tax_available_at_retirement

def printAll():
    print "%12s %12s %12s" % ("avg tax", "Roth401k", "Trad401k+Inv")
    for retirement_tax in [0.1, 0.15, 0.2, 0.25, 0.3, 0.35]:
        r = roth401k(const(retirement_tax))
        t = trad401kAndInv(const(retirement_tax))
        print "%12.0f%% %12.0f %12.0f" % ((retirement_tax * 100.0), r, t)
    print

printAll()

43 comments - Leave a commentPrevious Entry Share Next Entry

Comments:

From:juan_gandhi
Date:July 26th, 2016 05:31 am (UTC)
(Link)
Спасибо; мне все лень было это дело запрограммировать, я чисто интуитивно. Да.
From:morfizm
Date:July 26th, 2016 05:49 am (UTC)
(Link)
Пожалуйста. Я тоже интуитивно чувствовал, что 401K лучше. Я думаю, что весь сыр-бор вокруг Roth в том, что на рекламках берут "одну и ту же сумму X", вкладывают её и туда, и туда, и смотрят, что получилось. Только забывая на минутку, что отложенные X pre-tax и X after-tax это объёмы вложений. Я же сравнил исходя из того, что в период накоплений after tax на руках остаётся такая же сумма.
From:morfizm
Date:July 27th, 2016 03:55 am (UTC)
(Link)
Обновил пост. К сожалению, вычисления были неверны, и выводы тоже.
Roth бъёт traditional если ожидаемый средний налог на пенсии будет выше 20%.

Edited at 2016-07-27 04:00 am (UTC)
From:juan_gandhi
Date:July 27th, 2016 06:29 am (UTC)
(Link)
Ой. Буду думать.
From:morfizm
Date:July 27th, 2016 06:32 pm (UTC)
(Link)
Мне кажется, основной вопрос, на который надо ответить - будете ли вы single в retirement'е, и будете ли вы жить в Калифорнии в retirement'е. Roth лучше, если на любой вопрос ответ "да", но 401K может быть лучше, если оба вопроса "нет",
From:rezkiy
Date:July 26th, 2016 06:13 am (UTC)
(Link)
shouldn't it heavily depend on tax bracket today vs at retirement? And if today's bracket is higher than at retirement, regular 401k should win; and if the other way around, Roth?
From:morfizm
Date:July 26th, 2016 06:59 am (UTC)
(Link)
It heavily depends on both - tax bracket and company match.

At max company match (like Google's), break-even point is 50% today vs 47.5% at retirement. At 6K company match it's 50% and 37%.

Note two things:

1. We're comparing marginal tax rate today and more like average tax rate at retirement (when most income will be drawn from retirement fund). Even today marginal can be 20% higher than average.

2. At retirement one doesn't need to live in taxy California.
From:rezkiy
Date:July 26th, 2016 07:28 am (UTC)
(Link)
don't all companies match in pre-tax funds?

1, 2. 100% agreed.
From:morfizm
Date:July 26th, 2016 07:33 am (UTC)
(Link)
They do. For better intuition why company match matters, forget about it for a second, and imagine you're comparing putting 10K (pre-tax) in 401k vs putting 5K (after tax) in Roth. It's same pre-tax dollar, but apparently 401k would win, right? Big part of the potential for Roth to win lies in a fact that you can put MORE pre-tax money there, because 18K cap works both pre-tax and after-tax. But if you don't have this leverage, it's weaker position for Roth.

Now let's get back to company match: something similar is going on: you have, say $6K company match, and in 401K case you add the entire 6K to your 401K. In Roth case you add 3K. The bigger is company match, the bigger is the difference, and 401K variant wins more and more.
From:rezkiy
Date:July 26th, 2016 07:50 am (UTC)
(Link)
well there are two things pro Roth:
- as you said, more pre-tax money (but then you must compare with same pretax money split between 401k and taxable account, with all liquidity benefits of taxable account BTW)
- and higher tax bracket in retirement

To me, higher tax bracket in retirement is a problem which is very nice to have. I will therefore dismiss this outcome since with this outcome my 401k savings are probably going to be minuscule compared to that source of income that somehow pushed me somewhere above 45% (or whatever it is) tax bracket.

Also if you are serious about retirement savings I don't see how does company match matters. You max out anyway and company match is always pre-tax. So it is a wash.
From:morfizm
Date:July 26th, 2016 04:19 pm (UTC)
(Link)
> I don't see how does company match matters.

All I am doing is giving explanation to explain the results I see with simulation. Try it yourself. Run the code (included in this post), and if you think there's a bug, you're very-very welcome to point them out.

I did not took into account liquidity benefits (was assuming retirement spending is smooth), but I did compare exactly the same amount of pre-tax money invested in Roth vs 401k + regular (after-tax) investments.
From:rezkiy
Date:July 26th, 2016 05:54 pm (UTC)
(Link)
# money made with roth
roth_account_value = 0
for i in range(years_before_retirement):
roth_account_value *= investment_growth
roth_account_value += irs_cap
roth_account_value += company_match_limit * (1 - current_marginal_tax_rate) <--- BUG
irs_cap *= inflation_rate
company_match_limit *= inflation_rate
From:morfizm
Date:July 26th, 2016 06:04 pm (UTC)
(Link)
Yep, thanks. I knew company match is pre-tax for each case, but I've just checked details and it's more complex than that. We should track Roth contributions and Roth company match separately, and then apply income tax on Roth company match part.
From:morfizm
Date:July 26th, 2016 06:07 pm (UTC)
(Link)
I've fixed it.
It does add some to Roth, but doesn't change picture substantially. 401k + investments are better in most cases.

# money made with roth
roth_account_value = 0
roth_company_match_value = 0
for i in range(years_before_retirement):
>> roth_account_value *= investment_growth
>> roth_company_match_value *= investment_growth
>> roth_account_value += irs_cap
>> roth_company_match_value += company_match_limit
>> irs_cap *= inflation_rate
>> company_match_limit *= inflation_rate

after_tax_available_at_retirement = roth_account_value
after_tax_available_at_retirement += roth_company_match_value * (1 - retirement_effective_tax_rate)
print "Roth = ", after_tax_available_at_retirement
From:rezkiy
Date:July 26th, 2016 06:21 pm (UTC)
(Link)
Absolutely agree on conclusions. My point was, match does not matter.
From:morfizm
Date:July 26th, 2016 06:26 pm (UTC)
(Link)
My point is that it does. It may determine whether Roth is better or worse than 401k+investments.

I've ran fixed code (v2), with the following constants, alternating company match:

# initial constants
irs_cap = 18000
company_match_limit = ???
current_marginal_tax_rate = 0.5
retirement_effective_tax_rate = 0.3
long_term_capital_gain_tax_rate = 0.2
inflation_rate = 1.03
investment_growth = 1.07
years_before_retirement = 15


Match 0: Roth 540K, 401k+investments 520K (Roth wins!)
Match 2000: Roth 582K, 401k+investments 586K (Roth loses a bit)
Match 6000: Roth 667K, 401k+investments 717K (Roth clearly looses)
Match 18000: Roth 919K, 401k+investments 1110K (Roth loses by a lot!)
From:rezkiy
Date:July 26th, 2016 07:10 pm (UTC)
(Link)
процитируй код целиком пжалста.
From:morfizm
Date:July 26th, 2016 07:22 pm (UTC)
(Link)
I've updated full code in the post's body (see above).
From:rezkiy
Date:July 26th, 2016 07:30 pm (UTC)
(Link)
try swapping your Roth and Traditional code blocks; you are up for some interesting discoveries.
From:morfizm
Date:July 26th, 2016 07:52 pm (UTC)
(Link)
Whoops. Whoops. Whoops.

I'll fix everything in the evening :)
Sorry.
From:rezkiy
Date:July 26th, 2016 07:32 pm (UTC)
(Link)
From:rezkiy
Date:July 26th, 2016 06:22 pm (UTC)
(Link)
Depending on your age at retirement you can have a hard time draining your 401k. No such difficulty whatsoever with a taxable account.
From:morfizm
Date:July 26th, 2016 07:35 am (UTC)
(Link)
Bottom line, "all companies match in pre-tax funds" (in either case) is exactly the reason why company match matters and make 401K option more beneficial.
From:rezkiy
Date:July 26th, 2016 07:59 am (UTC)
(Link)
I disagree because I (and probably you) max out anyway.

If you don't max out Traditional 401k, you are only better off with Roth when your tax rate goes up at retirement, which to me is a nice to have problem described above. If you don't max out Roth, you should immediately rebalance your contributions so that you DO max out, with a combo of Traditional and Roth, for exactly same reasons.
From:morfizm
Date:July 26th, 2016 04:21 pm (UTC)
(Link)
Simulation assumes you're maxing out traditional 401k. Actually it assumes you're maxing out Roth 401k, and then it compares with maxed traditional 401k + investments.

Yes, higher tax bracket in retirement is a nice problem to have. As I mentioned before, Roth still either loses or wins at a small margin, depending on various parameters.
From:morfizm
Date:July 27th, 2016 03:55 am (UTC)
(Link)
Обновил пост. К сожалению, вычисления были неверны, и выводы тоже.
Roth бъёт traditional если ожидаемый средний налог на пенсии будет выше 20%.

Edited at 2016-07-27 04:00 am (UTC)
From:rezkiy
Date:July 27th, 2016 04:00 am (UTC)
(Link)
Отлично. Это какой доход на семью из двух человек в например Вашингтоне?
From:morfizm
Date:July 27th, 2016 04:04 am (UTC)
(Link)
https://smartasset.com/taxes/washington-tax-calculator#wYzPOJ6H2T

Сто тыщ это 19%. Но на самом деле, там большой диапазон. Например, с дохода в 150 тыщ средний налог будет 22%, что тоже примерно тот же ballpark. 200 тыщ это 24%.
From:rezkiy
Date:July 27th, 2016 04:23 am (UTC)
(Link)
Выбери married.
From:morfizm
Date:July 27th, 2016 05:00 am (UTC)
(Link)
Да, я смотрел married.
From:rezkiy
Date:July 27th, 2016 05:18 am (UTC)
(Link)
-- а процитировал почему-то single. Проверь все еще раз.
From:morfizm
Date:July 27th, 2016 06:30 pm (UTC)
(Link)
Не, циферки были от married.
Для single 20% это 50K, 22% это 70K, 23% - 100K, 26% - 150K.

Кстати, так как я пока планирую быть single к retirement age, мне это надо учесть. Подозреваю, что Roth мне выгоднее именно по этой причине.
From:rezkiy
Date:July 27th, 2016 07:46 pm (UTC)
(Link)
Где????

From:morfizm
Date:July 27th, 2016 09:07 pm (UTC)
(Link)
Ну вот ты и показал, 150 тыщ - это 22%. Я про это писал выше.
33390/150000 = 22.26%
From:rezkiy
Date:July 27th, 2016 09:13 pm (UTC)
(Link)
написано 15.91.
From:rezkiy
Date:July 27th, 2016 09:14 pm (UTC)
(Link)
ты почему-то думаешь что ты платишь SS/Medicare с того что снимаешь с 401k/IRA. Это не так.
From:morfizm
Date:July 27th, 2016 09:42 pm (UTC)
(Link)
Я не обратил на это внимание, very good point, thanks.
From:morfizm
Date:July 27th, 2016 04:05 am (UTC)
(Link)
Правда, если не нужно работать, то 100 тыщ это дофига. Если дом выплачен, то вообще.
From:rezkiy
Date:July 27th, 2016 04:33 am (UTC)
(Link)
а если еще и дети какие есть выросли, и новых нет, то точно лафа.
From:morfizm
Date:July 27th, 2016 05:00 am (UTC)
(Link)
Детки-конфетки, да. Я не думаю, что когда-нибудь осилю ещё.
From:shvarz
Date:July 26th, 2016 05:37 pm (UTC)
(Link)
Я не понял почему тут противопоставляются 401k и IRA - это же разные вещи совершенно. Первое идет через работодателя, второе - индивидуальный счет.
From:morfizm
Date:July 26th, 2016 05:46 pm (UTC)
(Link)
Про IRA вообще речи не идёт, читайте внимательно.
From:sab123
Date:July 26th, 2016 07:16 pm (UTC)
(Link)
Самое выгодное начинание - это складывать в 401k, а потом если рынок упадет, то в этот момент переложить деньги в Roth IRA, добавив денег извне на уплату налогов.