Understanding Wash Sale Rules Before You Trade
You just sold a stock at a loss and plan to use that loss to lower your tax bill. Before you buy those shares back, you need to understand how the IRS views your trade. If you repurchase that same stock too quickly, the government might cancel your tax deduction entirely. Understanding the specific timeframe restrictions of the wash sale rule is the easiest way to avoid unexpected tax bills.
What is the IRS Wash Sale Rule?
The IRS created the wash sale rule to prevent investors from creating artificial tax losses. In the past, an investor could sell a losing stock on December 31 to claim a massive tax deduction, and then buy the exact same stock back on January 1.
Under current tax law, if you sell a security at a loss and buy a “substantially identical” security within a specific timeframe, the IRS will not let you claim that loss on your current year taxes. Instead, your loss is disallowed and rolled into the cost basis of your new purchase. This rule applies to stocks, bonds, options, and mutual funds.
The 61-Day Window Explained
The biggest mistake new traders make is misunderstanding the timeframe. Most people think the rule only applies to the 30 days after they sell a stock. In reality, the IRS enforces a 61-day window. A wash sale is triggered if you buy replacement shares during any of the following periods:
- 30 days before the sale
- The exact day of the sale
- 30 days after the sale
For example, imagine you bought 100 shares of Apple (AAPL) in January. On October 15, the stock is down, and you decide to sell your shares at a loss. Your wash sale window stretches from September 15 to November 14. If you bought any additional shares of Apple on September 20, your October 15 loss is disallowed. You must wait until November 15 to buy Apple stock again if you want to claim the tax deduction for this calendar year.
What Counts as "Substantially Identical"?
The IRS uses the term “substantially identical” to define what triggers a wash sale, but they do not provide a massive list of exact scenarios. However, tax professionals generally agree on a few concrete guidelines.
If you sell shares of Microsoft (MSFT) and buy shares of Microsoft (MSFT) two weeks later, that is a wash sale. If you sell Microsoft shares and buy Microsoft call options, that also triggers the rule.
The rule becomes incredibly important for index fund investors who practice tax-loss harvesting. If you sell the SPDR S&P 500 ETF (SPY) at a loss, you cannot buy SPY back within 30 days. However, most tax advisors agree that you can buy the Vanguard S&P 500 ETF (VOO). Even though both funds track the exact same index, they are managed by different companies and have slightly different expense ratios. Swapping SPY for VOO allows you to keep your money in the market while safely claiming your tax loss.
How the Disallowed Loss Actually Works
A wash sale does not mean your tax loss is gone forever. The IRS simply forces you to defer the loss until you sell the new shares.
Here is how the math works in a real brokerage account. Let us say you buy 10 shares of Tesla (TSLA) at $250 per share. The price drops, and you sell them at $200 per share. You now have a $500 loss.
Twenty days later, Tesla is trading at $190, and you buy 10 shares. Because you bought within the 30-day post-sale window, you trigger a wash sale. You cannot deduct that $500 loss this year. Instead, the IRS requires you to add that $500 loss to the cost basis of your new shares. Your new shares cost $1,900, but your official tax basis is now $2,400. When you eventually sell those new shares years down the road, that adjusted basis will reduce your future tax burden.
The IRA Trap: A Permanent Loss
There is one specific scenario where a wash sale causes you to lose your tax deduction forever. This happens when you mix standard brokerage accounts with retirement accounts.
If you sell a stock at a loss in your standard Robinhood or Charles Schwab account, and then buy the same stock inside your Roth IRA within 30 days, you trigger a wash sale. The IRS will disallow the loss in your taxable account. Because IRAs are tax-advantaged accounts, you are legally not allowed to adjust your cost basis inside of them. The loss disappears completely, and you will never get to claim it.
How Brokerages Report Wash Sales
Major brokerages like Fidelity, E-Trade, and Vanguard track wash sales for you automatically. At the end of the year, they will send you a Form 1099-B for your taxes. If a trade triggered a wash sale, you will see a “W” printed in Box 1g of the form, and the disallowed loss amount will be listed.
You need to be careful if you use multiple brokers. Fidelity does not know what you are buying in your Webull account. If you sell at a loss on Fidelity and buy the same stock the next day on Webull, neither brokerage will flag it as a wash sale. However, the IRS still requires you to calculate this yourself and report it accurately on your Form 8949.
Frequently Asked Questions
Does the wash sale rule apply to cryptocurrencies? Currently, the IRS classifies cryptocurrencies like Bitcoin and Ethereum as property, not securities. Because of this classification, the wash sale rule does not currently apply to digital assets. You can sell Bitcoin at a loss and buy it back five minutes later while still claiming the tax deduction.
Can I avoid a wash sale by having my spouse buy the stock? No. The IRS treats married couples filing jointly as a single economic unit. If you sell a stock at a loss and your spouse buys the identical stock within the 61-day window in their own account, the IRS will classify it as a wash sale.
What if I close out my entire position by the end of the year? If you trigger a wash sale in October, but then sell all of your replacement shares in December and do not buy them back in January, you are clear. Because you completely exited the position and stayed out for 30 days, you can claim the full adjusted loss on your current year tax return.