Wash-Sale Rule

What Is the Wash-Sale Rule?

The wash-sale rule is an Internal Revenue Service (IRS) regulation that prevents a taxpayer from taking a tax deduction for a security sold in a wash sale. The rule defines a wash sale as one that occurs when an individual sells or trades a security at a loss and, within 30 days before or after this sale, buys a "substantially identical" stock or security, or acquires a contract or option to do so.

A wash sale also results if an individual sells a security, and the individual's spouse or a company controlled by the individual buys a substantially equivalent security.

Key Takeaways

  • A wash sale occurs when an investor sells or trades a security at a loss, and within 30 days before or after, buys another one that is substantially similar.
  • It also happens if the individual sells the security at a loss, and their spouse or a company they control buys a substantially similar security within 30 days.
  • The wash-sale rule prevents taxpayers from deducting a capital loss on the sale against the capital gain.

Wash Sale Rule

Understanding the Wash-Sale Rule

The intent of the wash-sale rule is to prevent taxpayers from claiming artificial losses. Conversely, if a taxpayer were to register a gain by selling securities, and within 30 days they were to buy identical replacement securities, the proceeds from that transaction would still be taxable. The sale of options (which are quantified in the same ways as stocks) at a loss and reacquisition of identical options in the 30-day timeframe would also fall under the terms of the wash-sale rule. So the wash-sale period is actually 61 days, consisting of the 30 days before to 30 days after the date of sale.

According to "Revenue Ruling 2008-5," IRA transactions can also trigger the wash-sale rule. When shares are sold in a non-retirement account and substantially identical shares are purchased in an IRA within 30 days, the investor cannot claim tax losses for the sale, and the basis in the individual's IRA is not increased.

One way to reduce taxes through capital losses is through tax-loss harvesting. This involves selling one security at a loss and simultaneously buying a similar security. Often done with ETFs, those engaging in this practice must be careful not to break the wash-sale rule.

Wash-Sale Rule Example

For example, you buy 100 shares of XYZ tech stock on November 1 for $10,000. On December 15, the value of the 100 shares has declined to $7,000, so you sell the entire position to realize a capital loss of $3,000 for tax deduction purposes.

On December 27 of the same year, you repurchase the 100 shares of XYZ tech stock back again to reestablish your position in the stock.

The initial loss will be not be allowed to be counted as a tax loss since the security was repurchased within the limited time interval.

The intent of the wash-sale rule is to prevent investors from abusing the tax benefits from wash sales.

What Constitutes a Wash Sale?

Stocks or securities of one company are generally not considered substantially identical by the IRS to those of another. As well, the bonds and preferred stock of a company are also ordinarily not considered substantially identical to the company’s common stock. However, there are circumstances in which preferred stock, for example, could be considered substantially identical to the common stock. This would be the case if the preferred stock is convertible into common stock without any restriction, has the same voting rights as the common stock, and trades at a price close to the conversion ratio.

If the loss is disallowed by the IRS because of the wash-sale rule, the taxpayer has to add the loss to the cost of the new stock, which becomes the cost basis for the new stock.


For example, consider the case of an investor who purchased 100 shares of Microsoft for $33, sold the shares at $30, and within 30 days bought 100 shares at $32. In this case, while the loss of $300 would be disallowed by the IRS because of the wash-sale rule, it can be added to the $3,200 cost of the new purchase. The new cost basis, therefore, becomes $3,500 for the 100 shares that were purchased the second time, or $35 per share.

Staying in the Market During the Wait

However, there are some simple techniques that you can use to keep yourself in the market until the wash-sale period has expired. Using the fictional-company example above, if you sold your 100 shares of XYZ tech stock on December 15, you could purchase a tech exchange-traded fund (ETF) or tech mutual fund to retain a similar position in the technology sector, although this strategy does not entirely replicate the initial position.

When the 30-day period has passed, sell the fund or ETF and then repurchase your XYZ stock if you so desire. Of course, the initial stocks can be repurchased prior to the end of the 30 day period, but the tax deductions will not be realized.

What Is the Purpose of the Wash-Sale Rule?

As its name implies, the Wash-Sale Rule is an IRS rule pertaining to so-called “wash sales”. These types of transactions are those in which the trader sells a security in order to realize a tax-deductible loss, only to purchase a substantially identical security shortly thereafter. From the perspective of the IRS, these types of wash sales are attempts to circumvent or manipulate the tax laws. The wash-sale rule seeks to eliminate this loophole by making it impossible for traders to claim tax deductions on these types of transactions.

How Can I Avoid Violating the Wash-Sale Rule?

The Wash-Sale Rule states that, if an investment is sold at a loss and then repurchased within 30 days, the initial loss cannot be claimed for tax purposes. In order to comply with the Wash-Sale Rule, investors must therefore wait at least 31 days before repurchasing the same investment. Importantly, investors must note that, even if the securities they repurchase are not identical to the ones which they sold, they might be deemed to be “substantially identical” if the two securities are sufficiently similar. When in doubt, investors wishing to comply with the Wash-Sale Rule should consult with an appropriate tax adviser or other qualified professional.

How Do I know If a Security Is “Substantially Identical”?

Unfortunately, the IRS does not provide specific guidance on how to know whether a particular security is “substantially identical” to another. Therefore, investors must rely on their own judgment and the advice of professionals. In some cases, the answer can be obvious: selling shares in one company and then buying that same company’s shares within 30 days of the sale would naturally violate the Wash-Sale Rule. On the other hand, other transactions can be less clear, such as when the investor buys and sells different classes of stock from the same issuing corporation, or when they sell common shares but repurchase preferred shares.

Article Sources
Investopedia requires writers to use primary sources to support their work. These include white papers, government data, original reporting, and interviews with industry experts. We also reference original research from other reputable publishers where appropriate. You can learn more about the standards we follow in producing accurate, unbiased content in our editorial policy.
  1. Internal Revenue Service. "Publication 550: Investment Income and Expenses," Page 56. Accessed Feb. 17, 2022.

  2. Internal Revenue Service. "Publication 550: Investment Income and Expenses," Page 56-57. Accessed Feb. 17, 2022.

  3. Internal Revenue Service. "Rev. Rul. 2008-5," Pages 1-4. Accessed Feb. 17, 2022.

Take the Next Step to Invest
The offers that appear in this table are from partnerships from which Investopedia receives compensation. This compensation may impact how and where listings appear. Investopedia does not include all offers available in the marketplace.