You don’t have a wash sale unless the shares you bought “replace” the shares you sold.
In general, the wash sale rule prevents you from reporting a loss on the sale of stock if you acquired substantially identical stock on the same day as the sale, or within 30 days before or after that day. But the wash sale rule doesn’t apply if the stock you bought wasn’t replacement stock.
This rule is best understood through a series of examples. In all of these examples, assume that there are no purchases or sales of stock other than those described.
1: Selling All
On June 1 you buy 200 shares of XYZ for $10,000. On June 12 you sell all 200 shares for $8,000 (a loss of $2,000).
Most people wouldn’t even think about applying the wash sale rule here. You know instinctively it shouldn’t apply, even though there’s a purchase of identical stock less than 31 days before the sale. Your instincts are correct: the wash sale rule doesn’t apply because the stock you bought isn’t replacement stock for the stock you sold. That’s true because you sold the same stock you bought.
2: Selling Half
On June 1 you buy 200 shares of XYZ for $10,000. On June 12 you sell 100 shares for $4,000 (a loss of $1,000). You continue to hold the other 100 shares.
The answer here is a little less obvious. After the sale, you hold shares identical to the shares you sold, and you bought those shares less than 31 days before the sale. But you probably still feel that the wash sale rule shouldn’t apply here. And the IRS agrees, in the situation where you bought the 200 shares in a single lot. Furthermore, although the IRS doesn’t say this, the result shouldn’t change if you gave a single buy order for 200 and your broker happened to execute it by buying two lots of 100 shares each. It’s clear the shares you have left after the sale weren’t bought to replace the shares you sold.
3: Separate Purchases
You buy 100 shares of XYZ in the morning, and decide to buy another 100 shares in the afternoon of the same day. Within 30 days, you sell the morning shares at a loss.
For all we know, the price of this stock dropped between morning and afternoon, and your afternoon purchase is for the purpose of claiming a loss while maintaining your investment. In other words, you may have been trying to get the result the wash sale rule is designed to prevent. So the IRS will probably contend that the wash sale rule applies in this situation.
The result should be different, though, if you gave a single buy order for 200 and your broker happened to execute it by buying two lots of 100 shares each. In this case it’s clear the shares you have left after the sale weren’t bought to replace the shares you sold.
4: Old Shares
You have held 100 shares of XYZ for more than 30 days. You buy an additional 100 shares for $5,000. Less than 31 days later, you sell these shares (the new ones) for $4,000 (a $1,000 loss). You continue to hold the old shares.
There are no rulings that mention this situation. But the requirement for replacement stock should prevent the wash sale rule from applying here. The older shares shouldn’t be considered replacement shares for the newer ones.
Note that you have to use specific identification to sell the newer shares. Unless you follow this procedure, the tax law assumes you sold the older shares. If you have a loss on those shares, the wash sale rule applies.
5: Not So Old Shares
Same as the previous example, except the “old” shares aren’t as old. You bought the old shares on June 1, the new shares on June 10, and sold the new shares at a loss on June 20.
Once again, you had to use specific identification to sell the new shares. The question is, do you have a wash sale here because of the fact that you bought the old shares less than 31 days before you sold the new ones?
As a matter of logic, it’s clear that the answer should be no. The old shares can’t possibly be replacement shares for the newer ones. You bought them before you bought the shares you sold, so they should be ignored in applying the wash sale rule.
Unfortunately, in a ruling dealing with an unrelated point, the IRS gave an example like the one above, and said the wash sale rule applied. The ruling was designed to establish that shares bought on margin are subject to the wash sale rule. It’s possible that the person who drafted the ruling simply didn’t think about the fact that the shares in that example weren’t replacement shares.
My feeling is that the wash sale rule should never apply if the “replacement” shares were bought at the same time as, or earlier than, the shares that were sold. There isn’t any opportunity for abusive tax planning in this situation. But the issue is in doubt because the IRS has issued a ruling that, in my opinion, is erroneous.