The Wash Sale Rule Explained: How to Avoid This Costly Trading Trap

Kazi Mezanur Rahman
Kazi Mezanur Rahman
Published Oct 28, 2025Updated Aug 28, 20268 min read
The Wash Sale Rule Explained: How to Avoid This Costly Trading Trap

A trader sells a losing ETF position in her brokerage account in December, banking the loss before year-end the way any reasonable investor would. Two weeks later, her Roth IRA, running on autopilot, buys the same ETF back through a scheduled monthly contribution she set up months earlier and genuinely forgot about. She didn't try to game anything. She still loses the entire deduction, permanently, with no cost basis adjustment anywhere to ever recover it.

That's Revenue Ruling 2008-5, and it's the single most expensive version of the wash sale rule that most traders have never heard of until it happens to them. Most people who know the wash sale rule at all know the basic version: sell at a loss, buy it back too soon, wait a bit longer. The version that actually costs real money is the one hiding in a second account they weren't even watching.

What is the wash sale rule? The wash sale rule disallows a tax loss when you sell a security at a loss and buy a substantially identical security within 30 days before or after that sale. Outside a retirement account, the disallowed loss isn't gone, it gets added to the cost basis of the replacement shares, deferring the benefit rather than erasing it. Inside an IRA, there's no basis to add it to, so the loss simply disappears.

The 61-Day Window, Laid Out Plainly

The rule gets called a "30-day rule" so often that people miss how it actually works. The real window runs 30 days before your loss sale, includes the sale date itself, and extends 30 days after it, 61 days total during which a repurchase can wipe out the loss.

Timing of the repurchase
More than 30 days before the sale
Effect
Safe. Outside the window entirely.
Timing of the repurchase
Anywhere from 30 days before through the sale date
Effect
Triggers the rule.
Timing of the repurchase
Anywhere in the 30 days after the sale
Effect
Triggers the rule.
Timing of the repurchase
31 days or more after the sale
Effect
Safe. Outside the window entirely.

Only a repurchase that lands cleanly outside all 61 days keeps your loss intact. Buying early and selling later still counts, which is the half of this window people forget about most often.

What Happens to a Disallowed Loss, With Real Numbers

Say you buy 100 shares at $50 a share, a $5,000 cost basis. The stock drops, and you sell at $45, taking a $500 loss. Within the window, you buy 100 shares back at $46.

That $500 loss is disallowed for the current tax year. It doesn't vanish, though, not in a normal taxable account. It gets folded into the cost basis of the replacement shares: $4,600 paid plus the $500 disallowed loss equals a new basis of $5,100, or $51 a share. You'll finally recognize that original loss when you sell these replacement shares and stay out of the position for at least 31 days afterward. The tax benefit isn't gone. It's postponed, tied to a future sale you haven't made yet.

This deferral mechanic is also why the wash sale rule connects directly to the netting process in the capital gains guide. A trader who keeps re-entering the same ticker after a loss can end up with a real usable loss for the year that's a fraction of what their raw trading statement shows, since every disallowed loss just keeps riding forward onto a new, higher cost basis.

The Version That Actually Destroys Money: Cross-Account and IRA Wash Sales

Here's the mechanic that turns an ordinary tax annoyance into a real, permanent loss of money. The wash sale rule applies across every account you or your spouse own, not just the one where you made the trade. That includes a taxable brokerage account, a joint account, and any IRA, Traditional or Roth.

The IRS settled this specifically in Revenue Ruling 2008-5. Sell a security at a loss in your taxable account, and have your IRA buy substantially identical shares within the 61-day window, and the loss is disallowed exactly as if you'd bought it back in the same taxable account. Except there's no fix available. Shares inside an IRA have no cost basis for capital gains purposes at all, since nothing inside the account is ever taxed as a capital gain or loss in the first place. There's nowhere for the disallowed loss to go. It's simply gone.

Play that out with real numbers. You sell 200 shares of a stock in your taxable account for a $4,000 loss. Three weeks later, your Roth IRA, funded by a scheduled contribution you set up at the start of the year, buys the same stock. That $4,000 loss is disallowed under Revenue Ruling 2008-5, permanently. In the 24% federal bracket, that's roughly $960 in tax savings that simply never happens, not deferred to next year, not recoverable any other way.

The IRS has also indicated that a wash sale can occur across spouses: one spouse selling at a loss while the other buys the same security shortly after can trigger the rule too. And your broker can't save you here. Brokers only track wash sales within a single account on your Form 1099-B. They have zero visibility into your other accounts, your spouse's accounts, or your IRA. Catching a cross-account wash sale before it costs you money is entirely your job, especially if you or your household run automatic contributions, dividend reinvestment, or scheduled purchases into any retirement account that might overlap with something you traded elsewhere.

What Counts as "Substantially Identical"

Buying back the exact same stock is obviously identical. Beyond that, the line gets blurrier, and it's worth knowing where.

Options on the same underlying stock count. Buying a call, or selling an in-the-money put, on a stock you just sold at a loss is treated as acquiring a substantially identical position and will trigger the rule. Bonds from the same issuer with similar maturity and coupon terms are generally treated as identical too. Different share classes of the same company, if they carry similar rights, usually are as well.

The genuinely gray area is similar ETFs. Selling an S&P 500 ETF at a loss and buying a different provider's S&P 500 ETF is risky territory. They're technically distinct securities, but the IRS hasn't issued definitive guidance, and their near-identical performance gives an examiner real room to argue they're substantially identical anyway. Swapping into an ETF tracking a genuinely different index, moving from an S&P 500 fund into a Nasdaq 100 fund, for example, is the safer move if you want to stay invested in roughly the same market without the ambiguity.

The Traps That Catch People Who Aren't Even Trying to Harvest Losses

A dividend reinvestment plan can trigger a wash sale without you making a single deliberate trade, since an automatic repurchase counts exactly the same as a manual one. This is precisely what happened in the IRA scenario that opened this article, and it's worth checking whether any of your accounts have DRIPs or scheduled contributions running quietly on autopilot.

Being assigned on a short put, or exercising a long call, also counts as acquiring the underlying stock. An assignment you didn't initiate, on a stock you happened to sell at a loss recently, can trigger the rule with zero deliberate action on your part. And late-December loss sales are particularly disruptive for tax planning specifically, since a repurchase in early January pushes the disallowed loss into the following tax year, potentially wrecking a deduction you were counting on landing in the current one.

Reader-Exclusive Access

The Secret Investors Underground Discount Page

We found the discount page Investors Underground tucks away from their normal signup flow. Same chat room, same courses, same instant access, just up to $700 less.

Get the Investors Underground Discount

Quarterly Membership

Reader Discount

Three months of the live chat room, daily watchlists, and IU's scanners, no year-long commitment.

Annual Membership

Lowest Monthly Rate

A full year of the same room, tools, and daily watchlists, at IU's best per-month rate.

Courses + Annual Bundle

Best Value

All five IU courses folded into a year of membership access.

No Sale to Wait For IU's biggest bundle discounts usually show up around Black Friday or Labor Day. This link gets you the same $700 off any day of the year.

Terms are set and rotated by Investors Underground. Subscriptions are non-refundable. Affiliate link, see our disclosure.

Does the Wash Sale Rule Apply to Cryptocurrency in 2026?

Not currently. The IRS classified virtual currency as property, not a security, in Notice 2014-21, and the wash sale rule under IRC Section 1091 applies specifically to stock and securities. Property that isn't a security falls outside the rule entirely, which means selling Bitcoin, Ethereum, or another directly held crypto asset at a loss and buying it straight back carries no wash sale consequence as of 2026.

This isn't a permanent feature of the tax code, just the current state of it. Congress has repeatedly proposed extending wash sale treatment to digital assets, and none of those proposals have passed as of this writing. Crypto ETFs and crypto-related stocks are a different story entirely: those are securities in their own right, and the wash sale rule applies to them exactly like any other stock or ETF. The full picture of how crypto trading gets taxed is covered in the crypto day trading taxes guide.

How to Actually Stay Out of This

Start with the accounts you might be forgetting about. If you or your spouse run any automatic investing, DRIPs, scheduled IRA contributions, robo-advisor rebalancing, in an account that might hold the same securities you actively trade elsewhere, that's exactly the setup that produced the opening story of this article. Either pause automatic purchases around a planned loss sale, or check what they'll buy before you sell anything at a loss.

For a deliberate loss sale in a taxable account, the simplest fix is patience: wait a full 31 days after the sale before buying the same security back anywhere. If you want to stay invested in the same theme without waiting, buy something similar but not substantially identical, a different stock in the same sector, or an ETF tracking a clearly different index, and you stay outside the rule's reach entirely.

For traders who've qualified for Trader Tax Status, there's a permanent structural fix rather than a habit to maintain. Electing Section 475(f) mark-to-market accounting converts your trading securities from capital assets to ordinary assets, and the wash sale rule only ever applied to capital assets in the first place. Once that election is properly in effect, documented correctly, since a botched election helps nobody, the rule simply stops touching your covered trades, at the cost of giving up long-term capital gains treatment on anything you might otherwise have held past a year.

Frequently Asked Questions

What exactly triggers a wash sale?
Quick Answer: Selling a security at a loss and buying a substantially identical one within 30 days before or after that sale.

Both halves have to happen. Selling at a loss alone triggers nothing, and buying a security you haven't recently sold at a loss triggers nothing either. It's the specific combination, and the timing, that matters.

Key Takeaway: Track both your sales and your repurchases across the full 61-day window, not just the 30 days after you sell.
How long do I need to wait before buying back a stock I sold at a loss?
Quick Answer: A full 31 days after the sale date, in every account you or your spouse own.

Waiting exactly 30 days still falls inside the disallowed window. The 31st day is the first day a repurchase falls cleanly outside it.

Key Takeaway: When in doubt, round up. Waiting one extra day costs little and removes any ambiguity.
Can a wash sale in my IRA really cause a permanent loss, not just a delay?
Quick Answer: Yes. Under Revenue Ruling 2008-5, a repurchase in a Traditional or Roth IRA within the wash sale window disallows the loss with no cost basis adjustment available, since IRAs have no recognized capital gains basis at all.

Outside an IRA, a disallowed loss gets added to your replacement shares' cost basis and eventually recovered. Inside an IRA, there's nothing for it to attach to, so it's gone the moment the rule is triggered.

Key Takeaway: This is the single costliest version of the wash sale rule, and it can happen without you making a deliberate trade if an automatic contribution or DRIP is running in the background.
Does the wash sale rule apply if I buy the replacement shares in a different account?
Quick Answer: Yes. It applies across every account owned by you or your spouse, not just the account where you sold.

This includes taxable brokerage accounts, joint accounts, and IRAs. The IRS has also indicated the rule can reach purchases made by a spouse shortly after the other spouse's loss sale.

Key Takeaway: Never assume a trade is safe from the wash sale rule just because it happened somewhere else in your household's overall holdings.
What happens to a disallowed wash sale loss outside of an IRA?
Quick Answer: It gets added to the cost basis of the replacement shares, deferring the tax benefit until those new shares are eventually sold without triggering another wash sale.

The loss isn't gone in this scenario. It's postponed and folded into a higher cost basis on the position you now hold.

Key Takeaway: A wash sale in a normal taxable account changes the timing of your deduction, not the total amount you'll eventually be able to claim.
Can I avoid a wash sale by buying a similar ETF instead of the exact one I sold?
Quick Answer: Sometimes, but ETFs tracking the same index sit in a genuine gray area with no definitive IRS ruling.

Selling an S&P 500 ETF and buying one tracking the Nasdaq 100 is generally treated as safe. Selling one S&P 500 ETF and buying a different provider's S&P 500 ETF is riskier, since near-identical performance gives the IRS room to argue they're substantially identical.

Key Takeaway: The safer swap changes the underlying index or sector exposure, not just the fund provider.
Does the wash sale rule apply to options trading?
Quick Answer: Yes. Buying a call option or selling an in-the-money put on a stock you just sold at a loss counts as acquiring a substantially identical position.

An option assignment or exercise you didn't personally initiate can trigger the rule just as easily as a deliberate purchase, which catches traders who assume the rule only applies to trades they actively chose to make.

Key Takeaway: Track your options activity on a stock alongside your stock trades when checking for wash sale exposure, not as a separate category.
Does the wash sale rule apply to cryptocurrency in 2026?
Quick Answer: No, not currently. Crypto is classified as property rather than a security, and the wash sale rule under IRC Section 1091 only applies to stock and securities.

You can sell a crypto asset at a loss and buy it back immediately without triggering a wash sale disallowance under current law. Crypto ETFs and crypto-related stocks are an exception to this exception, since those are securities and the rule applies to them normally.

Key Takeaway: This is current law, not a permanent exemption. Proposed legislation to close it hasn't passed, but it's been introduced more than once.
Can automatic investing, like a dividend reinvestment plan, trigger a wash sale without me trading on purpose?
Quick Answer: Yes. An automatic repurchase counts exactly the same as a manual one, and this is one of the most common ways people trigger the rule without realizing it.

A DRIP quietly repurchasing shares of something you just sold at a loss, or an automatic IRA contribution buying the same security you sold in a taxable account, can both disallow a loss with zero deliberate action on your part.

Key Takeaway: Check any automatic investing running in the background of your accounts before assuming a loss sale is clean.
How does the wash sale rule specifically hurt active day traders?
Quick Answer: High trading frequency makes it easy to trigger the rule repeatedly on the same ticker, chaining disallowed losses forward and creating a tax bill that doesn't match the trader's actual net result for the year.

A trader who takes a loss, re-enters the same stock, takes another loss, and re-enters again can end up with a string of disallowed losses all riding forward on an increasing cost basis, none of them usable until the position finally closes and stays closed for 31 days.

Key Takeaway: This chaining effect, more than any single wash sale, is why active traders repeatedly working the same names are the group most exposed to this rule.

Disclaimer

This article explains the general mechanics of the wash sale rule under IRC Section 1091 and Revenue Ruling 2008-5 for educational purposes only and does not constitute tax, legal, or financial advice. Cross-account and IRA wash sales in particular can produce permanent, unrecoverable losses, and the treatment of similar ETFs and crypto assets can shift with future guidance or legislation. Consult a qualified CPA before relying on any tax-loss harvesting strategy. Full disclaimer

Article Sources

This guide relies on IRS publications, the specific revenue ruling governing IRA wash sales, and current IRS guidance on digital asset classification, since the most costly version of this rule and its treatment of crypto both depend on distinctions the IRS has drawn precisely but not always publicized well.

Was this helpful?

Be the first to weigh in

Kazi Mezanur Rahman

Written by

Kazi Mezanur Rahman

Founder, independent researcher, and editor of DayTradingToolkit. A one-person publication focused on risk-first trading education and documented tool research. He trades his own capital as a retail trader and combines personal market experience with systematic primary-source research.

Keep Reading

Crypto day trading taxes explained with cost basis, property treatment, taxable crypto transactions, and wash sale rule considerations.

Day Trading Basics

Crypto Day Trading Taxes: Cost Basis, Property Treatment, and the Wash Sale Loophole

A trader swaps Bitcoin for Ethereum, never touching a bank account, and assumes there's nothing to report. The IRS treats it as a full taxable sale anyway. Here's how crypto's property classification actually works, the cost basis choice that can change your tax bill, and what's different about mining and staking income.

Kazi Mezanur Rahman·
Short-term vs. long-term capital gains comparison for day traders, showing holding periods, tax treatment, and trading charts.

Day Trading Basics

Short-Term vs. Long-Term Capital Gains for Day Traders

Two traders can make an identical $10,000 profit and owe a meaningfully different tax bill, purely from how many days they held the position. Almost every day trade lands on the expensive side of that split. Here's the holding-period rule, the full 2026 bracket numbers, the netting process, and the self-employment tax myth that sends traders toward the wrong strategy.

Kazi Mezanur Rahman·
Mark-to-Market Trading (Section 475(f)): The Ultimate Day Trader Tax Tool

Day Trading Basics

Mark-to-Market Trading (Section 475(f)): The Ultimate Day Trader Tax Tool

A trader named Poppe had a $1 million loss and a qualifying trading pattern, and still lost the mark-to-market tax treatment because he couldn't prove he'd properly filed the election. Here's how the election actually works, the trade-off table for deciding if it fits your trading style, and exactly how to avoid Poppe's mistake.

Kazi Mezanur Rahman·
Quarterly estimated taxes for day traders with tax deadlines, calculator, and payment planning to help avoid underpayment penalties.

Day Trading Basics

Quarterly Estimated Taxes for Day Traders: Avoiding the Underpayment Penalty

A trader has a rough nine months, then an incredible six-week run that makes the whole year profitable. He pays his full tax bill by April 15 and still gets a penalty notice, because the IRS calculates underpayment quarter by quarter, not against the annual total. Here's the safe harbor rules, the fix for lumpy trading income, and exactly when payments are due.

Kazi Mezanur Rahman·

Comments

No comments yet. Be the first to share your thoughts.

Leave a comment