Why this matters
Tax‑loss harvesting is a routine tax planning technique that can lower your current tax bill and improve after‑tax portfolio returns. But when you hold similar assets in both taxable and tax‑deferred accounts (like IRAs or 401(k)s), a simple sale can create a surprising tax result if you don’t account for IRS rules—especially the wash‑sale rule. Getting the mechanics right prevents permanently losing a deduction and helps align tax actions with long‑term investment goals.
(Authority: IRS Topic 409: Capital Gains and Losses — https://www.irs.gov/taxtopics/tc409; IRS Publication 550, Investment Income and Expenses — https://www.irs.gov/publications/p550.)
The basic mechanics (a quick refresher)
- Realized capital loss: You only get a tax loss when you sell an investment for less than your cost basis in a taxable account.
- Netting order: Short‑term losses offset short‑term gains first; long‑term losses offset long‑term gains first; remaining gains/losses net against each other. If you end up with a net capital loss, you can deduct up to $3,000 of ordinary income per year (or $1,500 if married filing separately) and carry forward the remainder (IRS Topic 409).
- Tax‑deferred accounts: Losses inside traditional IRAs, Roth IRAs, and most employer plans are not deductible when they occur because those accounts are taxed differently — distributions are taxed as ordinary income (traditional) or tax‑free (Roth) rather than as capital gains/losses.
(See IRS Topic 409 and Publication 550 for details.)
Why losses in tax‑deferred accounts matter indirectly
Although you can’t deduct a loss that happens entirely inside an IRA or 401(k), those holdings still matter to your overall tax plan:
- Wash‑sale interactions: Buying or holding a substantially identical security in a tax‑deferred account within the 30‑day wash‑sale window can disallow a loss you realized in a taxable account (more below).
- Asset location: Holding the least tax‑efficient assets (tax‑inefficient active funds or bonds) in tax‑deferred accounts and tax‑efficient assets (index funds, ETFs) in taxable accounts reduces the need to harvest losses.
- Rebalancing and conversions: Harvesting can change your cost basis and shape the tax impact of future Roth conversions or taxable rebalancing.
The wash‑sale rule (the most common trap)
The wash‑sale rule disallows a loss if you buy a ‘‘substantially identical’’ security within 30 days before or after the sale that generated the loss. That 61‑day period (30 days before, sale day, 30 days after) also includes purchases in tax‑deferred accounts.
Important practical points:
- If you sell a stock for a loss in your taxable account and then buy the same (or substantially identical) stock in your IRA within the wash‑sale window, the loss is disallowed and cannot be added to the IRA basis — effectively you lose the deduction. The IRS has made clear that wash sales involving IRAs can permanently eliminate the loss (IRS Publication 550).
- ‘‘Substantially identical’’ is not precisely defined by bright‑line rules; generally avoid repurchasing the same ticker or identical mutual fund shares. Using similar — but not substantially identical — ETFs or mutual funds can maintain market exposure while avoiding the wash sale.
(Authority: IRS Publication 550: wash sales and special rules.)
Practical strategies to harvest losses safely across accounts
- Use non‑identical but correlated replacements
- Sell a losing S&P 500 ETF in taxable account, buy a total‑stock‑market ETF or a U.S. large‑cap mutual fund that is not ‘‘substantially identical.’n
- This preserves market exposure without creating a wash sale.
- Use the 31‑day rule when repurchasing
- Wait 31 days after sale to buy the same security back in a taxable account. If you don’t want to be out of the market, use a different fund for the interim.
- Mind cross‑account purchases
- Avoid buying the same or substantially identical security in any IRA/401(k) within the 30‑day window after realizing a loss in a taxable account. If your employer plan only offers certain funds that are substantially identical to holdings in taxable accounts, plan your harvests accordingly.
- Use specific tax‑lot identification
- When you have multiple lots bought at different times, use specific identification (not FIFO) to choose which lots to sell to maximize long‑term loss harvesting or preserve long‑term gains.
- Consider targeted lot harvesting
- Prioritize harvesting short‑term losses against short‑term gains because short‑term gains are taxed at higher ordinary income rates.
- Coordinate with Roth conversions and year‑end planning
- Harvesting losses reduces taxable income, which may make Roth conversions more attractive or allow you to stay within a lower tax bracket for the year.
- Keep detailed records
- Note sale dates, replacement purchases, and whether purchases occurred in an IRA or taxable account; software and brokerage reports help document compliance if audited.
Worked example
Sarah holds 1,000 shares of ETF A in a taxable account with a $30,000 unrealized loss and 500 shares of the same ETF A in her traditional IRA. She wants to harvest the taxable loss but keep market exposure. Options:
-
Safe route: Sell the taxable lot of ETF A to realize the $30,000 loss and immediately buy ETF B (a broad U.S. large‑cap ETF with different ticker and provider) in the taxable account. Do not buy ETF A in the IRA during the 30‑day window. This preserves exposure and preserves the tax deduction.
-
Risky route: Sell taxable ETF A and buy ETF A in the IRA within 30 days. Per IRS guidance, the $30,000 loss would be disallowed and not added to the IRA basis — that loss would be permanently lost.
When harvesting is and isn’t beneficial
Best times:
- When you have realized capital gains to offset this year.
- When you expect your marginal tax rate to be similar in future years and can use the loss to offset gains or $3,000 per year of ordinary income.
Less useful:
- If a sale would materially harm your long‑term asset allocation or create transaction costs and tax consequences that outweigh the benefit.
- If the wash‑sale exposure is high and unavoidable because of identical fund options across accounts.
Checklist before you harvest losses across accounts
- Confirm cost basis and tax lots for the taxable holdings you plan to sell.
- Check for substantially identical holdings in IRAs and 401(k)s and time purchases outside the 61‑day window.
- Decide replacement investments that preserve exposure without triggering wash sales.
- Estimate the tax benefit (short‑term vs long‑term netting; up to $3,000 ordinary income offset; any carryforward).
- Coordinate with your tax pro for year‑end planning, Roth conversions, or large sales.
Further reading and internal resources
- For a practical walkthrough of the harvesting process, see our guide: Tax-Loss Harvesting: A Practical Guide (https://finhelp.io/glossary/tax-loss-harvesting-a-practical-guide/).
- To learn how harvesting fits into retirement planning, see: Using Tax-Loss Harvesting in Retirement Planning (https://finhelp.io/glossary/using-tax-loss-harvesting-in-retirement-planning/).
- For advanced multi‑account techniques, see: Maximizing Tax-Loss Harvesting Across Multiple Accounts (https://finhelp.io/glossary/maximizing-tax-loss-harvesting-across-multiple-accounts/).
Common misconceptions
- “I can harvest losses inside my IRA.” — No. Losses inside IRAs are not deductible. The only way a loss affects taxes is through the wash‑sale interactions described above (IRS Publication 550).
- “Substantially identical is only the same ticker.” — Not necessarily. Mutual funds and ETFs from different providers that track the same index can be judged substantially identical by the IRS in some cases. Use conservative substitutes.
- “I can always offset gains dollar‑for‑dollar.” — Netting rules and the short‑term/long‑term ordering affect exactly how losses offset gains and how much ordinary income you can deduct.
Professional disclaimer
This article is educational and not individualized tax or investment advice. Tax rules change and application can vary depending on details of your situation. Consult a qualified CPA or tax advisor before implementing tax‑loss harvesting strategies, especially if you hold similar securities across taxable and tax‑deferred accounts.
Authoritative sources
- IRS, Topic No. 409 — Capital Gains and Losses: https://www.irs.gov/taxtopics/tc409
- IRS, Publication 550 — Investment Income and Expenses (Wash Sales): https://www.irs.gov/publications/p550

