Understanding Wash Sale Rules: Avoid This Tax Loss Harvesting Mistake

Tax loss harvesting is one of the most effective strategies for investors looking to lower their tax bill. By selling investments that have lost value, you can offset capital gains and potentially deduct up to $3,000 against your ordinary income. However, the IRS has strict regulations to prevent investors from gaming the system. This regulation is known as the “wash sale rule.” If you trigger it, your tax benefit disappears immediately.

What Is the Wash Sale Rule?

The IRS defines a wash sale as a transaction where you sell a security at a loss and then purchase a “substantially identical” security within 30 days before or 30 days after the sale.

This creates a 61-day window that you must watch closely:

  1. The day you sell the stock.
  2. The 30 days prior to the sale.
  3. The 30 days following the sale.

If you buy the same stock, or one that is nearly identical, within this timeframe, the IRS disallows your loss deduction. Instead of claiming the loss on your current year’s taxes, that loss is added to the cost basis of the new shares you purchased. This effectively defers your tax break until you sell the new shares later.

Defining "Substantially Identical"

The term “substantially identical” causes the most confusion for investors. The IRS does not provide a precise list of pairs that are forbidden, but previous rulings and general consensus among tax professionals offer clear guidelines.

Individual Stocks

If you sell shares of Apple (AAPL) at a loss and buy Apple shares again within the 30-day window, that is a clear wash sale.

However, selling Apple and buying Microsoft (MSFT) is generally acceptable. Even though both are large-cap technology companies, they are different corporations with different management and risks. They are not substantially identical.

ETFs and Mutual Funds

This area is trickier. If you sell the Vanguard S&P 500 ETF (VOO) and buy the iShares Core S&P 500 ETF (IVV) immediately, you might trigger a wash sale. Both funds track the exact same index (the S&P 500).

To avoid this, many investors use a strategy called “proxy switching.” This involves replacing an asset with one that is similar but tracks a different index.

Specific Examples of Safer Swaps:

  • Sell: Vanguard S&P 500 ETF (VOO)
  • Buy: Vanguard Total Stock Market ETF (VTI)

In this scenario, VOO tracks only 500 companies, while VTI tracks the entire U.S. stock market. Their performance is highly correlated, but the underlying assets are different enough to likely avoid the wash sale rule.

A Concrete Example of the Math

To understand the financial impact, let’s look at a hypothetical scenario involving Tesla (TSLA).

  1. Initial Buy: You purchase 10 shares of TSLA at $250 per share. Total cost: $2,500.
  2. The Drop: The price drops to $200. You sell all 10 shares for $2,000.
  3. The Loss: You have a realized capital loss of $500.
  4. The Mistake: Two weeks later (within the 30-day window), you see TSLA rally slightly and buy 10 shares back at $210.

The Consequence: Because you bought the shares back within 30 days, your $500 loss is disallowed. You cannot deduct it this year.

Instead, the $500 loss is added to the cost basis of your new shares.

  • Cost of new shares: $2,100 ($210 x 10)
  • Plus disallowed loss: $500
  • New Adjusted Cost Basis: $2,600

You now own shares that cost you $2,100 out of pocket, but for tax purposes, the IRS views your cost basis as $2,600. You won’t realize the benefit of that old loss until you sell these new shares.

Important Nuances to Remember

The Rule Applies Across Accounts

You cannot outsmart the IRS by selling a stock in your taxable brokerage account (like E*TRADE or Robinhood) and buying it back in your IRA or 401(k) the next day. The wash sale rule applies to the investor, not the specific account.

In fact, triggering a wash sale in an IRA is even worse. If you sell at a loss in a taxable account and buy back in an IRA, the loss is permanently disallowed. You cannot add the loss to the cost basis of the IRA assets.

Spousal Accounts

The rule also applies to your spouse. If you sell Amazon (AMZN) at a loss and your spouse buys Amazon in their account within the 30-day window, it counts as a wash sale if you file a joint tax return.

Dividend Reinvestment Plans (DRIPs)

Be careful with automatic dividend reinvestment. If you sell a stock at a loss, but a dividend payment occurs within 30 days and automatically buys more shares, that tiny purchase can trigger a partial wash sale.

Strategies to Avoid Penalties

If you are holding a losing position and want to capture the tax benefit without leaving the market entirely, consider these specific strategies:

  1. Wait 31 Days: The simplest method is to sell the loss, keep the cash in a money market fund, and wait 31 days before repurchasing the same asset. The risk here is that the market might rebound while you are sitting in cash.
  2. Double Up: If you have the capital and confidence in the stock, buy a new position in the stock now. Wait 31 days, then sell the original lot (the one with the loss). This ensures you are never out of the market, though it increases your exposure for that month.
  3. Use Robo-Advisors: Platforms like Betterment, Wealthfront, and Schwab Intelligent Portfolios have built-in tax-loss harvesting features. Their algorithms automatically scan for losses and swap into similar (but not identical) funds to preserve your market exposure while harvesting the loss.

Frequently Asked Questions

Does the wash sale rule apply to cryptocurrency? Currently, the wash sale rule applies to “securities.” As of the 2023 and 2024 tax years, the IRS classifies cryptocurrency as property, not a security. This means the wash sale rule does not strictly apply to crypto assets like Bitcoin or Ethereum. However, tax laws are subject to change, and legislation has been proposed to close this loophole. Always verify the latest status with a CPA.

What happens if I trigger a wash sale by accident? It is not a crime, and you do not pay a fine. You simply lose the ability to claim the tax deduction for the current tax year. You must adjust your records to reflect the higher cost basis on the new shares.

Can I sell a stock and buy an option on that stock? No. The IRS rules state that acquiring a contract or option to buy substantially identical stock also triggers the wash sale rule. If you sell Apple stock at a loss and immediately buy Apple call options, the loss is disallowed.

Does this apply to gains? No. The wash sale rule only applies to losses. If you sell a stock for a profit and buy it back immediately, you simply owe taxes on the gain. The IRS never prevents you from paying them more taxes.