morfizm (morfizm) wrote,
morfizm
morfizm

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()
Tags: in english, money, usa
Subscribe
  • Post a new comment

    Error

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

    When you submit the form an invisible reCAPTCHA check will be performed.
    You must follow the Privacy Policy and Google Terms of use.
  • 45 comments