Wash Sale Rule
The wash sale rule is an Internal Revenue Service regulation that disallows a capital loss deduction if you sell a security at a loss and then repurchase the same or a “substantially identical” security within 30 days before or after the sale. The rule exists to prevent investors from claiming a tax loss without genuinely exiting the investment. If you breach it, the disallowed loss is added to the cost basis of the replacement purchase, deferring the tax benefit rather than erasing it.
The rule in plain language
You own 100 shares of XYZ Corp, purchased at $50 per share. The stock falls to $30. You sell it at a $2,000 loss and claim that loss against your capital gains for the year, reducing your tax bill. But then, on day 15 after the sale, you decide the decline is overdone and you buy 100 shares of XYZ back at $32. The IRS disallows the $2,000 loss you claimed.
Why? Because from the IRS’s perspective, you have not genuinely exited the investment. You sold and bought back essentially the same position within a tight window. You obtained a tax benefit (the deduction) without accepting the economic consequence (staying out of the investment). The wash sale rule blocks this arbitrage.
The disallowed loss—$2,000 in the example—does not vanish. Instead, it is added to the cost basis of your new 100 shares. You bought them at $32, but for tax purposes, your cost basis is now $34 per share ($3,200 purchase price plus $2,000 disallowed loss, divided by 100 shares). When you eventually sell these shares, the disallowed loss will reduce your reportable gain (or increase your loss), deferring the tax benefit to that future sale.
Why the rule exists
Without the wash sale rule, investors could game their taxes by harvesting losses whenever convenient, then immediately re-entering the position. An investor who owns a stock at a loss late in the year could sell it on 29 December, claim the loss against other gains, and buy it back on 2 January, remaining invested throughout. The economic exposure is unchanged, but the tax deduction is claimed with no cost.
The wash sale rule forces a genuine choice: if you want to claim a capital loss, you must be willing to exit the investment for at least 30 days. This prevents the loss-claiming benefit from being wholly decoupled from the economic reality of the trade.
Defining “substantially identical”
A critical ambiguity is what qualifies as “substantially identical.” The IRS does not require the new purchase to be a different company, but it cannot be the same security. Buying 100 shares of XYZ after selling 100 shares of XYZ triggers the rule. But does buying XYZ’s call option? Does buying an ETF that holds XYZ?
The IRS guidance is stricter than many investors expect. Buying a call option (even far out-of-the-money) on the same stock can trigger the rule if held across the wash-sale window. Buying an index ETF that includes the same stock, if the ETF is substantially similar in holdings, might also trigger it—though this is litigated and depends on circumstances.
The safest approach: if you sell a stock at a loss within the wash-sale window, do not repurchase that same stock. If you want to maintain market exposure, buy a different company in the same sector, or a different security class (e.g., bonds instead of equity). This clearly avoids the rule.
The 30-day window
The window spans 61 calendar days: 30 days before the sale, the sale date itself, and 30 days after. If you sell on June 15, the window begins May 16 and ends July 15. Any purchase of the same or substantially identical security during this entire period triggers the rule.
This is easy to miscount. Many investors think “30 days after” means exactly 30 days, forgetting the 30 days before. A purchase on day 31 after the sale is safe; a purchase on day 31 before the sale is not.
How brokers track and report wash sales
Most brokers automatically flag wash sales in their records and adjust your cost basis accordingly. When you file your taxes, the broker reports your sales on Form 8949 and Schedule D, with wash-sale adjustments already reflected in your stated gains or losses. The IRS also receives the same report, so misreporting is easily caught.
If you sell through one broker and buy through another, the wash-sale tracking may not be automatic, and you must flag it yourself on your tax return. This is a common source of errors.
Deferral, not elimination
It is crucial to understand that the wash sale rule defers the tax benefit; it does not eliminate it. If you have a $2,000 disallowed loss added to your cost basis, you will eventually claim that $2,000 when you sell the new shares—either as a reduced gain or an increased loss. The deduction is postponed, not lost, unless you hold the security until death (in which case the step-up in cost basis wipes out the tax liability entirely, but this is a different rule).
From a purely financial perspective, deferral is usually unfavourable because you lose the time value of the immediate deduction. But for investors in volatile positions, avoiding wash-sale traps entirely is often easier than trying to optimize the timing of a deferred loss.
Common scenarios and how to avoid them
Scenario 1: Selling at a loss and rebuying the same stock. Avoid: wait 31 days after the sale before repurchasing, or buy a different stock in the same industry.
Scenario 2: Selling a stock at a loss and buying a call or put on that stock. Avoid: wait 31 days, or do not buy any derivative on the same underlying.
Scenario 3: Dollar-cost averaging into a position while selling part of it at a loss. If you sell shares at a loss and continue buying the same stock within the window, the wash-sale rule applies to the loss, and those new purchases increase your average cost basis. Pause contributions until outside the window.
Scenario 4: Selling one fund at a loss and buying a “similar” fund. Investor judgment on “similar” often differs from the IRS’s. Two index funds tracking the S&P 500 are substantially identical; one tracking the S&P 500 and another tracking total-market equities are borderline. To be safe, wait 31 days.
See also
Closely related
- Capital Gains Tax (Investor) — the income tax applied to security sales; losses offset gains
- Cost Basis — the tax foundation for measuring gains and losses; adjusted by wash-sale rules
- Form 8949 — the IRS form reporting security sales and wash-sale adjustments
- Schedule D — the tax return schedule summarising capital gains and losses
Wider context
- Tax Loss Harvesting — the investment strategy the wash-sale rule constrains
- Marginal Tax Rate (Investor) — determines the economic value of a loss deduction
- Tax Bracket (Investor) — context for evaluating tax-management strategies