If you sell a stock for a loss, the IRS allows you to use the loss to offset any gains on your income taxes, a common strategy that’s used to lower your overall income tax bill. One exception to this is what’s called the wash sale rule.

This happens if you buy a “substantially identical” stock within 30 calendar days before or after the date of sale (that’s a total of 61 days, as it includes 30 days before the date of sale, the date of sale and 30 days after the date of sale). If you buy or otherwise acquire a substantially identical stock within this 61-day, wash-sale period, the IRS won’t let you use the loss to offset gains.

Why are we talking about this on a website devoted to Traditional IRAs, which don’t incur taxes until you withdraw the money, generally at retirement? Because buying that substantially identical stock in your tax-sheltered IRA can still trigger a wash sale. And there are some other tax wrinkles that won’t make you happy either. Read on for the details.

A person holding a cell phone and lap top trading with the wash sale rule

Other Securities, Too

A wash sale rule can occur with other securities as well as stocks, including bonds, ETFs, mutual funds and options, which are considered substantially identical to their underlying stock. In general, if a security has a CUSIP number, it’s subject to the wash sale rule.

Here’s how the rule applies to IRAs: In 2008 the IRS issued Revenue Ruling 2008-5, which explained that if you sell shares in a non-retirement account (e.g. a brokerage, bank or mutual fund account) and buy substantially identical shares in your IRA within that 61-day period, you can’t claim tax losses for the sale.

Basis Basics

The IRS gives most investors a bit of a consolation prize when it comes to the wash sale rule: Even though you can’t use a loss to offset gains in a wash sale situation, you are allowed—in most cases—to add the loss to the cost of the securities you repurchase, thereby increasing your basis. This is advantageous because it reduces your capital gains if you decide to sell.

When it comes to IRAs, however, the IRS has a different, less advantageous rule. As already discussed, you won’t be able to claim any tax losses for a sale if it triggers the wash sale rule. But unlike with other securities, the basis in your IRA will not increase either. These rules cover both Traditional and Roth IRAs.

It’s the Investor, Not the Account

Keep in mind that the wash sale rule applies to the investor and not a particular account. That means if you sell stock ABC in one account and buy stock ABC in another account (IRA or otherwise), it will still trigger the wash sale rule if you do so within the 61-day period.

Because the rule applies to the investor and not the account, you might think, “Well, I’ll just have my spouse repurchase the shares.” The IRS, however, is on to this. Your tax loss will still be disallowed in a wash sale situation if your spouse is the purchaser. The same is true if your controlled corporation or IRA makes the buy.

Guidelines

Like most provisions of the tax code, the wash sale rule can be difficult to navigate. You can help ensure that you don’t break it by following some simple guidelines:

  • Make sure you and your spouse communicate about any trading in your portfolios so you don’t accidentally set each other up for a wash sale.
  • View all your investments as a single portfolio, so you can see the big picture and recognize when a wash sale might occur.
  • If possible, avoid that 61-day period for repurchasing securities, so you can avoid triggering wash sale reporting and can use the loss to offset gains.
  • When in doubt, consult with a qualified tax professional who can help you develop the most effective tax strategy.