Should I max 401k or use taxable account if capital gains are tax-free for me?

Trying to figure out whether I should max 401k or use taxable account if capital gains are tax-free for me this year. I'm in a low enough income bracket that I think my long-term capital gains rate is 0%. My employer matches 3% and I'm already getting that, but beyond the match I'm not sure the 401k is automatically better if I can hold index funds in a taxable brokerage and pay zero on the gains when I sell. I've been reading about this for weeks and keep going in circles. Does the tax-free capital gains thing actually flip the math, or am I missing something that makes the 401k still win?

40 comments

Are you certain you'll stay in that income bracket all the way until you sell? Because the 0% long-term rate isn't locked in for life — it applies in the year you sell, not the year you buy. If your income is higher when you eventually realize those gains, you'd owe tax at the 15% rate or above. The 401k deduction, on the other hand, saves you at your current marginal rate right now. If that rate is higher than zero, the 401k still has an edge even before you think about decades of tax-deferred compounding.

Kevin A.

Author

That's actually the piece I was missing. I was thinking about my rate today, not the rate when I retire and start selling. Good point.

Agreed. And don't forget traditional 401k withdrawals are taxed as ordinary income, not at capital gains rates. So you're trading a 0% capital gains rate for ordinary income tax on the back end. That matters a lot depending on how big your withdrawals will be.

What's your time horizon here? Because if you're talking 20-30 years, the 401k's tax-deferral on dividends and any rebalancing you do along the way is a real advantage even if your capital gains rate is 0%. In a taxable account, every dividend is taxed in the year it's paid, and if you rebalance you trigger gains. The 401k lets all of that compound untouched.

Kevin A.

Author

About 25 years out. I hadn't thought about dividends getting taxed every year in the taxable account. That does change things.

Exactly. The 0% rate only covers long-term capital gains and qualified dividends. Ordinary dividends are still taxed at your regular rate. Worth checking what your funds actually distribute.

Honestly I was wrestling with almost this same question last year. I uploaded my brokerage statements and my W-2 to taxr.ai and Taxr mapped out exactly where my income landed relative to the capital gains thresholds and showed me which bracket I'd actually be in after the 401k contribution. Turned out the pre-tax deduction dropped me into the 0% capital gains zone, which I wouldn't have seen just eyeballing it. For the actual thresholds check the Schedule D instructions — they have the rate breakpoints for each filing status.

Kevin A.

Author

Wait, so the 401k contribution itself can push you into the 0% capital gains bracket? That's a double benefit I totally missed.

Yes — traditional 401k contributions reduce your adjusted gross income and therefore your taxable income, and your taxable income is what determines which capital gains bracket you land in. So contributing more can literally move you from 15% to 0% on gains realized that year. The Schedule D instructions spell out the income thresholds by filing status.

Are you comparing traditional 401k or Roth 401k? Because Roth flips the whole thing. With Roth you pay tax now, qualified withdrawals are tax-free, but you don't get the upfront deduction. If your capital gains rate is already 0%, the Roth 401k vs. taxable account comparison looks very different than the traditional 401k version.

Kevin A.

Author

Traditional. I should've said that — my employer only offers traditional anyway.

Even with just traditional, it's worth knowing Roth exists for future planning. A Roth IRA (separate from the employer plan) can be worth stacking on top once you've captured the employer match.

The other thing people overlook is asset location. If you have both accounts, you'd ideally hold your highest-yielding, least tax-efficient assets in the 401k and put your most tax-efficient index funds in the taxable account. That way you get the 0% rate on the gains that actually qualify for it and defer taxes on the stuff that generates ordinary income.

Asset location is underrated in these conversations. Bond funds in taxable accounts are brutal — interest is taxed as ordinary income every year. Keep those inside the 401k.

Kevin A.

Author

I hadn't even thought about splitting by asset type. So it might not be either/or — it could be both accounts with different funds in each.

Worth adding what I found going through this: I uploaded my prior year Schedule D and 1099-B to Taxr and it flagged that some of my "long-term" lots were actually just under a year and would've been short-term if I'd sold when I planned to. That would have wiped out the 0% rate benefit entirely. The holding period rule in Publication 550 is strict — for securities you count from the day after the trade date you bought to the trade date you sold, and you need more than one year for long-term treatment.

Kevin A.

Author

That's a really easy mistake to make. I would've assumed calendar year but the actual day count matters.

Correct on the holding period. And inherited securities are automatically long-term regardless of how long you actually held them, but that's a separate situation from what you're describing here.

Does your 401k have good low-cost index fund options? Because if the plan is loaded with high-expense-ratio funds, the tax deferral benefit can erode faster than people think. It's not always obvious how much fees eat into returns over 25 years.

Kevin A.

Author

There's an S&P 500 index fund at 0.03% expense ratio and a few others that are decent. So yeah, the options are good.

Then fees aren't your problem here. That's a solid expense ratio and shouldn't be a reason to favor the taxable account.

Has anyone mentioned the wash sale issue? If you're holding similar funds in both a taxable account and a 401k, selling at a loss in the taxable account to harvest losses can trigger wash sale rules if you buy substantially identical securities in the 401k within 30 days before or after. The disallowed loss doesn't even carry over — it's just gone when the IRA or 401k buys the replacement shares.

This is a real trap. The wash sale rule applies to purchases inside a traditional IRA too, and the disallowed loss doesn't get added back to your basis in the IRA shares the way it would for a regular taxable account purchase. So you permanently lose it.

Kevin A.

Author

I would not have known that. So tax loss harvesting in taxable gets complicated the moment you have similar funds in the 401k.

Going back to your original question — if the capital gains rate is truly 0% for you in the year you sell AND your ordinary income tax rate when you contribute is also very low, then the traditional 401k advantage shrinks. The usual argument is you defer at a high rate now and pay at a low rate later. If both rates are low, the math gets closer. But liquidity matters too — 401k money is locked until 59½ with exceptions.

The liquidity point is real. Taxable brokerage has no access restrictions. If there's any chance you need the money before retirement, that tips toward taxable for at least some of it.

Are you accounting for state taxes? A lot of states tax capital gains as ordinary income regardless of the federal 0% rate. So your effective rate on those gains might not be zero once you add state. The 401k deduction may also reduce your state taxable income depending on your state's rules.

Kevin A.

Author

I live in a state with no income tax so that one doesn't apply to me, but it's a good point for anyone else reading this.

Something worth checking: the actual income thresholds for the 0% capital gains rate change each year with inflation adjustments. The Schedule D instructions on irs.gov publish the current year figures. Don't rely on a number you read in an article from two years ago.

Good reminder. The thresholds also depend on your filing status — single vs. married filing jointly vs. head of household all have different breakpoints. What's 0% for one status isn't 0% for another.

The 401k also gives you creditor protection that a taxable brokerage account doesn't, depending on your state. Not a tax question but it's part of the total picture if you ever face a lawsuit or bankruptcy.

If you're really trying to model this out precisely, the right inputs are your marginal ordinary income rate now, your expected marginal ordinary income rate in retirement (since 401k withdrawals are ordinary income), and your expected capital gains rate in retirement. If those numbers are the same, the accounts are roughly equivalent before fees and liquidity. Very few people's situations are actually rate-neutral though.

Kevin A.

Author

This is a cleaner way to frame it than I've seen anywhere else. Marginal rate now vs. ordinary income rate in retirement is the real comparison, not just capital gains rate today.

Covered earlier but worth repeating clearly: Publication 550 on irs.gov covers the holding period rules in detail if you want to verify exactly how to count days on specific lots before you decide to sell anything in the taxable account to test the 0% rate.

Are you also considering contribution limits? The 401k annual limit is set by the IRS and adjusts for inflation — the 401k plan instructions and IRS.gov publish the current year figure. The taxable account has no limit. If you have more to invest than the 401k cap, you're doing both by default.

Kevin A.

Author

I'm not close to the cap right now, but that's a good thing to know for the future.

And once you hit the 401k limit, taxable brokerage with low-cost index funds is usually the next best option before anything else, assuming you've also looked at IRA eligibility.

One thing that hasn't come up: required minimum distributions. Traditional 401k accounts are subject to RMDs starting at a certain age, which forces you to take taxable withdrawals whether you want to or not. A taxable account has no RMD. If you're planning to let money sit and compound well into retirement, that forced distribution could push you into a higher bracket than you'd choose on your own.

RMDs are genuinely underappreciated in these comparisons. The age and rules are set by statute and can change — the IRS RMD page and Publication 590-B have the current rules. It's worth knowing before you assume the 401k is fully flexible.

Kevin A.

Author

So the 401k might force me to take income I don't need, possibly at a rate higher than 0%, killing the capital gains benefit I was planning for. That's a pretty big wrinkle I hadn't considered.