The Wash Sale Rule in 2026: How It Taxes Investors and 3 Legal Ways Around It

The wash sale rule (IRC Section 1091) disallows a tax loss when you buy a substantially identical security within 30 days before or after selling at a loss. The loss is usually not gone: it is added to the replacement shares' cost basis. The exception is IRAs, where IRS Revenue Ruling 2008-5 makes the disallowed loss permanent.

Key facts

  • The rule covers a 61-day window: 30 days before and 30 days after the sale date.
  • A disallowed loss is added to the replacement shares' cost basis under IRC Section 1091(d).
  • Under IRS Revenue Ruling 2008-5, repurchasing inside an IRA makes the loss permanently disallowed.
  • Capital losses offset gains dollar for dollar; up to $3,000 per year ($1,500 if married filing separately) can offset ordinary income, with the rest carried forward.
  • A spouse's purchase of the identical security within the window also triggers the rule.

Prefer video? The Problem Solved channel publishes plain-language explainers on money topics like this one.

What the wash sale rule actually says

Congress created the wash sale rule to stop investors from manufacturing tax losses. Without it, you could sell a losing stock on December 31, claim the loss, buy the same shares back on January 2 while cutting your tax bill. Section 1091 blocks that: if you sell at a loss and acquire a substantially identical security within the window, the loss is disallowed for the current year.

Disallowed does not always mean destroyed. In a taxable account, the disallowed loss is added to the replacement shares' cost basis under Section 1091(d), so you recover the benefit on a later sale. The rule usually defers the deduction rather than denying it, with one devastating exception covered below.

The 61-day window most investors miscount

The window runs 30 days before the sale as well as 30 days after, creating a 61-day period centered on the sale date. Buying the same stock two weeks before you sell the losing lot triggers the rule just as surely as buying it two weeks after.

Automatic purchases are the classic trap. Dividend reinvestment, monthly 401(k) contributions into company stock, and employee stock purchase plans all count as acquisitions. Many December harvests are quietly washed out by a January dividend reinvestment the investor never considered. Before harvesting, turn off automatic reinvestment and check every account where the security might appear.

"Substantially identical": where the gray zone lives

The statute never defines substantially identical precisely, which creates the gray zone. The same company's stock is clearly identical to itself, and options on a stock are treated as substantially identical to the underlying shares. Two S&P 500 index funds from different providers are widely viewed as substantially identical, though the IRS has never ruled definitively.

The safer side of the line is a security that is similar but not identical: an S&P 500 fund swapped for a total-market fund, or one company's stock replaced by a competitor's. This distinction powers the most popular legal workaround, and our tax-loss harvesting guide shows how to use it without drifting from your allocation.

The IRA trap: how a loss disappears permanently

Here is the exception that destroys wealth. In IRS Revenue Ruling 2008-5, the agency held that selling at a loss in a taxable account and repurchasing the identical security inside a traditional or Roth IRA within the window triggers the rule, and the basis adjustment does not apply. Because cost basis inside an IRA has no tax meaning, the disallowed loss cannot be preserved anywhere. It is gone forever.

Example: you sell 100 shares at a $4,000 loss in your brokerage account, then buy 100 identical shares in your IRA three weeks later. The $4,000 deduction is disallowed, and no basis adjustment rescues it. Had you repurchased in the taxable account, the $4,000 would have been added to the new shares' basis and recovered on a later sale.

Three legal ways around the rule

One: wait 31 days. Sell at a loss and stay out of the security for the full window. You accept a month of market-exposure risk, which is the honest price of the deduction. Two: buy similar, not identical. Replace the sold security with one tracking a different index or a competitor's stock. You keep your allocation while the replacement fails the substantially-identical test.

Three: double up, then sell. Buy the replacement shares first, wait more than 30 days, then sell the original lot at a loss. The purchase predates the window, so no wash sale occurs. Whichever method you use, pair it with an understanding of capital gains rates and brackets so harvested losses offset the highest-taxed gains first. A good brokerage account with specific-lot tracking makes all three methods easier to execute cleanly.

What to do if you already triggered one

First, do not panic: in a taxable account the loss is deferred, not destroyed, via the basis adjustment. Keep records of the disallowed amount and the adjusted basis, because brokers do not always track wash sales across accounts correctly.

Second, check for the IRA variant, the one case where the loss is truly gone; there is no fix after the fact. Third, review automatic purchases, including a spouse's accounts, to stop the pattern repeating. A wash sale is a timing error, and timing errors are correctable with a calendar and a checklist.

Disclaimer: this article is for general information only and is not tax or financial advice. Consult a qualified tax professional before making investment or tax decisions.

Who Benefits From This — and Who Does Not

Who this guide is most valuable for:

  • Taxable-account investors harvesting losses: Anyone selling at a loss in December to offset gains needs the 61-day window (30 days before and after) mapped across every account — and automatic dividend reinvestment switched off before the harvest.
  • Investors with automatic purchases: Dividend reinvestment, monthly 401(k) contributions into company stock and employee stock purchase plans all count as acquisitions — the classic silent trigger this guide dissects.
  • Investors using the three legal workarounds: Waiting 31 days, swapping into a similar-but-not-identical security (S&P 500 fund for a total-market fund), or doubling up and then selling — each keeps the deduction honest.
  • Anyone tracking a disallowed loss: In a taxable account the loss is deferred, not destroyed, via the Section 1091(d) basis adjustment — worth recovering on a later sale if you keep the records.

Who this does not apply to:

  • Crypto-only investors: Under current IRS guidance the rule covers stocks and securities while cryptocurrency is treated as property — though Congress has repeatedly proposed closing this gap, so check current law.
  • Buy-and-hold investors who never sell at a loss: Without a realized loss sale, the rule never triggers.
  • Anyone who already repurchased inside an IRA: Under IRS Revenue Ruling 2008-5 that loss is permanently disallowed — there is no after-the-fact fix, which is exactly why the IRA trap deserves a read before your next trade.

General information only, not tax or financial advice. Brokers do not always track wash sales across accounts correctly — consult a qualified tax professional before making investment or tax decisions.

Read also: tax-loss harvesting guide

FAQ

Does the wash sale rule apply to cryptocurrency?

Under current IRS guidance, no. The rule covers stocks and securities, while the IRS treats cryptocurrency as property. Congress has repeatedly proposed extending wash sale treatment to digital assets, so check current law before relying on this gap.

Does the rule apply across different brokerage accounts?

Yes. The IRS looks at all of your accounts together, including accounts at different firms, and your spouse's purchases within the window also trigger the rule. Splitting activity across brokers does not escape it.

Do mutual fund exchanges trigger wash sales?

Yes. Exchanging from one fund to another is a sale followed by a purchase. If you exchange out of a fund at a loss and back into the same fund within 30 days, that is a wash sale.

Can I still harvest losses in December?

Yes, but the calendar is unforgiving. A loss sale in late December is still washed out by a January repurchase within 30 days, and automatic dividend reinvestment counts as a purchase.

Who benefits most from this guide?

Taxable-account investors harvesting losses — especially in December — and anyone with automatic purchases across accounts: dividend reinvestment, 401(k) contributions into company stock, employee stock purchase plans, and even a spouse's purchases within the window. Also investors using the three legal workarounds (wait 31 days, buy similar-not-identical, or double up then sell).

Who does this not apply to?

Crypto-only investors for now — the IRS treats cryptocurrency as property, though Congress keeps proposing to extend the rule. Buy-and-hold investors who never realize losses never trigger it. And if you already repurchased the identical security inside an IRA, the loss is permanently gone; no workaround repairs that after the fact.

How do I get started?

Turn off automatic dividend reinvestment and map every account — including your spouse's — where the security might appear. Pick one of the three workarounds before you sell, and track disallowed amounts and adjusted cost basis yourself, because brokers often miss wash sales that span multiple accounts.

Watch on YouTube

Problem Solved on YouTube