Tax Guides

Wash Sale Rule: Complete Guide 2026

Updated 2026-03-10

Data Notice: Figures, rates, and statistics cited in this article are based on the most recent available data at time of writing and may reflect projections or prior-year figures. Always verify current numbers with official sources before making financial, medical, or educational decisions.

Wash Sale Rule: Complete Guide 2026

Tax information is for educational purposes only and does not constitute tax advice. Consult a licensed tax professional for your specific situation.

The wash sale rule is one of the most important yet misunderstood provisions in the tax code for investors. It prevents taxpayers from claiming a tax loss on a security if they purchase a substantially identical security within ~30 days before or after the sale. Understanding this rule is essential for anyone engaged in tax-loss harvesting or active portfolio management.

This guide explains how the wash sale rule works, what triggers it, how it affects your tax basis, and strategies for working within the rule’s boundaries.


What Is the Wash Sale Rule?

The wash sale rule, found in Internal Revenue Code Section ~1091, disallows the deduction of a loss on the sale of a security if you acquire a substantially identical security within a ~61-day window: ~30 days before and ~30 days after the sale date.

Key ParameterDetail
Window before sale~30 calendar days
Window after sale~30 calendar days
Total window~61 calendar days
Applies toStocks, bonds, options, mutual funds, ETFs
Does not apply toGains (only affects losses)
Disallowed loss treatmentAdded to cost basis of replacement security

The rule exists to prevent taxpayers from selling a security at a loss solely for the tax benefit while effectively maintaining the same investment position.


How the Wash Sale Rule Works

Triggering a Wash Sale

A wash sale is triggered when you:

  1. Sell a security at a loss
  2. Purchase a substantially identical security within ~30 days before or ~30 days after the sale

The ~30-day period is measured in calendar days, not trading days. Weekends and holidays count.

What Happens to the Disallowed Loss

When a wash sale occurs, the disallowed loss is not permanently lost. Instead, it is added to the cost basis of the replacement security. This means you will eventually realize the loss when you sell the replacement security (assuming you do not trigger another wash sale).

Example Calculation

  • You buy ~100 shares of Stock A for ~$10,000
  • Stock A declines and you sell all ~100 shares for ~$7,000, generating a ~$3,000 loss
  • Within ~30 days, you buy ~100 shares of Stock A for ~$7,500
  • The ~$3,000 loss is disallowed under the wash sale rule
  • Your new cost basis in the replacement shares is ~$7,500 + ~$3,000 = ~$10,500
  • Your holding period for the replacement shares includes the holding period of the original shares

What Counts as “Substantially Identical”

The IRS has not provided a precise definition of “substantially identical,” which creates gray areas. Here is what is generally understood:

ScenarioSubstantially Identical?
Same stock (e.g., sell and rebuy AAPL)Yes
Same mutual fundYes
S&P 500 index fund from different providersLikely yes
Similar but different index (S&P 500 vs. Total Market)Generally no
Stock vs. option on same stockYes
Convertible bond of same companyPossibly
Stock of similar companies in same sectorGenerally no
Crypto (same coin sold and repurchased)Currently no (proposed legislation may change this)

The safest approach is to assume that any security tracking the same index or representing the same company is substantially identical.


Wash Sale Rule and Different Account Types

Across Accounts

The wash sale rule applies across all your accounts. If you sell a stock at a loss in your taxable brokerage account and buy the same stock in your IRA within ~30 days, a wash sale is triggered. This is a particularly dangerous scenario because the loss is permanently disallowed when the repurchase occurs in a tax-advantaged account, since you cannot adjust the basis in an IRA.

Spousal Accounts

The IRS has indicated that wash sale rules can apply between spouses’ accounts as well. If you sell a stock at a loss and your spouse buys the same stock within the ~30-day window, the loss may be disallowed.

Across Brokerages

The rule applies regardless of which brokerage holds the accounts. Selling at one broker and buying at another does not avoid the wash sale rule.


Comparison: Wash Sale Strategies

StrategyWash Sale RiskTax Benefit Preserved?
Wait ~31 days to repurchaseNo riskYes
Buy similar but not identical fundLow riskYes
Sell in taxable, buy in IRAHigh risk (loss permanently lost)No
Double up then sell originalDepends on timingPartially
Harvest loss in December, wait until FebruaryNo risk if ~31+ daysYes

Tips for Navigating the Wash Sale Rule

  1. Use the ~31-day waiting period. The simplest way to avoid a wash sale is to wait at least ~31 days before repurchasing the same or substantially identical security. Mark your calendar after any loss-harvesting transaction.

  2. Substitute with a similar but not identical fund. Instead of waiting, you can immediately purchase a fund that tracks a different index. For example, sell an S&P 500 fund at a loss and buy a total stock market fund. This maintains market exposure while avoiding the wash sale rule.

  3. Never repurchase in an IRA. Buying a substantially identical security in an IRA within the wash sale window permanently eliminates the loss. There is no basis adjustment in tax-advantaged accounts. This is the most costly wash sale mistake.

  4. Track across all accounts. Monitor purchases across taxable accounts, IRAs, Roth IRAs, and even your spouse’s accounts. Automated investment programs (like dividend reinvestment) can inadvertently trigger wash sales.

  5. Watch for automatic reinvestments. If you have dividend reinvestment (DRIP) enabled, a reinvestment within the ~30-day window can trigger a wash sale. Consider temporarily suspending DRIP around loss-harvesting transactions.

  6. Use specific lot identification. When selling partial positions, use specific lot identification rather than FIFO to control which shares you sell and the resulting gain or loss. This gives you more precision in tax-loss harvesting.

  7. Keep detailed records. Document every loss-harvesting transaction, including dates, amounts, and the securities involved. Your broker reports wash sales on Form 1099-B, but cross-account wash sales may not be automatically flagged.


Key Takeaways

  • The wash sale rule disallows tax losses on securities sold and repurchased within a ~61-day window (~30 days before and after the sale).
  • Disallowed losses are added to the cost basis of the replacement security, deferring (not eliminating) the tax benefit unless the repurchase is in an IRA.
  • The rule applies across all accounts, including IRAs, spousal accounts, and different brokerages.
  • Buying in a tax-advantaged account within the wash sale window permanently eliminates the loss, making this the most costly mistake.
  • Substituting with a similar but not substantially identical security is a safe strategy to maintain market exposure while harvesting losses.
  • Automated programs like DRIP can inadvertently trigger wash sales and should be monitored carefully during loss-harvesting periods.

Next Steps