Understanding the "Wash Sale" Rule to Avoid Penalties
Investors often sell underperforming stocks to offset capital gains tax, a strategy known as tax-loss harvesting. However, the IRS has strict regulations in place to prevent traders from abusing this benefit. If you are not careful, you might trigger a “wash sale,” which disallows your tax deduction and complicates your accounting. Understanding the specific timing and definitions of this rule is essential for protecting your portfolio’s tax efficiency.
What Is the Wash Sale Rule?
The wash sale rule is defined in Section 1091 of the Internal Revenue Code. It states that you cannot claim a loss on the sale of a security if you purchase that same security, or a “substantially identical” one, within a 30-day window before or after the sale.
The IRS designed this rule to prevent investors from selling a stock simply to claim a tax deduction while maintaining their position in the asset.
If you trigger a wash sale, your loss is not technically eliminated, but it is deferred. The disallowed loss is added to the cost basis of the new stock you purchased. This means you will not receive the tax benefit until you sell the new stock and stay out of the position for more than 30 days.
The 61-Day Window Explained
Many traders mistakenly believe the rule only applies to buying a stock after selling it. In reality, the wash sale window covers a total of 61 days:
- 30 days before the sale date.
- The day of the sale.
- 30 days after the sale date.
For example, imagine you sell shares of Apple (AAPL) for a loss on October 15. If you bought AAPL shares at any point between September 15 and November 14, the loss on your October 15 sale is subject to the wash sale rule.
A Concrete Example: Trading Tesla (TSLA)
To understand the financial impact, let’s look at a mathematical example involving Tesla stock.
- Original Purchase: You buy 100 shares of TSLA at $250 per share. Total cost: $25,000.
- The Sale: The market dips, and you sell all 100 shares at $200 per share on June 1. You realize a loss of $5,000.
- The Mistake: On June 10 (within the 30-day window), you see TSLA rallying and buy back 100 shares at $210.
The Consequence: You cannot deduct the $5,000 loss on your tax return for that year. Instead, that $5,000 is added to the cost basis of your new shares.
- Price paid for new shares: $21,000 ($210/share).
- Plus disallowed loss: $5,000.
- New Cost Basis: $26,000 (or $260 per share).
You will only realize the tax benefit of that loss when you finally sell the new shares, provided you do not repurchase them again within 30 days.
What Counts as "Substantially Identical"?
The IRS forbids buying “substantially identical” securities, but they do not provide an exhaustive list of what fits this description. Here is how brokerage firms and tax professionals generally interpret it:
- Common Stock: Buying the exact same stock (same CUSIP number) is definitely a wash sale.
- Options: Buying call options on a stock you just sold for a loss can trigger the rule, especially if the options are deep-in-the-money.
- Different Accounts: The rule applies to you as a taxpayer, not just a specific account. Selling a stock in your E*TRADE account and buying it back in your Robinhood account triggers the rule.
The ETF Gray Area
Exchange Traded Funds (ETFs) present a unique opportunity. While you cannot sell the SPDR S&P 500 ETF (SPY) and immediately buy the Vanguard S&P 500 ETF (VOO) without risking a wash sale (since they track the exact same index), you can usually switch to a fund with a different index.
For instance, selling an S&P 500 ETF and buying a Total Stock Market ETF (like VTI) is widely considered acceptable because the underlying assets and indices are different, even if the performance is correlated.
The Dangerous IRA Pitfall
There is one scenario where a wash sale turns into a permanent financial loss.
If you sell a stock for a loss in a taxable brokerage account and repurchase the same stock in a tax-advantaged account (like a Roth IRA or traditional IRA) within the window, the loss is disallowed entirely.
In a normal taxable account, the loss attaches to the new shares’ cost basis. However, because you cannot transfer cost basis into an IRA, the loss simply vanishes. You lose the money on the trade and you lose the ability to ever claim the tax deduction. This is based on IRS Revenue Ruling 2008-5.
Strategies to Avoid the Wash Sale
You can navigate around this rule while still managing your portfolio effectively.
- Wait 31 Days: The simplest method is patience. After selling for a loss, wait a full 31 days before repurchasing that specific company.
- Buy a Competitor: If you want to maintain exposure to a sector, buy a different company in the same industry. For example, if you sell Home Depot (HD) for a loss, you could buy Lowe’s (LOW). They often move in tandem, but they are clearly different companies, so the wash sale rule does not apply.
- Use Robo-Advisors: Platforms like Betterment, Wealthfront, and Schwab Intelligent Portfolios have automated tax-loss harvesting features. Their algorithms are programmed to sell losing positions and move funds into correlated (but not identical) assets to preserve your market exposure while harvesting the tax loss.
Frequently Asked Questions
Does the wash sale rule apply to cryptocurrency? Currently, the IRS treats cryptocurrency as property rather than a security. As of early 2024, the wash sale rule does not strictly apply to crypto trades (like Bitcoin or Ethereum). This allows traders to sell crypto for a loss and buy it back immediately. However, legislation has been proposed to close this loophole, so traders should monitor tax law changes closely.
Will my broker notify me of a wash sale? Yes. If the wash sale occurs within the same brokerage account, your broker is required to track it. You will see a specific code (usually code “W”) on your Consolidated Form 1099-B at the end of the year. However, brokers do not track trades across different institutions (e.g., selling at Fidelity and buying at Vanguard). You are responsible for reporting those accurately.
Does the rule 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 capital gain. The IRS does not restrict you from paying them taxes sooner.