Wash Sales
The 30-day rule, with examples.
A wash sale happens when you sell stock or securities at a loss and, within 30 days before or after the sale, you (or your spouse, or a corporation you control) buy substantially identical stock or securities, or a contract or option to buy them (IRC § 1091). That creates a 61-day window centered on the sale date.
The loss isn't lost forever. It is disallowed now and added to the basis of the replacement shares, and the holding period of the shares you sold is added to the replacement shares.
Example 1: the basic wash sale
| Date | Action | Amount |
|---|---|---|
| Jan 10 | Buy 100 shares at $50 | $5,000 |
| Nov 10 | Sell 100 shares at $40 | $4,000 (a $1,000 loss) |
| Nov 25 | Buy 100 shares at $42 (within 30 days) | $4,200 |
The $1,000 loss is disallowed. New basis = $4,200 + $1,000 = $5,200. The new shares are treated as held since Jan 10.
Later you sell them for $4,800: loss = $4,800 − $5,200 = $400. Overall you paid $9,200 and got back $8,800, an economic loss of $400, which is exactly what you end up deducting. The wash sale postponed the loss rather than eliminating it.
Example 2: a partial wash sale
You sell 100 shares at a $1,000 loss ($10 per share) and buy back only 40 shares within 30 days at $42 ($1,680). Only 40% of the loss is disallowed: $400 is added to the 40 new shares (basis $2,080). The other $600 is deductible now.
Example 3: buying before you sell counts too
You own 100 shares with a loss. On Dec 1 you buy another 100 shares, and on Dec 15 you sell the original 100 at a loss. The purchase was within 30 days before the sale, so it is a wash sale.
The IRA trap
If you sell at a loss in a taxable account and buy the same stock in your IRA or Roth IRA within the window, the IRS treats it as a wash sale. Under Revenue Ruling 2008-5, the loss is disallowed and your basis in the IRA does not increase, so the loss is permanently lost.
What your broker does and doesn't catch
Brokers must report wash sales on Form 1099-B (box 1g) only when the sale and the purchase are of securities with the same CUSIP number in the same account (Treas. Reg. § 1.6045-1 and the 1099-B instructions). The law itself is broader. You must track and report wash sales yourself that involve:
- purchases in another account, including a spouse's account or an IRA;
- purchases at another broker;
- substantially identical securities with different CUSIPs, or options.
Report these on Form 8949 with adjustment code W.
What is "substantially identical"?
There is no bright-line test. Shares of the same company's common stock are identical. Stock of a different company is generally not. Pub. 550 discusses bonds, preferred stock and convertible securities. Two index funds tracking the same index from different issuers are a frequently debated gray area with no definitive IRS guidance.
Frequently asked questions
Do wash sales apply to gains?
No. The rule only disallows losses. A sale at a gain followed by a repurchase is taxed normally.
Does a wash sale carry across year-end?
Yes. A December loss sale followed by a January repurchase within 30 days is a wash sale, and the loss moves into the basis of the January shares.
Do wash sale rules apply to crypto?
IRC § 1091 applies to stock and securities. The rules for digital assets depend on how the asset is classified; check current IRS guidance.
Sources
- 26 U.S.C. § 1091: Loss from wash sales of stock or securities
- IRS Publication 550: Investment Income and Expenses (basis of investment property, wash sales, nondividend distributions)
- IRS Revenue Ruling 2008-5 (wash sale when replacement shares are bought in an IRA), Internal Revenue Bulletin 2008-3 (PDF)
- IRS: Instructions for Form 1099-B (covered securities, boxes 1e, 1g, 5 and 12)
- IRS: Instructions for Form 8949 (reporting sales, basis adjustments and codes)
- Treas. Reg. § 1.6045-1: Returns of information of brokers (covered security definitions and dates)
Last reviewed: November 2026