Can You Sell a Stock for a Loss and Buy It Back in an IRA?
Learn how repurchasing a stock in an IRA after a taxable loss has unique tax consequences that can affect your ability to claim that deduction.
Learn how repurchasing a stock in an IRA after a taxable loss has unique tax consequences that can affect your ability to claim that deduction.
Selling underperforming stocks to generate capital losses is a strategy known as tax-loss harvesting. This can be an effective way to offset capital gains from more successful investments and potentially lower an annual tax bill. However, the Internal Revenue Service (IRS) has established specific regulations to govern how and when these losses can be claimed for tax purposes.
The primary regulation for tax-loss harvesting is the wash sale rule, found in Section 1091 of the Internal Revenue Code. This rule prevents an investor from claiming a tax loss from selling a security if they acquire a substantially identical one within a specific timeframe. The purpose of the rule is to stop taxpayers from gaining a tax benefit when their economic position has not meaningfully changed.
The rule operates within a 61-day period, which includes the 30 days before the sale, the day of the sale, and the 30 days after the sale. For example, if an investor sells a stock at a loss on April 30, the wash sale window is from April 1 to May 30. Purchasing a substantially identical security within this period triggers the rule and disallows the initial loss for tax purposes.
The rule applies to “substantially identical” securities. While the IRS does not provide an exhaustive definition, the common stock of a company and a call option for that same company’s stock are considered substantially identical. Conversely, the stock of two different companies, even in the same industry, is not. This distinction allows an investor to sell a losing stock and reinvest in a different company in the same sector without triggering the rule.
When a wash sale occurs between two taxable brokerage accounts, the consequence is a deferral, not a permanent loss. The disallowed loss is added to the cost basis of the new shares. For instance, if you sell a stock for a $1,000 loss and buy it back within the window for $5,000, your new cost basis becomes $6,000. This adjustment means the tax benefit is realized when the new shares are eventually sold.
The consequences of a wash sale are more severe when an Individual Retirement Account (IRA) is involved. While the 61-day window and definition of substantially identical securities remain the same, triggering the rule by repurchasing shares in an IRA results in a permanent disallowance of the loss.
According to IRS Revenue Ruling 2008-5, if you sell a security for a loss in a taxable account and purchase a substantially identical one in your traditional or Roth IRA within the 61-day window, the loss is disallowed completely. Unlike a wash sale between taxable accounts, this results in the permanent forfeiture of the tax loss.
The reason for this outcome is the tax structure of an IRA. Assets held within an IRA do not have a cost basis for tax purposes in the same way they do in a taxable account. Because there is no mechanism to adjust the cost basis of the shares purchased inside the IRA, the disallowed loss from the taxable account cannot be added to the new position.
For example, an investor who sells a stock in their brokerage account for a $2,000 loss and buys it back a week later in their Roth IRA cannot use that loss to offset capital gains on their tax return. The loss cannot be added to the basis of the shares in the Roth IRA and is permanently forfeited.
One compliant strategy is to simply wait. An investor can sell a security at a loss and wait at least 31 days before repurchasing the same security in any account, including an IRA. This places the repurchase outside the 61-day window, ensuring the wash sale rule does not apply and the tax loss is preserved.
Another strategy is to purchase a different, though perhaps similar, investment. An investor can sell a stock and immediately use the proceeds to buy a security that is not “substantially identical.” For example, one could sell shares of a specific technology company and purchase a broad-market technology sector ETF. This allows the investor to maintain exposure to the sector while still harvesting the loss.
The wash sale rule also extends to spouses. An individual cannot sell a security at a loss in their taxable account while their spouse buys a substantially identical security within the 61-day window, regardless of the account type. For tax purposes, the IRS often views the household as a single economic unit, meaning such transactions between spouses will trigger the wash sale rule.