Wash sale

In finance, a wash sale is the sale of a security at a loss, and the subsequent repurchase of the same or a "substantially identical" security within a short period thereafter, as a means of locking in a loss for tax purposes.

Such a sale itself is not prohibited by United States law, but under the Internal Revenue Code, if the same or a "substantially identical" security is purchased within 30 days either before or after the sale, the loss cannot be deducted from taxable income. This includes the day of the sale.

As an example, if a security is bought on July 1, but was previously sold at a loss from June 1 through June 30, the prior sale will be considered a wash sale. Similarly, if a security is sold on July 1, then purchased from July 2 through July 31, the July 1 sale will be considered a wash sale.

Generally a wash sale is avoided by waiting 31 days before repurchase (or waiting 31 days after purchasing the same security before selling the other holding).

The IRS has never officially defined what constitutes a "substantially identical" security. Though this isn't an issue when related to most stocks (even two in the same industry, such as Boeing and Lockheed Martin), it can pose an issue when dealing with exchange-traded funds (funds that track a market index such as the S&P 500), such as selling shares in an S&P 500 fund offered by one firm but then purchasing shares in a similar fund offered by a different firm.