A MarketWatch reader who realized a $500,000 gain inside an IRA was surprised to owe nothing at sale time. That is exactly how tax-advantaged accounts work, and it changes how you can rebalance. This guide explains how gains are treated inside IRAs and 401(k)s versus taxable brokerage accounts, why that difference matters when you sell, and how to track realized profit and cost basis across every account type.
Why selling a $500K gain inside an IRA triggers no tax bill
Selling a $500,000 gain inside a traditional or Roth IRA produces no capital gains tax at the moment of sale, because trades inside a tax-advantaged retirement account are shielded from the yearly capital gains reporting that applies to ordinary brokerage accounts. The IRA is a wrapper, and what happens inside it does not land on your Schedule D.
That is the mechanics of what the MarketWatch reader experienced. The gain was real, but the taxable event most investors expect simply did not happen inside the account.
- Traditional IRA: no tax at sale; tax applies later, as ordinary income, when you withdraw.
- Roth IRA: no tax at sale and, if rules are met, no tax on qualified withdrawals either.
- Taxable brokerage account: every sale of an appreciated position is a reportable event in the year you sell.
The important word is deferral, not disappearance. A traditional IRA moves the tax to withdrawal. A Roth can remove it entirely for qualified distributions. Neither one makes the gain vanish from reality, only from this year's tax return.
What is a tax-advantaged account versus a taxable account?
A tax-advantaged account is a retirement wrapper such as an IRA or 401(k) where buys and sells inside the account do not create an annual capital gains liability. A taxable brokerage account is a standard investment account where realized gains are reported and taxed in the year of sale.
How each account treats a sale
The core split is about when tax is owed and what kind of tax it is. Inside a retirement account, the sale is invisible to the IRS until money leaves the account.
| Account type | Tax at sale? | Tax at withdrawal? | Rate type |
|---|---|---|---|
| Traditional IRA / 401(k) | No | Yes | Ordinary income |
| Roth IRA | No | No (if qualified) | None on qualified withdrawals |
| Taxable brokerage | Yes | N/A | Short or long-term capital gains |
In a taxable account, the rate depends on your holding period. Long-term capital gains apply to positions held more than one year and are taxed at lower federal rates than short-term gains, which are taxed as ordinary income. That distinction does not exist inside an IRA, because the account defers or removes the tax question entirely.
Why account type changes how rebalancing feels
Rebalancing inside a retirement account is mechanically cheaper than rebalancing in a taxable account, because selling an overweight position in an IRA does not generate a tax bill. That single fact is why the same rebalancing move can cost very different amounts depending on where the shares sit.
The friction is only in the taxable account
Imagine one holding that has run from $50,000 to $120,000 and now dominates your allocation. Trimming it looks different in each wrapper:
- Inside an IRA: you can sell and reallocate with no immediate tax consequence.
- Inside a taxable account: selling realizes a $70,000 gain that may be reportable this year.
- The holding period matters: in a taxable account, a sale at the 11-month mark is short-term, while a sale after 12 months is long-term, which changes the rate.
This is why many investors keep their most frequently traded or highest-turnover positions inside tax-advantaged accounts and hold long-term core positions in taxable accounts. We are describing the mechanics here, not telling you where to place anything; that decision depends on your own situation and often a tax professional.
Which shares you are deemed to sell also matters in a taxable account. Our guide to FIFO versus LIFO cost basis methods walks through how the ordering rule changes the reported gain on a partial sale.
Why cost basis still matters inside an IRA
Cost basis does not affect your tax bill inside a traditional or Roth IRA, but it still matters for measuring performance. Knowing what you paid is how you judge whether a position actually worked, regardless of whether the gain is taxable.
Two different jobs for cost basis
Cost basis does two separate jobs, and account type decides which one is active:
- Tax job: in a taxable brokerage account, basis sets the gain or loss you report when you sell.
- Performance job: in any account, including an IRA, basis tells you your real return on each position.
The MarketWatch reader's $500,000 gain is a performance figure inside the IRA, not a tax figure. It still answers a vital question: how far has this position moved from where it started? That is worth tracking even when no tax is due.
A clean, timestamped record is what makes any of this credible later. Our piece on why a timestamped trade log matters for an audit trail explains why the history, not just the current balance, is the asset.
How PortfolioTrackr tracks realized P&L and cost basis across account types
PortfolioTrackr tracks realized profit and loss and cost basis separately for each account, so an IRA gain and a taxable account gain never get blended into one misleading number. You can keep a Roth IRA, a traditional IRA and a taxable brokerage account as distinct portfolios and still see them together.
One portfolio per account, one combined view
The structure is built for exactly this split:
- Each connected broker gets its own read-only portfolio, and it does not count toward your portfolio limit.
- The ALL PORTFOLIOS combined view sits on every plan for anyone with more than one portfolio, so your total net worth is one screen.
- Realized P&L and cost basis are calculated per position within each account, so you can see the IRA gain and the taxable gain on their own terms.
Getting your accounts in is flexible. Direct broker sync with Alpaca, Bybit and Interactive Brokers works on every plan, including the free trial. 42 brokers connect through the SnapTrade bridge on a paid Pro or Lifetime plan. And Smart & Easy Import by voice, text or screenshot, plus bulk CSV import, is on every plan, so a self-directed IRA or an account PortfolioTrackr does not sync directly still goes in cleanly. If you are deciding how to link accounts, our walkthrough on connecting a brokerage account to a portfolio tracker covers the options.
Status against your own targets, not advice
PortfolioTrackr reports status against the levels you set, such as still below target, Target 1 reached or stop-loss level reached, and checks every position and watchlist level within a minute, around the clock. It reports where price sits relative to your plan. It does not tell you to buy or sell anything.
Email, WhatsApp, Telegram and push alerts are on every plan, including the free trial, with SMS on Pro and Lifetime. So if your overweight IRA position hits a level you care about, you hear within a minute of your level being reached.
Common mistakes investors make across account types
The most common mistake is assuming a gain is taxable simply because it is large, when the account wrapper decides that, not the dollar amount. The MarketWatch reader's surprise is a good example: a $500,000 number feels like it must trigger tax, and inside an IRA it does not.
Other frequent errors cluster around record-keeping and account confusion:
- Blending accounts: treating an IRA gain and a taxable gain as one figure, which hides the fact that only one is reportable.
- Losing cost basis on transfers: moving shares between brokers and letting the original purchase price get dropped.
- Forgetting the holding period: in a taxable account, selling just under 12 months converts a long-term rate into a short-term one.
- Ignoring withdrawals: remembering the traditional IRA defers tax but forgetting it returns as ordinary income at withdrawal.
If you are still running this in a spreadsheet, the manual reconciliation is where errors creep in. Our comparison of a portfolio tracker versus a spreadsheet shows where the hand-built version tends to break down on cost basis and realized P&L.
The bottom line
Selling a gain inside an IRA produces no tax bill at the time of sale because the retirement wrapper shields trades from annual capital gains reporting; the tax is deferred to withdrawal in a traditional IRA or removed on qualified Roth withdrawals. In a taxable brokerage account, the same sale is reportable in the year you make it, and the holding period sets the rate.
That difference is why rebalancing feels cheaper inside retirement accounts and why cost basis still matters everywhere, for performance even when it does not drive tax. A holder can check their own picture: which account each position sits in, what the realized and unrealized figures are per account, and whether alerts are set at the levels that matter. PortfolioTrackr keeps those numbers separate and accurate across account types so nothing gets blended into a misleading total. None of this is tax or investment advice; for your own situation, confirm the treatment with a qualified tax professional.
Capital gains, worked out for you
On Pro and Lifetime: realised gains with a country tax lens, exportable to CSV or PDF when your accountant asks.
See My Tax Position See the live demo first →Frequently asked questions
Do you pay capital gains tax when you sell inside an IRA?
No. Selling an appreciated position inside a traditional or Roth IRA does not trigger capital gains tax at the time of sale. The retirement wrapper shields trades from annual reporting. A traditional IRA taxes withdrawals as ordinary income later, while qualified Roth withdrawals are tax-free.
Why did a $500,000 IRA gain produce no tax bill?
Because trades inside an IRA are not reportable capital gains events. The size of the gain does not matter; the account type does. The $500,000 is a performance figure, not a taxable one. Tax only appears later, at withdrawal, and only for a traditional IRA.
Does cost basis matter inside a retirement account?
Cost basis does not affect your tax bill inside an IRA or 401(k), but it still matters for measuring performance. Knowing what you paid tells you the real return on each position. Cost basis only drives taxable gains in a standard brokerage account, not in a tax-advantaged one.
Is rebalancing cheaper in an IRA than a taxable account?
Rebalancing inside an IRA creates no immediate tax consequence, so selling an overweight position costs nothing at sale time. In a taxable account, the same trim realizes a reportable gain, and the holding period decides whether it is taxed at short-term or long-term rates.
How does PortfolioTrackr track gains across IRA and taxable accounts?
PortfolioTrackr gives each account its own portfolio and calculates realized P&L and cost basis separately, so an IRA gain and a taxable gain are never blended. The ALL PORTFOLIOS combined view, available on every plan, then shows your total across all accounts on one screen.
