The wash sale rule primarily applies to losses, but it can also affect gains in certain circumstances. The rule is designed to prevent investors from using capital losses to manipulate their tax liabilities by creating artificial losses through the sale of securities at a loss and then repurchasing them within a short period. This strategy allows investors to claim the loss on their tax return, reducing their taxable income.
- Losses: If you sell a security at a loss and then buy the same or a substantially similar security within 30 days before or after the sale, the loss is disallowed for tax purposes12. The IRS adds the disallowed loss to the cost basis of the replacement security, which can affect the tax treatment of future sales.
- Gains: While the primary focus is on losses, if you engage in a wash sale, any gains from the subsequent sale of the replacement security are taxable57. This means that if you buy back the same security within the 30-day window after selling it at a loss, any gain on the subsequent sale is subject to capital gains tax.
- Frequency of Purchase: The wash sale rule applies not only to the initial sale but also to any subsequent purchases within the 30-day period. For example, if you sell a security at a loss and then buy it back, and then later sell some of the same security without selling the entire position, the wash sale rule still applies if you buy it back within the 30-day window25.
- Substantial Similarity: The rule considers securities to be "substantially identical" if they have the same or similar economic characteristics, such as the same issuer, terms, and risks35. This means that even if the security you buy is not exactly the same as the one you sold, if it is sufficiently similar, the rule may still apply.
In summary, the wash sale rule is not just about losses; it also affects gains if the conditions for a wash sale are met. The rule aims to prevent investors from using tax-loss harvesting as a mechanism to manipulate their tax liabilities by creating artificial losses or gains.