Wash Sale Rule
In short
IRS rule: no tax loss if you rebuy the same security within 30 days
If you sell a stock at a loss and buy it back within 30 days (before or after), the IRS disallows the loss. This prevents you from harvesting losses while staying invested. To avoid it, buy a similar but different stock.
The wash sale rule disallows a tax loss if you purchase substantially identical securities within 30 days before or after the sale. The disallowed loss is added to the basis of the replacement shares. Applies to stocks, ETFs, and options on the same security.
Related concepts
- Tax-Loss Harvesting — If you're up $10,000 on Apple but down $3,000 on another stock, you can sell the loser to offset $3,000 of your Apple gains. You only pay tax on $7,000 instead of $10,000. The IRS lets you use losses to cancel gains.
- Replacement Securities — After selling a stock at a loss for tax purposes, you can't buy it back for 31 days (wash sale rule). Instead, buy something similar — like selling SPY and buying IVV (both track the S&P 500) — so you stay invested while harvesting the loss.
- Cost Basis — If you buy 10 shares at $100 each, your cost basis is $1,000. When you sell for $1,500, you're taxed on the $500 gain, not the full $1,500. The cost basis is your starting point for tax calculations.
- Short-Term Capital Gains — If you buy a stock and sell it within a year for a profit, the IRS taxes that gain at your regular income tax rate (up to 37%). That's much higher than the 15-20% rate for stocks held longer than a year.