RetirementCheck101 logo A Service of RiskCheck101.comRetirementCheck101
Educational content only — not investment, tax, or legal advice. Based on publicly available IRS rules as of 2025. Disclaimer.

Tax-Loss Harvesting and the IRA Wash-Sale Trap

StrategiesUpdated 2025-05-07

Tax-loss harvesting is the practice of selling a losing position to generate a deductible capital loss, then buying a similar but not identical replacement to stay in the market. It works only in taxable accounts — and it interacts with retirement accounts in two specific, often-missed ways.

The mechanics

When you sell a security at a loss, the loss offsets capital gains dollar-for-dollar under IRC §1211. If your losses exceed your gains for the year, up to $3,000 of net loss can offset ordinary income; the remainder carries forward indefinitely. There is no "use it or lose it" — unused losses follow you until death, at which point they vanish.

The wash-sale rule

IRC §1091 disallows the loss if you buy a "substantially identical" security within 30 days before or after the sale, in any of your accounts. The disallowed loss is added to the basis of the replacement security, so it is deferred, not lost — unless the replacement is held inside an IRA.

The IRA wash-sale trap

Revenue Ruling 2008-5 holds that selling a security at a loss in a taxable account and buying the same security in your IRA within the 61-day window triggers the wash-sale rule and the disallowed loss is permanently lost — it cannot be added to the IRA's basis because IRAs do not track per-share basis. This is the only place in the wash-sale regime where the loss disappears for good.

The same trap applies to a Roth IRA, a spousal IRA, and (per IRS informal positions) to a 401(k) and other employer plans. The safest rule: do not buy the harvested security in any of your retirement accounts within 30 days.

Spousal accounts

The wash-sale rule looks at "you or your spouse." Selling a position in your taxable account and having your spouse buy the same fund in hers triggers a wash sale. This includes purchases inside her IRA, where the IRA trap above also applies.

Worked example

You bought the Vanguard Total Stock Market ETF (VTI) in your taxable account at $250/share. The market drops, and VTI is now $220. You sell 1,000 shares, realizing a $30,000 capital loss. You immediately reinvest in the Schwab U.S. Broad Market ETF (SCHB) — a different fund tracking a different index, not "substantially identical" under §1091. Your portfolio's market exposure is unchanged. The $30,000 loss is locked in: $3,000 offsets ordinary income this year, $27,000 carries forward.

If you had instead bought VTI inside your IRA within 30 days, Rev. Rul. 2008-5 would disallow the $30,000 loss and you would have no basis credit to recover it.

"Substantially identical" — the gray zone

Two ETFs tracking the same index from different issuers are generally treated as not substantially identical (VTI vs. SCHB, both broad-U.S. market). Two share classes of the same mutual fund are substantially identical. Bonds with the same issuer but different CUSIPs are generally not substantially identical unless the terms are essentially the same. The IRS has not issued comprehensive guidance, so the conservative path is "different issuer, different index."

Common mistakes

Sources

Tax-loss harvesting lives in your taxable account, not in the RetirementCheck101 worksheet — but the after-tax growth assumptions in our projections account for it. Explore the free educational tool.