How do taxes really work on traditional retirement accounts?

I get that Roth IRAs and traditional IRAs have different tax benefits. Same applies to 401Ks, so for this question, I’m lumping them together as ‘retirement vehicles.’

My question is mainly about traditional accounts since Roths are pretty straightforward—you don’t pay taxes if you withdraw at the right age.

If you’re investing and selling stocks yourself in a traditional IRA or 401K, are the capital gains calculated every time you sell, or do they just look at the total value when you start withdrawing after age 59.5?

My concern is if I trade a lot in my traditional IRA or 401K, I could be generating a lot of capital gains, and if they can’t be offset by losses, I might be setting myself up for a big tax hit down the road. Like, what if I make big gains now but they turn into losses 10 years later?

If the market ends up flat like some predict, I might be losing by keeping everything in target date funds. But if I trade things like SH or SQQQ and make gains, could I be taxed on that even if I end up with average or even bad returns over 30 years?

You only get taxed when you withdraw the money. Nothing else in between matters. So you can trade all you want (though it’s not always a great idea to trade too much).

Also, stay away from odd investments like MLPs or certain real estate tickers—they can generate taxes even inside an IRA.

One thing to watch out for: trading in an IRA can trigger wash sales. If you sell a stock at a loss outside of your IRA and then buy it back in your IRA, it triggers a wash sale.

Yep, tax can be generated in an IRA, especially if you’re investing in certain things like real estate syndications or LLCs in a self-directed IRA. Debt-financed property, for example, can trigger UBIT (Unrelated Business Income Tax) on your IRA. If you have a self-directed 401k, though, the rules are different, and you can avoid the tax on UBIT from debt-financed real estate.

Everything that happens inside the account (gains, losses, dividends) doesn’t matter for taxes. You’re only taxed when you take money out.

Not quite. Foreign dividends can still generate taxes inside an IRA, because some foreign governments don’t recognize the tax-deferred status.

Capital gains don’t matter at all in traditional IRAs. You only pay income tax when you withdraw. Same thing with a Roth IRA, except you pay the taxes upfront and then nothing when you withdraw.

Everything you take out of a traditional IRA or 401K is treated as regular income, no matter how you earned the gains.

If you’re in a higher tax bracket, you should probably be focusing on a Roth. It’s usually a better option.

Yeah, I know Roth is better. But are there any cases where a taxable brokerage account might be better than a traditional IRA or 401K in terms of taxes?

It’s rare, but in a case where your taxable income is super low now and will be higher in retirement, it might make sense to use a taxable account. But that’s pretty uncommon. Usually, you expect lower taxes in retirement, so a traditional IRA is still better.

I guess I’m thinking of a situation where your income never drops, even in retirement, and you’re always in a high tax bracket.

The key is building wealth. The more money you keep today by not paying taxes, the more you can grow. You’ll pay taxes when you withdraw, but if you’ve built up more wealth, you’ll still come out ahead.

I need to build out some spreadsheet models for this. Over the short term (like 2-8 years), the lower capital gains tax might make taxable accounts seem more attractive.

Don’t forget that with a traditional IRA, you get a tax break upfront. That means you can invest more, and after that tax break, you could actually invest $16,120 in the IRA for the same cost as putting $10,000 into a taxable brokerage account.

Plus, in taxable accounts, you’ll get hit with capital gains taxes every year, while with a traditional IRA, your gains grow tax-deferred.

I’ve got a unique tax situation where the upfront tax break is more of a deferral. I’ll still owe the taxes later, so I need to model whether the gains being taxed at a higher rate later would outweigh the benefits.

Think of it this way: a traditional IRA is great if you plan on taking out small amounts in retirement. If you expect to spend a lot, a Roth might make more sense since withdrawals aren’t taxed. It depends on your lifestyle and goals.

In general, if you’re making a lot of money, traditional is better for the tax break. If your income is low, Roth is better.

Taxes are deferred until you take money out.

To answer your question, everything in a traditional IRA is unrealized until you withdraw it. Gains, losses, dividends—they all just change the value of your account. It’s when you take a distribution that you’re taxed as ordinary income. Whether you’re taxed depends on your whole financial situation at the time.