Wash Sale Rule
An IRS rule that disallows a capital loss deduction if you buy a substantially identical security within 30 days before or after the sale. The disallowed loss is added to the cost basis of the new shares.
The wash sale rule prevents taxpayers from claiming a tax deduction on a loss if they purchase a substantially identical security within 30 days before or after the sale. The rule applies to stocks, bonds, mutual funds, ETFs, and options. Its purpose is to prevent investors from selling at a loss for the tax benefit while immediately repurchasing the same investment.
The 30-day window runs in both directions — 30 days before and 30 days after the sale — creating a 61-day total wash sale window. "Substantially identical" is broadly interpreted: buying the same stock, a contract to acquire the same stock, or a very similar mutual fund can trigger the rule.
When a wash sale occurs, the disallowed loss is not permanently lost. Instead, it is added to the cost basis of the replacement shares. This means you will eventually recognize the loss when you sell those replacement shares (assuming you do not trigger another wash sale). The holding period of the original shares also transfers to the new shares. Your brokerage reports wash sales on Form 1099-B.
How it works
The wash sale rule disallows a loss deduction when you sell a security at a loss and buy a substantially identical one within the 61-day window surrounding the sale — 30 days before and 30 days after. It applies across stocks, bonds, mutual funds, ETFs, and options, and it is not limited to your own brokerage account; buying the same security in a spouse's account or an IRA can also trigger it. The rule exists to stop investors from harvesting a tax loss while never actually leaving the position.
You encounter this on your 1099-B, where brokers are required to track and flag wash sales within the same account and same CUSIP, adjusting the reported loss accordingly. If a wash sale spans two different brokerages, or spans December into January, the brokers involved will not catch it for you, so you need to track it yourself before you file Schedule D and Form 8949. Tax-loss harvesting strategies near year-end are where this rule most often comes into play deliberately.
The disallowed loss is not gone — it is added to the cost basis of the replacement shares, and the original holding period carries over too, so you eventually recover the loss when you sell the new shares for good. A common mistake is assuming a merely similar fund avoids the rule; the IRS standard is substantially identical, and swapping between two S&P 500 index funds from different providers is a common gray area some investors avoid by switching asset classes entirely. Dividend reinvestment can also accidentally trigger a wash sale if it happens within the window after a loss sale.
Example: a wash sale on a reinvested dividend
You sell 50 shares of a stock for a $1,000 loss on December 20. On December 28, a dividend reinvestment plan automatically buys 2 more shares of the same stock in your account — inside the 30-day window after the sale.
Because the purchase is substantially identical stock within the window, the loss attributable to those 2 replacement shares is disallowed for the current year. Instead, it is added to the cost basis of the 2 new shares, so you recover it later when you eventually sell them.
Frequently asked questions
Does the wash sale rule apply if I buy back in my IRA?
How long do I have to wait to buy back a stock I sold at a loss?
Does the wash sale rule apply to cryptocurrency?
Related Terms
Capital Gains
The profit from selling a capital asset (stocks, real estate, etc.) for more than its purchase price. Capital gains are classified as short-term or long-term based on holding period.
Cost Basis
The original purchase price of an asset (plus adjustments like commissions and reinvested dividends), used to calculate capital gain or loss when you sell.
Short-Term Capital Gains
Profits from selling assets held for one year or less, taxed at ordinary income tax rates (10% to 37%). There is no preferential rate for short-term gains.