What is the wash-sale rule?
If you sell stock or securities at a loss and buy the same thing, or something substantially identical, shortly before or after, the loss doesn't count for now. The rule is there to stop people from claiming a tax loss while staying invested. The loss isn't gone: it's added to the basis of the new shares, so it comes back when you sell those.
Sources
Authority, strongest first
- Code I.R.C. § 1091
- Final regulation Treas. Reg. § 1.1091-1
- Publication IRS Publication 550 (2025)
1091(a) disallows the
section 165 deduction for a loss on stock or securities where substantially identical stock or securities were acquired (or a contract or option to acquire them was entered into) within the period running
30 days either side of the sale. 1091(d) adjusts the basis of the replacement shares. The rule disallows losses only; gains are unaffected.
How long is the wash-sale window?
30 days before the sale through 30 days after it, so the sale date plus 30 days on each side. A purchase on either side of the loss sale counts, which is the part people forget: buying first and then selling the old shares at a loss is also a wash sale.
Sources
What counts as 'substantially identical'?
The same stock is, and so are options or contracts on it. Stock of a different company usually isn't. Beyond that it's a facts-and-circumstances call. Pub. 550 says bonds or preferred stock of a company aren't ordinarily identical to its common stock, but can be if they're convertible and trade closely together. Two different funds that track the same index are a gray area we don't settle here.
Sources
Authority, strongest first
- Code I.R.C. § 1091
- Final regulation Treas. Reg. § 1.1091-1
- Publication IRS Publication 550 (2025)
Pub. 550 (Substantially identical): all facts and circumstances; stock of one corporation is not ordinarily substantially identical to stock of another; preferred stock convertible into common is when it is convertible, has the same voting rights and dividend restrictions, trades at prices that do not vary significantly from the conversion ratio, and is unrestricted as to convertibility. We found no authority in the sources read that decides funds tracking the same index.
What happens to a loss that's disallowed?
It's added to the basis of the replacement shares, and your holding period for the new shares includes the time you held the old ones. In effect the loss is postponed until you sell the replacement shares without triggering another wash sale. If the replacement is in an IRA, though, it isn't saved anywhere.
Sources
Authority, strongest first
- Code I.R.C. § 1091
- Code I.R.C. § 1223
- Final regulation Treas. Reg. § 1.1223-1(d)
- Publication IRS Publication 550 (2025)
1091(d) adjusts basis by the difference between the replacement price and the sale price of the old stock (which, with the old basis, amounts to adding the disallowed loss). 1223(3) and Reg. 1.1223-1(d) tack the old holding period onto the new stock.
What if I buy back fewer shares than I sold?
Only part of the loss is disallowed: the part that matches the number of shares you bought back. Shares are matched in the order they were bought. If you sold 100 shares and bought back 50, half the loss is disallowed and half is allowed. The numbers add up on Form 8949, one row per lot.
Sources
Authority, strongest first
- Code I.R.C. § 1091
- Final regulation Treas. Reg. § 1.1091-1
- Publication IRS Publication 550 (2025)
1091(b) and (c) send the matching to regulations; Reg. 1.1091-1(c) matches acquired shares in order of acquisition with an equal number of shares sold, and (d) does the reverse when at least as many shares are acquired. Pub. 550's two examples show the arithmetic.
Does a purchase in my IRA count?
Yes. The IRS has said that if you sell at a loss and your IRA or Roth IRA buys the same stock within the window, the loss is disallowed. And unlike a taxable account, your IRA's basis doesn't go up, so the loss is permanently lost. That's the most expensive wash sale, and, on our reading (Rev. Rul. 2008-5 addresses an IRA purchase you cause), an automatic IRA contribution or reinvestment can cause it too, without your noticing.
Sources
Authority, strongest first
- Code I.R.C. § 1091
- Revenue ruling Rev. Rul. 2008-5, 2008-3 I.R.B. 271
- Publication IRS Publication 550 (2025)
Rev. Rul. 2008-5 holds that the loss is disallowed under 1091 and that the IRA's basis is not increased under 1091(d). Pub. 550 lists 'acquire substantially identical stock for your individual retirement arrangement (IRA) or Roth IRA' as a wash sale, and excludes it from the basis addition. The ruling does not address
section 4975.
Does my spouse's purchase count?
The IRS says yes. Pub. 550 states that if you sell stock and your spouse (or a corporation you control) buys substantially identical stock, you also have a wash sale, and the loss is added to the cost of the new stock. That is the IRS's position, and the law is less settled than it is for an IRA:
section 1091 refers to what 'the taxpayer' acquires, and we found no court decision or ruling that decides a spouse's purchase. The cautious approach is to treat both spouses' accounts as one pool when you plan a loss sale.
Sources
Authority, strongest first
- Code I.R.C. § 1091
- Revenue ruling Rev. Rul. 2008-5, 2008-3 I.R.B. 271
- Publication IRS Publication 550 (2025)
Pub. 550 (Wash Sales) is the only source we found for the spouse and controlled-corporation rule, and a publication is not authority.
Section 1091(a) disallows the loss when 'the taxpayer' has acquired substantially identical stock. Rev. Rul. 2008-5 is about an IRA and rests on the taxpayer's actual command over the purchase (it relies on Security First National Bank of Los Angeles, 28 B.T.A. 289 (1933)); it does not mention spouses. Commentary we read reports that older decisions did not apply the wash sale rule to a separate taxpayer's purchase unless the seller controlled it; we did not read those cases. McWilliams v. Commissioner, 331 U.S. 694 (1947), disallowed a coordinated spouse swap under the family-sales loss rule (the predecessor of
section 267), not under the wash sale provision, so it is not authority for this point. Status: unsettled; our working assumption follows Pub. 550.
Will my broker catch a wash sale?
Only a narrow kind. A broker has to apply the rule when the sale and the purchase are in the same account and are the same security (same CUSIP number). It doesn't have to catch purchases in your other accounts, your IRA, your spouse's account or at another firm. Form 1099-B box 1g shows what the broker caught; the rest is up to you.
Sources
Authority, strongest first
- Code I.R.C. § 6045
- Final regulation Treas. Reg. § 1.6045-1
- Form instructions Instructions for Form 1099-B (2026)
6045(g)(2)(B)(ii): basis is determined without regard to
section 1091 unless the transactions occur in the same account with respect to identical securities. Form 1099-B instructions: box 1g is required only for covered securities with the same CUSIP number in the same account. A broker may report other disallowed losses but need not.
Do options, short sales and reinvested dividends count?
Buying a call option or entering a contract to buy the same stock counts like buying the stock. Short sales have their own version of the rule. Reinvesting a dividend is a purchase of shares, so in our reading a reinvestment inside the window can create a partial wash sale; many people are surprised by that one, and so are some funds' statements.
Sources
Authority, strongest first
- Code I.R.C. § 1091
- Final regulation Treas. Reg. § 1.1091-1
- Publication IRS Publication 550 (2025)
1091(a) covers contracts or options to acquire stock or securities and 1091(e) closing short sales; Reg. 1.1091-1(f): 'acquired' includes entering into a contract or option to acquire by purchase. That a dividend reinvestment is a purchase for this purpose is our reading; we did not find authority addressing it directly. Pub. 550 lists warrants and options.
Is there an exception for traders and dealers?
There's one for dealers in stock or securities, for losses in the ordinary course of that business, and the regulation extends a similar exception to a non-corporate taxpayer's sale made in connection with a trade or business. Ordinary investors, including people who trade often, don't get the exception just by trading a lot. Who counts as a trader or dealer is a separate topic we don't cover.
Sources
Authority, strongest first
- Code I.R.C. § 1091
- Final regulation Treas. Reg. § 1.1091-1
- Publication IRS Publication 550 (2025)
1091(a) excepts a dealer's loss in a transaction in the ordinary course of business; Reg. 1.1091-1(a) adds the exception for a non-corporate taxpayer where the sale is made in connection with the taxpayer's trade or business. Pub. 550: 'The wash sale rules do not apply to a dealer in stock or securities if the loss is from a transaction made in the ordinary course of business.'