What Is a Wash Sale? The Wash Sale Rule Explained

By Markets & Investing DeskUpdated Nov 10, 2026

Wash Sale
Illustration · Fintrev

Definition

A wash sale is a loss sale of a security when you buy the same or a substantially identical one within 30 days before or after. The loss is deferred into the new shares' basis.

Key takeaways

  • The window runs from 30 days before to 30 days after a loss sale.
  • A disallowed loss is added to the basis of the replacement shares, and the old holding period carries over to them.
  • Purchases by your spouse, in your IRA, or through options or contracts to buy the security can trigger the rule.
  • Wash sales are not illegal. The deduction is deferred, not penalized, except in cases such as IRA repurchases where the loss can be lost for good.
  • Only losses are affected. Selling at a gain and buying back immediately is not a wash sale.

A wash sale is a sale of stock or securities at a loss when you buy the same or a “substantially identical” security within 30 days before or after that sale. Under the wash sale rule (Section 1091 of the U.S. Internal Revenue Code), you cannot deduct that loss on your tax return for the year of the sale. The loss is not erased. It is added to the cost basis of the replacement shares, so the tax benefit is postponed until you sell those shares.

How the Wash Sale Rule Works

A wash sale needs three things to happen together:

  1. You sell or trade a stock or security at a loss.
  2. Within the window, you (or a party the rule treats as you) acquire the same or a substantially identical security, or a contract or option to acquire it.
  3. You still hold the replacement position, so your economic exposure barely changed.

If you sell a losing position and immediately buy it back, you have booked a tax loss while keeping essentially the same investment. The rule stops that from reducing your taxes, and the IRS enforces it.

The Wash Sale Time Period

The window reaches both directions: the 30 days before the sale, the day of the sale, and the 30 days after it, for 61 days in total. It is often called a 60-day window because the sale date sits in the middle.

The “before” side matters. If you buy additional shares and then, within 30 days, sell your older, higher-cost shares at a loss, the new purchase already counts as the replacement. Averaging down near a sale can trigger the rule without any buyback after the sale.

What Counts as “Substantially Identical”

There is no statutory list of substantially identical securities, so the test depends on the facts:

  • Shares of the same company’s common stock are identical.
  • Stock of a different company is generally not substantially identical, even in the same industry.
  • Bonds and preferred stock of the same issuer are ordinarily not substantially identical to its common stock. Preferred stock can qualify if it is freely convertible into the common, carries the same voting rights, and trades at a price close to its conversion ratio.
  • Buying a call option, or entering a contract to acquire the stock, counts as acquiring it for wash sale purposes.

Funds are a gray area. The IRS has not issued a bright-line rule on two funds from different sponsors that track the same index.

Purchases That Count Even If You Did Not Make Them in the Same Account

The rule looks at you as a taxpayer, not at a single brokerage account:

  • Your spouse. A purchase by your spouse can trigger a wash sale on your loss.
  • Your IRA. Under Revenue Ruling 2008-5, buying substantially identical shares in your IRA within the window disallows the loss on a sale in a taxable account, and the IRA’s basis does not increase.
  • Automatic reinvestment. A reinvested dividend inside the window can create a wash sale on part of a loss.
  • A corporation you control. Purchases by a company you control can also be treated as yours.

Example of a Wash Sale

Hypothetical, for illustration only.

An investor bought 100 shares of XYZ for $50 each, a $5,000 cost basis. The price falls, and she sells all 100 shares at $40 for $4,000, a $1,000 loss. Fifteen days later she buys 100 shares of XYZ again at $42, paying $4,200.

Because the repurchase falls within 30 days after the loss sale, this is a wash sale:

  • Loss deducted this year: $0.
  • Basis of the new shares: $4,200 purchase price + $1,000 disallowed loss = $5,200, or $52 per share.
  • Holding period: the time she held the original shares is added to the new shares.

Months later she sells the 100 replacement shares at $55 for $5,500. Her taxable gain is $5,500 minus $5,200, or $300, instead of $1,300. Across both trades she reports a net $300 gain either way ($1,000 loss and $1,300 gain, or $0 and $300). Only the timing of the loss changed.

Partial wash sale. If she had bought back only 50 shares, only the loss on 50 of the 100 shares sold would be disallowed. She could deduct $500 now and add the other $500 to the basis of the 50 new shares. Wash sales are matched share by share, which is also how the rule treats selling in batches: each lot sold at a loss is tested against purchases inside its own window.

Why the Deferral Can Still Cost Money

Deferral is neutral only on paper. If the loss would have offset a short-term gain taxed at ordinary rates this year, and the replacement shares are later sold for a long-term gain taxed at a lower capital gains tax rate, the timing shift can raise the total tax. The carried-over holding period can help here, since it can move the replacement shares into long-term treatment sooner.

Why the Rule Matters: Capital Loss Deductions

U.S. taxpayers can use capital losses to offset capital gains without limit. If losses exceed gains, up to $3,000 of the net loss ($1,500 if married filing separately) can offset other income each year, and any remainder carries forward to future years. The wash sale rule stops investors from claiming that deduction while keeping the position.

Hypothetical: an investor has a $15,000 gain on ABC stock and a $7,000 realized loss on XYZ. Netted together, only $8,000 of gain is taxed. If she repurchases XYZ within 30 days, the $7,000 loss cannot offset the ABC gain this year, and the full $15,000 is taxed now.

Reporting a Wash Sale Loss

For covered securities, brokers report wash sales on Form 1099-B when the sale and the repurchase involve the identical security in the same account. The disallowed amount appears on the form, and you carry it to Form 8949 using adjustment code W before totals flow to Schedule D.

Broker reporting does not cover purchases at a different brokerage, in your IRA or by your spouse, and a broker will not judge whether a different security is substantially identical. Tracking those cases and adjusting basis is the taxpayer’s responsibility.

Avoiding a Wash Sale During Tax-Loss Harvesting

Tax-loss harvesting means selling positions at a loss to offset gains, then reinvesting so the portfolio keeps a similar shape. Wash sales occur at the reinvestment step. Common approaches:

  • Wait 31 days after the sale before buying the same security back, and make no purchases of it in the 30 days before the sale.
  • Buy something similar but not substantially identical, such as a different company in the same sector, to keep market exposure during the waiting period.
  • Pause dividend reinvestment on the position around the sale date.
  • Check every account in the household, including IRAs and a spouse’s accounts, for scheduled or automatic purchases.

Limitations and Exceptions

  • Day traders are covered. Active traders can generate many wash sales in a single stock, each adjusting the basis of the next position. A trader who qualifies for trader tax status and elects mark-to-market accounting under Section 475(f) is not subject to the wash sale rule on those securities, because gains and losses are recognized at year-end values instead.
  • IRA repurchases. The loss is not added to any basis you can use later, so the deduction is effectively gone.
  • Year-end timing. A loss sale in late December followed by a repurchase in early January is still a wash sale. The window ignores the tax year boundary, and the loss moves into the basis of shares bought in the new year.

Wash trading. A wash trade is buying and selling the same instrument simultaneously, often between related parties, to create artificial volume or prices. It is market manipulation and is prohibited by securities and commodities regulators. A wash sale is a tax term for an ordinary trade whose loss deduction is deferred.

Bed-and-breakfasting (UK). In the United Kingdom, selling shares and buying them back the next morning was called bed-and-breakfasting. HMRC’s share-matching rules now match a disposal with shares of the same class bought within the following 30 days, which removes the benefit in a way similar to the U.S. rule.

Superficial loss (Canada). Canada’s equivalent is the superficial loss rule administered by the CRA. It uses a 30-days-before-and-after window, and a denied loss is generally added to the adjusted cost base of the replacement property.

The Bottom Line

The rule matters most to investors harvesting tax losses, active traders, and households with IRAs or spouse accounts that buy the same securities. A disallowed loss usually returns later through higher basis, but IRA repurchases can erase it and the timing shift can raise total tax. Waiting 31 days, buying a different security in the meantime, and checking every household account keeps a harvested loss deductible.

About this page

Written by Markets & Investing Desk

The Markets & Investing Desk covers investing guides, the financial dictionary, companies, people, economics and market data.

Published
Last updated

Spotted an error? Tell the editors. This page is general information, not financial advice.