investing Audience: general 5 min read

The Wash Sale Rule Explained: The Investor's Speed Trap

Trying to harvest a tax loss? Be careful. Buying back the same stock within 30 days will permanently kill your deduction.

Tax loss harvesting is great. But the IRS is not stupid. They know you want to sell a loser to get the tax break, but you still want to own the stock. So they created the Wash Sale Rule.

Key Takeaways

  • The Rule: If you sell for a loss and buy a 'substantially identical' security within 30 days (before or after), the loss is disallowed.
  • The Consequence: The loss is added to the cost basis of the new shares (deferred), not deducted now.
  • Crypto Loophole? As of early 2026, crypto is still treated as property, so wash sale rules *might* not strictly apply, but legislation is pending. Tread carefully.
  • ETFs are the workaround. Selling Coke and buying Pepsi is fine. Selling VOO and buying SPY is... grey.

How the 30 Day Wash Sale Rule Works

The wash sale window spans 61 days total: 30 days before the sale, the sale date itself, and 30 days after. If you purchase a substantially identical security anywhere inside that window, the loss is disallowed.

  • Jan 1: Buy Tesla at $1,000.
  • Feb 1: Tesla drops to $800.
  • Feb 2: Sell Tesla. (Loss: $200).
  • Feb 15: Buy Tesla back at $810.
  • Result: That $200 loss on Feb 2 is GONE. You cannot deduct it.
  • New Basis: Your new Tesla shares have a basis of $810 + $200 = $1,010. You only get the benefit when you sell the new shares.

The loss is not lost forever---it is deferred into your new cost basis. But that can mean waiting months or years for the tax benefit, and the timing advantage of harvesting is gone.

The “Substantially Identical” Trap

What if you sell Vanguard S&P 500 (VOO) and buy iShares S&P 500 (IVV)? They track the exact same index. Most conservative CPAs say this is a wash sale. Better Strategy: Sell VOO (S&P 500) and buy VTI (Total Stock Market). They are highly correlated (99%) but track different indices. This is generally considered safe.

For a more automated approach, direct indexing lets you own individual stocks instead of ETFs, making it easier to harvest losses without triggering wash sales on substantially identical securities.

Wash Sale Crypto: The Grey Area

As of early 2026, the IRS treats cryptocurrency as property, not a security. The wash sale rule under IRC Section 1091 technically applies to “stock or securities.” This has led some investors to harvest crypto losses aggressively---selling Bitcoin at a loss and immediately rebuying.

However, legislation has been proposed to close this gap, and some brokers already report crypto wash sales. Do not count on this loophole lasting forever. For more on crypto-specific tax rules, see our crypto tax guide.

Avoiding Wash Sales When Tax Loss Harvesting

Understanding the wash sale rule is essential for successful tax loss harvesting. Here are the best practices:

  1. Wait 31 days. The simplest approach. Sell, wait, then rebuy.
  2. Buy a similar but not identical fund. Swap S&P 500 for Total Stock Market, or swap a single-stock for a sector ETF.
  3. Use a systematic tax loss harvesting strategy. Pre-plan replacement securities so you stay invested while staying compliant. See our full tax loss harvesting guide for a step-by-step walkthrough.
  4. Watch across accounts. Wash sales apply across all your accounts (IRA, brokerage, spouse’s accounts). Buying in your IRA within 30 days of selling in your brokerage still triggers the rule. This is especially dangerous with taxable vs tax-advantaged accounts --- a wash sale into an IRA permanently destroys the loss since you can never realize a capital loss inside an IRA.
  5. Mind year-end timing. If you are harvesting losses in December as part of your year-end tax checklist, remember the 30-day window extends into January of the next year. Automatic dividend reinvestment plans (DRIPs) can also trigger a wash sale, so pause reinvestment around harvesting dates.

For a broader look at how capital gains vs ordinary income taxation works, including how harvested losses offset each type, see our guide. And once you understand the basics, our capital gains tax strategies guide covers additional tactics to minimize investment taxes.

The wash sale rule does not have to derail your tax loss harvesting. Don’t get caught speeding --- wait 31 days or use a different fund.

How sharper.tax Helps

sharper.tax analyzes your uploaded return to identify realized capital gains and losses across your accounts. We flag tax loss harvesting opportunities while helping you understand wash sale risk so you can harvest losses confidently. Sophisticated tax planning used to require a high-end CPA --- we make it available for free.

Sources


The information above is educational and not tax advice.