Selling and Rebuying Stocks? Beware the Wash Sale Rule

The wash sale rule is important when you’re selling and rebuying stocks and don't want to have losses disallowed by the IRS.

up and down graph
(Image credit: Getty Images)

Everything from high inflation to steep stock market declines duirng the past year, has spurred some investors to reevaluate their market positions. Maybe you're in that boat—focusing on offsetting losses by selling and rebuying declining stocks. If so, you'll want to tread carefully. You might not want to have your losses disallowed by the IRS because of the wash sale rule.

What is the Wash Sale Rule?

To understand how to avoid the wash sale rule, as you evaluate some of the best stocks to buy or sell, and the various impacts of inflation, it helps to first know what a wash sale is. A wash sale occurs when you sell or trade a security at a loss, and then rebuy or acquire the same security within a short period of time.

Of course, losses can be valuable for some investors. This is partly because losses can be used to offset same year gains and potentially reduce capital gains taxes. Leftover losses can also be deducted from ordinary income (up to $3,000) or be carried over to the next tax year. That’s why selling securities at a loss to reduce taxable gains (i.e., tax loss harvesting) has become a popular tax strategy.

Subscribe to Kiplinger’s Personal Finance

Be a smarter, better informed investor.

Save up to 74%

Sign up for Kiplinger’s Free E-Newsletters

Profit and prosper with the best of expert advice on investing, taxes, retirement, personal finance and more - straight to your e-mail.

Profit and prosper with the best of expert advice - straight to your e-mail.

Sign up

But the IRS doesn’t want investors receiving tax breaks by offsetting gains with manufactured losses. So, if you quickly rebuy a stock after having sold that stock at a loss, or merely continue your investment in the stock because of the repurchase, the IRS’s stance is that you shouldn't be able to write off the initial loss on your taxes.

What does the wash sale rule say? Under the wash sale rule, you can’t deduct the loss from selling a declining stock when you’ve bought or otherwise acquired the same or a “substantially identical” stock 30 days before or 30 days after the initial sale.

Here’s an example. Imagine you purchased 50 shares of fictional JustaTissueBox stock at $100 per share and that stock declines to $80 per share. So, you sell your 50 shares at a $1,000 loss. However, two weeks after the sale, JustaTissueBox stock drops to $50 per share and you decide to buy 50 shares of the stock back for $2,500. Since the second purchase was a wash sale, you're not allowed to claim the initial $1,000 capital loss on your tax return for that year.

But violating the wash sale rule might not be all bad for some investors. That’s because when you have a wash sale, the disallowed capital loss is added to the cost basis of the replacement stock. So, when you eventually sell the replacement stock, any taxable gain is smaller, and any deductible loss is larger. Also, the holding period for the new stock now includes the holding period for the initial stock. Consequently, when you sell the new stock, the gain may be taxed at lower long term capital gains tax rates.

Is there a Crypto Wash Sale Rule?

The wash sale rule applies to most securities, including stocks and options, bonds, mutual funds, and exchange traded funds (EFTs). But the wash sale rule doesn't currently apply to cryptocurrency. This is in part because the IRS classifies crypto as property, not as a security. So, if you are selling crypto for a loss and immediately rebuying it, you'll still be able to claim the capital loss under current law.

This has created a so-called wash sale rule crypto loophole, where crypto investors are getting tax breaks for losses that sometimes are considered manufactured losses. Meanwhile, investors in stocks and other securities subject to the wash sale rule can’t claim similar losses—at least not in the same tax year as the securities were first sold.

Wash Sale Rule Options

To avoid having a loss disallowed by the IRS because of the wash sale rule, you have a couple of options. First, you can wait to rebuy the same or a substantially identical stock to the one you sold. However, don't forget that the wash sale rule kicks in 30 days before the sale of the asset and runs 30 days after the sale. So, you're working with the wash sale 61-day rule—a 61-day period where you need to avoid rebuying the same stock.

For some investors, waiting 61 days to rebuy stock or security isn’t ideal for whatever reasons. In those cases, another wash sale rule option is to buy or acquire a security that is not “substantially identical” to the security that was recently sold.

The challenge with this option is that the term “substantially identical” has not been defined by Congress or the IRS. So, what’s considered substantially identical for the wash sale rule will largely depend on the facts and circumstances of your transaction.

Wash Sale Rule Examples

IRS Publication 550 (opens in new tab) contains some wash sale rule examples to help determine whether your capital losses might be disallowed. For instance, the IRS says that stocks of one corporation typically aren't considered substantially identical to stocks of another corporation. But there could be situations–like a reorganization–where those corporate stocks could be substantially identical.

The IRS also notes that bonds and preferred stock of a corporation generally aren't substantially identical to the same corporation's common stock. However, if preferred stock can be converted to common stock, carries equivalent voting rights as common stock, or is subject to identical restrictions on dividends as common stock, it would be substantially identical.

What about your spouse’s stock purchases? The IRS says that a wash sale exists if your spouse or a corporation that you control purchases substantially identical stock within the wash sale rule 61-day period.

Wash Sale Tax Reporting

To report losses from wash sales, use IRS Form 8949 (opens in new tab) and Schedule D (opens in new tab). Form 8949 is used to reconcile the amounts that were reported to you on Forms 1099B or 1099S. Schedule D shows the overall gain or loss from the transactions reported on Form 8949.

If you are married and are filing jointly, you will need to complete as many copies of Form 8949 as needed to report all the transactions for both you and your spouse. The totals from all the Forms 8949 must be included on your Schedule D.

Overall, it’s important to know what the wash sale rule is and to understand the potential tax implications of tax loss harvesting. 

If you plan to sell and rebuy declining stocks, you may want to consult professionals well-versed in the relevant tax implications. It might also help to review IRS guidance in Publication 550

Taking those steps could shed light on which losses may be disallowed by the IRS because of the wash sale rule.

Yours free, New Tax Rules for 2023Download your free issue of The Kiplinger Tax Letter today.  No information is required from you.

Kelley R. Taylor
Tax Editor,

With more than 20 years' experience as an in-house legal counsel and business journalist, Kelley R. Taylor has contributed to numerous national print and digital magazines on key issues spanning education, law, health, finance, and tax. Kelley particularly enjoys translating complex information in ways that help empower people in their daily lives and work.