Skip to content
← All financial terms

Taxes · Financial term

Wash Sale Rule

Also called Wash sale · Wash-sale rule · 30-day wash sale rule · Section 1091 · Wash sale loss disallowed

What is the wash sale rule?

The wash sale rule is a federal tax rule, in section 1091 of the Internal Revenue Code, that disallows a loss on selling stock or securities if you acquire substantially identical stock or securities within 30 days before or after the sale. The disallowed loss is usually not gone for good: it is added to the cost basis of the replacement shares, which defers the deduction until you sell them.

9 min readWorked example5 common questions

How the wash sale rule works

Section 1091 looks at a 61-day window: the 30 days before you sell at a loss, the sale date, and the 30 days after. If you acquire substantially identical stock or securities anywhere in that window, the loss is not deductible. Acquiring includes buying outright, receiving the shares in a fully taxable trade, and entering into a contract or option to buy them. IRS Publication 550 adds purchases made for your IRA or Roth IRA, and purchases by your spouse or by a corporation you control.

A wash sale usually postpones the loss rather than erasing it. The disallowed amount is added to the cost basis of the replacement shares, and the holding period of the shares you sold carries over to them, which can make a later sale long-term sooner. When you eventually sell the replacement without another wash sale, the old loss shows up as a smaller gain or a bigger loss.

If you buy back fewer shares than you sold, only part of the loss is disallowed: purchases are matched share for share with the shares sold, in the order you bought them, as the example below shows.

What counts as substantially identical?

The statute does not define the phrase, and Publication 550 says to weigh all the facts and circumstances of your case. A few markers are settled. Stock of one company is ordinarily not substantially identical to stock of another company, although predecessor and successor stock in a reorganization can be. A company’s bonds or preferred stock are ordinarily not substantially identical to its common stock, unless they are convertible and trade in step with it. Selling common stock at a loss and buying warrants on the same company’s common stock does trigger the rule.

Funds are the gray area. Publication 550 offers no specific test for mutual funds or ETFs, so treating two funds that track the same index as different investments is a judgment call you would have to defend. Swapping into a fund built on a different benchmark, for example from one broad US index fund to another that follows a different index, is the more conservative route, because the holdings and returns genuinely differ.

Wash sale traps that catch investors

The rule applies to you as a taxpayer, not to a single account, so purchases anywhere in the household count. These are the cases that most often turn a planned tax-loss harvest into a deferred or lost deduction, usually because the purchase happened somewhere the seller was not watching. Check them before you sell and again before any purchase over the following month, remembering that the window counts calendar days and runs straight across year-end.

  • Buying in an IRA or Roth IRA: Rev. Rul. 2008-5 disallows the loss and adds nothing to basis inside the IRA, so the deduction is lost for good.
  • Automatic purchases: a dividend reinvestment or a scheduled investment in the same fund within the window is an acquisition.
  • Your spouse’s account: a spouse buying the same stock creates a wash sale on your loss.
  • Employer stock: Publication 550 gives the example of receiving a stock bonus award in the same company within 30 days of selling its shares at a loss.
  • Buying first: purchases in the 30 days before the sale count, including shares bought to average down.
  • Year-end: a late-December loss is disallowed by a repurchase in early January and moves into the new shares’ basis.

How wash sales are reported

Brokers report only part of the picture. Box 1g of Form 1099-B generally shows a disallowed wash sale loss when the shares sold were covered securities and the replacement had the same CUSIP number and was bought in the same account. Brokers need not report other wash sales, so purchases in another brokerage account, in an IRA or by your spouse often go unflagged, yet the IRS instructions are plain that the loss is still not deductible.

You report a wash sale on Form 8949, in Part I or Part II depending on how long you held the shares, with code W in column (f) and the disallowed amount entered as a positive adjustment in column (g). Keep your own record of the basis added to the replacement shares, especially when the broker never saw the wash sale.

Some transactions sit outside the rule. It does not apply to redemptions of floating-NAV money market fund shares, to commodity futures contracts or foreign currencies, or to a dealer’s losses in the ordinary course of business.

How to harvest a loss without a wash sale

There are three clean approaches. The first is to wait: sell, then stay out of the security for 31 days, accepting the market risk while you are out. The second is to swap: reinvest the proceeds right away in something that is not substantially identical, such as a different company in the same industry or a fund tracking a different index, and move back after 31 days if you prefer the original. The third is to double up in advance: buy the extra shares first, wait more than 30 days, then sell the original lot at a loss, making no other purchase in the 30 days after the sale.

Whichever route you take, pause automatic investments into the security and check every account in the household. A loss that survives the test is still limited to $3,000 a year against ordinary income, with the rest becoming a capital loss carryover.

Illustrative numbers

A partial wash sale: 200 shares sold, 50 bought back

Bought 200 shares in March 2025 at $50$10,000

Sold all 200 on November 10, 2026, at $40$8,000 (a $2,000 loss)

Bought 50 shares on November 25, 2026, at $38$1,900

Loss disallowed (50 of 200 shares)$500

Loss deductible for 2026$1,500

Basis of the 50 new shares$2,400

Only the 50 shares matched with the repurchase lose their deduction. The $500 moves into the new shares’ basis ($1,900 + $500), and their holding period includes the roughly 20 months the old shares were held, so even an immediate sale would be long-term. Had those 50 shares been bought in an IRA, the $500 would be gone for good.

At a glance

Does it trigger a wash sale? Purchases within 30 days before or after a sale at a loss

Purchase in the windowWash sale?Why
The same stock or fund, in any taxable accountYesIdentical security, whatever the account
The same security in your IRA or Roth IRAYesRev. Rul. 2008-5; loss lost, no basis added
The same stock bought by your spouseYesPublication 550 counts a spouse’s purchase
A reinvested dividend in the same fundYesReinvestment is an acquisition
A call option on the same stockYesContracts and options to acquire count
A different company in the same industryOrdinarily noDifferent issuers are ordinarily not identical
A fund tracking a different indexUsually treated as noPub. 550 has no fund test; holdings differ
The same stock after selling it at a gainNoThe rule covers only losses
Floating-NAV money market fund sharesNoExcluded by the Schedule D instructions

Put it in your plan

Wash Sale Rule in MoneyWhatIf

MoneyWhatIf does not test trades against the wash sale rule. It projects each brokerage account with proportional cost basis rather than individual tax lots, and it does not prescribe real-world tax-loss trades. Two related pieces are modeled: a sale below remaining basis realizes a loss that offsets that year’s gains and carries forward against later ones, and gain harvesting in Tax Planning models selling and immediately repurchasing appreciated holdings, a pattern the rule does not restrict because it applies only to losses.

Open your forecast

Common questions

Wash Sale Rule FAQs

Does the wash sale rule apply to gains?

No. Section 1091 disallows only losses. If you sell a stock or fund at a gain, you owe tax on the gain as usual, and you can buy the same security back immediately with no wash sale consequence. That is why tax-gain harvesting, selling at a gain and rebuying to raise basis, works without waiting 30 days.

How long do I have to wait to buy back a stock after selling it at a loss?

More than 30 days. The window covers the 30 calendar days after the sale, so the 31st day after the sale is the first safe day to repurchase. Purchases in the 30 days before the sale also count, so avoid adding to the position in the month leading up to it. The same timing applies to purchases in your IRA and by your spouse.

Does the wash sale rule apply to crypto?

It depends on the asset. The IRS treats digital assets as property, and section 1091 refers to stock or securities. The Schedule D instructions say the rule generally applies to digital assets that are also stock or securities for tax purposes, such as tokenized securities, and those wash sale losses can appear on Form 1099-DA. Check the current year’s instructions before relying on a crypto loss, because this guidance can change.

Is a wash sale illegal?

No. Wash sales are not prohibited or penalized in themselves; the rule simply denies the deduction for that loss in that year and moves it into the replacement’s basis. The trouble comes from reporting it wrong. If you deduct a loss that the rule disallows, including one your broker did not flag, you understate your tax, and the IRS can assess the difference with interest.

Does a wash sale matter if I sell the new shares in the same year?

Often not for that year’s tax. The disallowed loss sits in the replacement shares’ basis, so selling them later in the same year releases it through a smaller gain or a bigger loss, provided that sale does not set off a new wash sale. The rule bites hardest at year-end, when a repurchase can push the loss into shares you hold well into the next year.