Selling losing investments to offset capital gains can be a great way to lower your tax bill. But be careful you don’t violate the Internal Revenue Service’s “wash sale” rule.
As an investor, any time you sell a stock, bond or other holding at a profit, you realize a capital gain—and you may end up having to pay tax on that gain. However, Uncle Sam only taxes you on your net capital gains for each calendar year. And any losses you record during the year can be used to offset your gains.
For that reason, each year, plenty of investors actively seek out underwater securities to sell—either temporarily or for good—in a strategy known as tax-loss harvesting. While the IRS recognizes this strategy as legitimate, there are strict rules you need to follow. The most important of these is the wash-sale rule.
The idea of the wash-sale rule is to prevent investors from creating paper losses by selling an underwater security and immediately repurchasing it—in a transaction that’s nothing more than “a wash.”
As a result, if you sell an investment and want to claim a capital loss, you cannot buy it back—or buy something else very similar—for at least 30 days. “The IRS doesn’t want you to manipulate your portfolio to cheat on taxes,” says Sander Read, chief executive officer of Lyons Wealth Management in Winter Park, Fla.
Here’s how the wash-sale rule works and how you can avoid violating it.
What is the wash-sale rule?
The wash-sale rule requires that investors who want to claim a capital loss from selling an investment refrain from buying that same asset, or a “substantially identical” one, within a 30-day period.
That 30-day stipulation applies to both the period before and after you sell a security at a loss, meaning you need to be mindful of your trading activity for a total of 61 days.
The wash rule applies to the same types of assets that are eligible for tax-loss harvesting, including stocks, bonds, exchange-traded funds and mutual funds, as well as futures and options contracts.
Selling an asset in a taxable brokerage account, then repurchasing it, or a similar asset in a retirement account like a Roth or traditional IRA can trigger the wash-sale rule. So can selling an asset and buying a contract or option to buy a substantially identical security. “Steer clear of coming back to that investment in any of your accounts until that 30-day window has passed,” advises Jonathan Lee, a St. Louis-based senior portfolio manager at U.S. Bank.
If you sell an investment at a loss and it’s deemed a wash sale, then you won’t be able to deduct the amount of your losses from your capital gains nor from ordinary income. While there’s no penalty associated with a wash sale, you will lose the tax benefits you’d probably had in mind when you sold in the first place.
One silver lining: If you do have a wash sale, your cost basis—or how much you originally paid for the investment—will be adjusted. That’s because your loss is added to the cost basis of the new investment, which increases your cost basis. The upshot is that when you eventually go to sell the investment your capital gain—and the potential tax you owe—will be correspondingly smaller.
Beware wash sales when tax-loss harvesting
Investors typically run up on the wash sale with a strategy known as tax-loss harvesting, a popular strategy for reducing your federal tax bill, in which you sell an investment at loss to offset capital gains.
It’s especially important to beware of the specific rules related to wash sales if you take a hands-on approach to tax-harvesting. That’s because routine actions you have set up for your account, like reinvesting dividends, could unintentionally trigger a wash sale. If you use an automated service, like a robo-advisor, the company typically has measures in place to prevent wash sales and maximize tax-loss harvesting opportunities, presuming you opt in.
An increasingly popular investment strategy, known as direct indexing, is another way to cope with the complexity of tax-loss harvesting and the wash rule. This automated strategy allows you to mimic the performance of a major market benchmark, like the S&P 500, by buying all of the stocks in the index and then automatically identifying tax-loss harvesting opportunities—that don’t violate the wash-sale rule. “Direct indexing has definitely become a big trend in the industry,” says Derek Pszenny, co-founder of Carolina Wealth Management in Pinehurst, N.C.
The IRS taxes you on capital gains for the calendar year, much like other income you earn. Tax-loss harvesting activity picks up near year-end as many people start thinking about their tax bills that will be due come April and what investments have been losers for the year that they could sell to offset capital gains elsewhere in their portfolio, Read notes.
While capital gains are considered on a calendar year basis, the wash sale covers a 30-day period, irrespective of the year. So if you sell an asset in mid-December, you still need to wait the requisite period before buying it again in January.
Finally, it’s important to be vigilant if you have multiple financial advisors who are tax-loss harvesting on your behalf, cautions Pszenny. “It’s really important to do one of two things: Either have a coordinated effort between your advisors…or have all of your taxable money done by one advisor.”
What triggers the wash-sale rule?
How does tax-loss harvesting work in practice if you want to successfully avoid a wash sale? Here are the specific rules you need to know.
Substantially identical securities
The IRS specifies that the wash sale applies to selling and buying the same security, or one that’s “substantially identical,” within a 30-day period.
But what counts as substantially identical isn’t black and white. Despite offering lengthy descriptions of substantially identical securities, the IRS leaves many of the specifics up to interpretation. “The IRS is not very clear on what substantially identical means,” says Eric Bond, founder and president of Bond Wealth Management in Long Beach, C.A. “It’s kind-of vague.”
The IRS notes that stocks or securities of two different companies aren’t generally considered substantially identical, though there may be cases that they are—such as in the event of a merger or acquisition. What’s more, bonds or preferred stock aren’t typically considered substantially identical to the common stock of the same corporation, though they may be if they’re convertible into common stock.
While buying and selling two ETFs that track the same underlying index is generally believed to constitute a wash sale violation, the IRS doesn’t explicitly say so. Rather, it advises investors to “consider all the facts and circ*mstances” when determining substantially identical assets.
That said, there are some workarounds for avoiding the wash sale while staying fully invested in the market.
For example, you can sell a mutual fund and buy a similar ETF, Read notes. Swapping out one index fund for another—say, a fund that tracks the S&P 500 and one that tracks the total U.S. stock market—is generally regarded as permissible, though given the ambiguity of the IRS rules a “better safe than sorry” approach is advisable, Lee adds. “You certainly don’t want to buy anything identical, at least as perceived by the IRS.”
30-day rule
There’s far less nuance in interpreting the 30-day period the IRS stipulates as part of the wash-sale rule: To avoid triggering a wash sale, you must wait at least 30 days between buying and selling the asset in question.
Note that you need to beware of your trading activity both leading up to and following the sale in question, which extends the blackout period for repurchasing that same asset—or a substantially identical one—to a 61-day period in total. That means if you sell an investment at a loss on Nov. 1, you can’t buy it anytime between Oct. two and Dec. 1.
If you automatically reinvest dividends, you should be mindful of the months when that typically occurs, because you could unwittingly trigger the wash-sale rule with this activity. “If you sell the asset and your intention is to capture the loss, and you buy it within 30 days, you are not going to be able to report that loss,” Lee says. “Therefore, you will not have executed the tax planning or maybe the tax impacts that you wanted to.”
What securities are covered by the wash-sale rule?
The wash-sale rule generally applies to those securities for which you can realize a capital gain and loss, including:
- Stocks
- Bonds
- Mutual funds
- ETFs
- Commodities
- Futures and options contracts
It’s also important to note that the wash sale applies to short sales—which flips the typical buy-first-sell-later dynamic on its head. With short sales, traders sell a security they don’t own and borrow the security, then buy the security to close out the transaction. The wash sale rule applies to a loss incurred on a short sale with the same 30-day restriction to trading activity.
Cryptocurrency
The wash sale doesn’t currently apply to cryptocurrency, and that’s because the IRS classifies digital assets as property. That could change, however, as two senators have introduced legislation that would, in part, subject digital assets to the wash-sale rule.
How to avoid a wash sale
The most obvious way to avoid a wash sale is by adhering to the IRS rules. Although some of the specifics about what constitutes a substantially identical security may be vague, you can simply wait the requisite 61-day period surrounding your sale date to repurchase again.
While you can only do tax-loss harvesting in a taxable brokerage account, your trading activity across account types could trigger a wash sale. That’s why working with an advisor or coordinating efforts between advisors can help you avoid a wash sale violation, Pszenny says.
There are the workarounds mentioned above that will allow you to stay fully invested in the market while still avoiding a wash sule, which include swapping out a mutual fund for an ETF or an index fund for one that tracks a different benchmark. Because the IRS is vague in its rules, however, experts suggest taking a conservative approach.
Automated strategies, including investing with a robo-advisor or direct indexing, are also popular ways to harvest losses for tax benefits—and without violating the wash-sale rule.
Got a money question? Let Buy Side find the answer.Email[emailprotected].
Include your full name and location, and we may publish your response.
More about taxes
- What Are Tax Advantaged Accounts
- Who Has to Make Estimated Tax Payments
- Best Tax Software
Meet the contributor
Anna-Louise Jackson
Anna-Louise Jackson is a contributor to Buy Side from WSJ.