Given:
x
starting contributiont
marginal tax raten
number of compounding periods (years)g
compounding growth per periodp
early-withdrawal penalty
Then we want to figure out, if the money is put into a tax-deferred account, how long does it need to be left there before taking it out (and paying a penalty) results in the same or more value than taking the tax hit up front?
The only reason that the winning strategy is not always, "don't pay the penalty" is that in a tax-deferred account the growth is tax free until you pull the money out of the account.
x*(1-t)*((1+g*(1-t))^n) <= x*(1-t)*(1-p)*((1+g)^n)
(1+g*(1-t))^n <= (1-p)*((1+g)^n)
((1+g*(1-t))/(1+g))^n <= 1-p
n >= ln(1-p)/ln((1+g*(1-t))/(1+g))
n >= ln(1-p)/(ln(1+g*(1-t)) - ln(1+g))
As a convenient bc
function:
define worth_it_in(p, g, t) { return l(1-p)/(l(1+(g*(1-t)))-l(1+g)); }
Plugging in some real numbers for p
, t
, and g
we can find out how many
years results in more money in the tax-deferred account. p
is currently 10% in
US tax law. Lets say that you're in the 25% marginal tax bracket and expecting
nominal investment growth of 5% (very conservative according to market history):
t = 0.25
p = 0.10
g = 0.05
n >= ln(1-0.10)/(ln(1+(0.05*0.75)) - ln(1+0.05))
n >= ln(0.90)/(ln(1.0375) - ln(1.05))
n ~= 8.79 years
So, you'd have more money if you contributed to the 401(k), waited about 9 years, then withdrew it and paid the penalty than you would if you kept it and invested it in a taxable account.
Using less conservative numbers like being in the 28% marginal bracket and seeing nominal growths of ~9% the numbers come out to ~4.5 years for break-even.