Advertisement

The Wash Sale Rule: How It Works and How to Avoid a Disallowed Loss

Selling an investment at a loss can lower your tax bill, because capital losses offset capital gains and up to $3,000 of ordinary income each year. But the tax code does not let you sell a stock to claim a loss and then immediately buy it right back as if nothing happened. The wash sale rule blocks that move. Understanding exactly what the rule covers lets you harvest losses confidently and avoid an unpleasant correction from your broker or the IRS.

What the rule says

Under Section 1091 of the Internal Revenue Code, a wash sale occurs when you sell or trade stock or securities at a loss and, within 30 days before or after the sale, you:

Advertisement
  1. Buy substantially identical stock or securities,
  2. Acquire substantially identical stock or securities in a fully taxable trade,
  3. Acquire a contract or option to buy substantially identical stock or securities, or
  4. Acquire substantially identical stock for your individual retirement account or Roth IRA.

The rule also applies if your spouse buys substantially identical securities within the window, or a corporation you control does so.

Because the window runs 30 days on either side of the sale date plus the sale date itself, it covers a total of 61 days. Buying shares 20 days before selling other shares at a loss can trigger it just as easily as buying 20 days after.

What happens to the disallowed loss

A wash sale does not erase the loss permanently in most cases. Instead:

Advertisement
  • The loss is disallowed for the current year.
  • The disallowed amount is added to the cost basis of the replacement shares.
  • The holding period of the original shares carries over to the replacement shares.

An example

You buy 100 shares of a company at $50, for a basis of $5,000. The price falls and you sell all 100 shares at $40, a $1,000 loss. Fifteen days later you buy 100 shares at $42. The $1,000 loss is disallowed, and your basis in the new shares becomes $4,200 plus $1,000, or $5,200. If you later sell the new shares for $48 each, you would report a $400 loss rather than a $600 gain. The loss was deferred, not lost.

Partial wash sales

If you buy back fewer shares than you sold, only a proportional part of the loss is disallowed. Sell 100 shares at a loss and buy back 40 within the window, and 40% of the loss is disallowed and added to the basis of the 40 new shares. The remaining 60% is allowed.

When the loss is lost permanently

The serious trap involves retirement accounts. If you sell shares at a loss in a taxable account and buy the same security in your IRA or Roth IRA within the window, the IRS has ruled, in Revenue Ruling 2008-5, that the loss is disallowed and you get no basis increase in the IRA, because IRAs do not track basis that way. The loss effectively disappears. Automatic dividend reinvestment or scheduled contributions in an IRA can trigger this without you noticing.

What counts as substantially identical

The IRS has not published a precise definition, and the answer depends on facts and circumstances. General guidance:

  • The same stock is substantially identical. Buying back the same company’s common shares triggers the rule.
  • Options and contracts to buy the same stock can trigger it.
  • Bonds and preferred stock of the same issuer are generally not substantially identical to common stock unless they are convertible and trade similarly.
  • Stock of a different company in the same industry is generally not substantially identical. Selling one automaker and buying another is a common harvesting approach.
  • Mutual funds and ETFs raise the hardest questions. Funds from different companies tracking different indexes are widely considered not substantially identical, while two share classes of the same fund almost certainly are. Funds from different sponsors that track the exact same index are a gray area, and tax professionals disagree about them.

When in doubt, choose a replacement that offers similar market exposure but follows a different index or strategy.

Cryptocurrency

As of this writing, the wash sale rule in Section 1091 applies to stock and securities, and the IRS treats cryptocurrency as property rather than a security. Congress has considered proposals to extend wash sale rules to digital assets, so check current law before relying on this distinction, and remember that crypto tokens that are themselves securities could be treated differently.

How brokers report wash sales

Brokers are required to track wash sales for identical securities within the same account, and they report disallowed loss amounts in box 1g of Form 1099-B. They do not generally track wash sales across different brokers, across your IRA and taxable accounts, or across your spouse’s accounts. You are responsible for identifying those and reporting them on Form 8949 with adjustment code W.

Harvesting losses without triggering the rule

  1. Wait 31 days before buying back the same security. You will be out of the market for that period, which carries its own risk.
  2. Swap to a similar but not identical investment. For example, sell a fund tracking one broad index and buy a fund tracking a different broad index, keeping your market exposure.
  3. Turn off automatic reinvestment of dividends in the security you plan to sell, in all accounts, around the sale date.
  4. Coordinate with your spouse and your IRAs. Check for purchases of the same security in every household account in the 30 days before and after the sale.
  5. Double up first, then sell, an older technique: buy additional shares, wait 31 days, then sell the original lot at a loss. This requires extra cash and still exposes you to price changes.

Year-end timing

A wash sale can cross calendar years. If you sell at a loss on December 28 and buy back on January 10, the loss is disallowed in the year of the sale and added to the basis of the January shares. Investors harvesting losses for the current tax year should complete sales early enough to avoid repurchases within the window and should remember that trades must settle according to normal rules.

Do gains have a wash sale rule?

No. The rule only applies to losses. You can sell a security at a gain and buy it right back immediately. That is the basis of gain harvesting in years when your income falls in the 0% long-term capital gains bracket.

Short sales and options

The rule also covers closing a short sale at a loss and then opening another short sale in substantially identical stock within the window. Selling put options or buying call options on a stock you sold at a loss can count as acquiring a contract or option to buy. Active options traders should track these situations carefully, as they are a frequent source of unexpected disallowed losses.

Record keeping

Keep trade confirmations and a simple log of every sale at a loss with the date, quantity, and the 61-day window. Before buying anything during that window, check whether it matches a recent loss sale. Good records make it much easier to complete Form 8949 accurately and to support your return if questioned.

Related reading: Earned Income Tax Credit: Who Qualifies, How It Is Figured, and How to Claim It Correctly.

Frequently Asked Questions

What is the wash sale rule?

It disallows a loss on the sale of stock or securities if you buy substantially identical securities within 30 days before or after the sale, including purchases by your spouse or in your IRA.

Is a wash sale loss gone forever?

Usually not. The disallowed loss is added to the basis of the replacement shares and recovered when you sell them. The exception is a repurchase in an IRA, where the loss is effectively lost.

How long do I have to wait to buy back a stock?

At least 31 days after the sale, and you must not have bought substantially identical shares in the 30 days before it.

Do wash sale rules apply to ETFs?

Yes, if the replacement is substantially identical. Swapping to an ETF that tracks a different index is generally considered safe; identical share classes are not.

Does the wash sale rule apply to gains?

No. It applies only to losses, so selling at a gain and repurchasing immediately is allowed.

This article is for general informational purposes only and is not legal, medical, tax, or financial advice. Rules vary by state and change over time; confirm details with the relevant agency or a licensed professional.

Advertisement
Specifications Pro Editorial Team

The Specifications Pro Editorial Team researches and writes plain-English guides on US insurance, health coverage, education costs, loans, legal issues, taxes, and retirement, checked against official sources such as the IRS, CMS, CFPB, and state regulators.

Our editorial policy

Leave a Comment

Advertisement