He’ll Sell a Fund at a $30,000 Loss in His Brokerage Account and Buy It Back in His IRA a Week Later. The IRS Won’t Just Delay That Loss. It’ll Erase It for Good
Selling a fund at a loss and buying it back inside an IRA looks like a clean workaround, but one IRS ruling turns what should be a temporary setback into a permanent one. The math on what disappears is worse…
This post may contain links from our sponsors and affiliates, and Flywheel Publishing may receive compensation for actions taken through them.
A common tax move goes like this: an investor with a $30,000 loss in a fund in a taxable brokerage account sells the fund, books the loss to cut this year’s tax bill, then buys the same fund back in an IRA a week later. The investor gets the write-off and holds the investment. It looks like a free tax break.
Plenty of investors try this, and it comes up on investor forums all the time. One Bogleheads thread on this exact move points to Revenue Ruling 2008-5 as the reason it fails. Under that ruling, a loss that would normally just be delayed is gone for good.
How a Wash Sale Usually Just Delays the Loss
A wash sale happens when someone sells an investment at a loss and buys a “substantially identical” one (in plain terms, essentially the same investment) within 30 days before or after the sale. In that case, you can’t deduct the loss that year.
In most cases, that only changes the timing, as IRS Publication 550 says the disallowed loss gets added to the cost basis of the new shares. Cost basis is the purchase price you use to calculate your gain or loss when you sell. The publication says that adjustment “postpones the loss deduction until the disposition of the new stock or securities.” The tax benefit returns when you sell the new shares.
Why the IRA Purchase Wipes It Out
Publication 550 lists buying substantially identical stock “for your individual retirement arrangement (IRA) or Roth IRA” as a trigger. It then excludes that case from the basis adjustment. Rev. Rul. 2008-5 makes it explicit: the loss is disallowed, and “the individual’s basis in the IRA or Roth IRA is not increased by virtue of section 1091(d).”
Shares inside an IRA don’t have a cost basis the way taxable shares do, so the loss has nowhere to go. A Roth IRA functions no differently.
A spouse’s purchase counts too. Publication 550 says that if “your spouse or a corporation you control buys substantially identical stock, you also have a wash sale.” Nothing in that wording exempts a spouse’s IRA.
What He Gives Up in Real Dollars
Say he’s already locked in at least $30,000 of long-term gains this year and pays the 15% long-term capital gains rate. A clean loss would wipe out those gains and save him about $4,500 in federal tax.
With no gains to offset, the loss instead counts against ordinary income. That’s capped at $3,000 a year ($1,500 for married people filing separately). Whatever’s left carries over to the next tax year and keeps carrying over until it’s used up. A married couple in the 24% bracket (taxable income over $211,400 in 2026) would save about $720 a year, and it would take 10 years to use the whole loss. If the replacement shares land in the IRA, he gets none of it. This is one of several IRS rules that quietly drain retirement accounts, and we mapped the rest in a free guide here.
Automatic Purchases That Set It Off Quietly
Dividend reinvestment is the easiest one to miss. If his IRA already owns the same fund and pays a dividend inside the window, the automatic reinvestment counts as a purchase. Publication 550 matches shares bought against shares sold, so a small reinvestment usually wipes out only a matching portion of the loss. That portion is gone for good.
A 401(k) is less clear. The ruling covers IRAs and Roth IRAs and doesn’t mention workplace plans. Still, a paycheck contribution that buys the same fund inside the window looks a lot like the purchase the ruling describes, so it’s safer to treat it as a risk.
Then there’s what counts as “substantially identical.” Publication 550 says it depends on “all the facts and circumstances in your particular case,” and the IRS hasn’t drawn a bright line for funds. Two share classes of the same fund own the same portfolio, so they’re generally treated as identical. Two index funds that track different indexes are generally treated as different investments.
Three Ways to Take the Loss and Keep It
- Wait out the window. Make no purchases of the fund in any account for 30 days before or after the sale. He’s out of the market for about a month, but the loss stays intact.
- Swap to a similar fund in the taxable account. Picking one that tracks a different index holds him invested and gives the loss a clean basis treatment later. For many people, this may be the more practical option, because it avoids sitting in cash.
- Freeze automatic buying everywhere. Turn off dividend reinvestment and change 401(k) contribution settings in every account, including a spouse’s, that holds the same fund, until the window closes.
Before harvesting any loss, check the setting in every household account: automatic dividend reinvestment on that fund. That setting is most likely to trigger a wash sale without anyone noticing, and once it happens inside an IRA, you can’t recover the loss.
Contact [email protected] for any questions or corrections.








