The wash sale rule disallows a tax deduction for a security sold at a loss if a substantially identical security is purchased within 30 days before or after the sale.
Loss Disallowed if: Same/similar security bought within T-30 to T+30 days of loss sale
You sell 100 shares of AAPL at a $500 loss on March 1. If you buy AAPL again before March 31, the $500 loss is disallowed for tax purposes (but added to the cost basis of the new shares).
Wash sales apply across your entire portfolio — including your spouse's account and your IRA. Selling AAPL at a loss in your brokerage and buying it in your IRA within 30 days disallows the loss.
"Substantially identical" is broader than most investors think. Selling an S&P 500 ETF at a loss and buying a different S&P 500 ETF (e.g., SPY to VOO) may trigger a wash sale because both track the same index.
The 30-day window runs both directions — 30 days before AND after the loss sale. If you bought shares on March 1 and sell at a loss on March 20, the March 1 purchase already triggered a wash sale retroactively.
AllInvestView detects and flags wash sales automatically in your tax reports. Learn strategies to avoid them in our tax-loss harvesting guide.