Under IRS Publication 550, a wash sale happens when you sell stock or securities at a loss and, within 30 days before or after that sale, acquire substantially identical stock or securities. Fidelity's wash-sale rules page describes the same 30-day test. The loss is not deductible in that case, but it is not simply erased: it gets added to the cost of the replacement shares.

This guide covers what to check before you sell at a loss or rebuy a position: the window, the purchases that count, what happens to the disallowed amount, and how it shows up on your tax forms.

How long is the wash-sale window?

The window is 61 calendar days: the 30 days before the sale, the sale date itself, and the 30 days after, according to TakeHomeTax's guide. TakeHomeTax also says the 30 days are calendar days, not trading days, so weekends and holidays count.

The window looks backward as well as forward. A purchase you made 20 days before you sold at a loss can wash that loss, just as a purchase 20 days after can.

The window also ignores the tax year. TakeHomeTax notes that a loss sale in late December followed by a repurchase in January can still trigger the rule, even though the two trades fall in different tax years.

Which purchases can disallow a loss?

Several kinds of purchase can wash a loss, and not all of them happen in the account where you sold.

Buying the same stock in any account

The basic trigger is acquiring substantially identical stock or securities inside the window, as described above.

Options and contracts

Buying a contract or option to acquire the same stock within the window can trigger a wash sale on a stock loss, according to StockTitan's tax-loss harvesting guide. The rule also covers losses on options themselves. If you sell shares at a loss and then buy calls on the same stock, check the dates before you do it.

Your IRA or Roth IRA

StockTitan, citing Publication 550, lists buying substantially identical stock for your IRA or Roth IRA as one of the purchase types that can wash a loss. If you sell a stock at a loss in a taxable account, an automatic or manual purchase of the same stock in a retirement account inside the window is a problem.

Your spouse's purchases

According to Finabase's summary of Publication 550, a purchase by your spouse of substantially identical stock can create a wash sale even when it happens in a separate account. Coordinate with your spouse before either of you trades a stock you are selling at a loss.

Dividend reinvestment

StockTitan reports that under Publication 550, each share bought with reinvested dividends is treated as purchased on its own date for wash-sale purposes. A dividend reinvested within 30 days of a loss sale can therefore count as a replacement purchase. If you hold a stock you may sell at a loss, check whether dividend reinvestment is switched on.

Other lots of the same stock

Shares you already own matter too. The Publication 550 text in the IRS taxmap copy (a 2014 version) says a loss from a wash sale of one block of shares cannot reduce gains on identical blocks sold the same day. Buying more shares just before you sell part of a position at a loss is the same trap. Confirm the current wording on irs.gov.

What counts as "substantially identical"?

Finabase, summarizing Publication 550, says stock of one corporation is ordinarily not substantially identical to stock of another corporation. Selling one company at a loss and buying a different company in the same industry is therefore not ordinarily a wash sale.

The same summary says a company's bonds or preferred stock are ordinarily not substantially identical to its common stock. The exception is when they are convertible into the common stock and trade in line with it.

ETFs are less settled. VWRP's discussion of the rule and ETFs points out that the Publication 550 wash-sale passage does not name ETFs, so that passage alone does not decide whether two ETFs are substantially identical. Treat a swap between two funds tracking the same index as a judgment call and not a safe harbor. Selling and rebuying the same ETF is the plain case, and it is covered by the rule as written.

What happens to the disallowed loss?

The disallowed loss is added to the cost of the replacement shares. ClearMoneyGuide's summary of Publication 550 gives an example in which a $250 disallowed loss raised the new basis to $1,050.

The holding period carries over too. The 2014 taxmap copy of Publication 550 says the holding period of the replacement shares includes the period you held the original shares. That copy predates the current revision, so check the current Publication 550 on irs.gov before relying on the wording.

Hypothetical example (illustrative numbers, not from the IRS): you buy 100 shares for $5,000 and sell them for $4,000, a $1,000 loss. Ten days later you buy 100 shares for $4,200. The $1,000 loss is disallowed, and the new shares have a basis of $5,200 ($4,200 plus $1,000). You do not deduct the loss now. It is recovered when you later sell the replacement shares, through the higher basis.

Partial wash sales

If you rebuy fewer shares than you sold, only part of the loss is disallowed. A Publication 550 example, cited by StockTitan and ClearMoneyGuide, has 100 shares sold at a $1,000 loss with 75 substantially identical shares bought in the prior 30 days. The $750 loss on those 75 shares is not deductible.

One calculator, ustax.tools, expresses this as: disallowed loss = loss × shares repurchased in the window ÷ shares sold, with that amount added to the replacement basis. In the example above, $1,000 × 75 ÷ 100 = $750.

When the shares bought are fewer or more than the shares sold, Publication 550 says you must determine which particular shares the wash-sale rules apply to, matched in the order bought, according to Reign Creative's explanation and Finabase.

How is a wash sale reported?

Your broker may flag some wash sales. The 2014 taxmap copy of Publication 550 says that on Form 1099-B, box 1f shows W for a wash sale, and box 1g shows the amount of nondeductible wash-sale loss when certain conditions are met. Box layouts can change between years, so confirm the details in the current Form 1099-B instructions and Publication 550 on irs.gov.

Do not rely on the form alone. StockTitan quotes Publication 550: "you cannot deduct a loss from a wash sale even if it is not reported on Form 1099-B." Purchases in a spouse's account or in an account at another broker may not show up on your 1099-B, so you have to track them yourself.

On Form 8949, a wash sale is reported with code W, and the disallowed loss is entered as a positive adjustment, according to Reign Creative.

Checklist before you sell at a loss or rebuy

  1. Count 30 calendar days in both directions from the sale date, and remember the window crosses year-end.
  2. Check every account: your taxable accounts at each broker, your IRA and Roth IRA, and your spouse's accounts.
  3. Look for options or contracts to buy the same stock.
  4. Turn off or account for dividend reinvestment on the stock you are selling, since each reinvested purchase has its own date.
  5. Review your other lots. Recent purchases of the same stock inside the window can match against the shares you sell.
  6. Decide what you will hold instead. Stock of a different corporation is ordinarily not substantially identical. Two ETFs tracking the same index are a judgment call.
  7. Keep your own records of wash sales, particularly any your broker cannot see, and confirm the details against the current Publication 550 on irs.gov.

FAQ

Is the wash-sale rule 30 days or 61 days?

Both figures describe the same window. The rule looks at purchases within 30 days before or after the sale, which together with the sale date makes a 61-calendar-day period.

Can my spouse's purchase trigger a wash sale on my loss?

Yes. Finabase, summarizing Publication 550, says a spouse's purchase of substantially identical stock can create a wash sale even in a separate account.

Does buying the same stock in my IRA count?

Yes. StockTitan, citing Publication 550, lists buying substantially identical stock for your IRA or Roth IRA as one of the purchases that can wash a loss.

Do reinvested dividends count as a purchase?

Yes. Under Publication 550, as described by StockTitan, each share bought with reinvested dividends is treated as purchased on its own date, so a reinvestment inside the window can matter.

Is the disallowed loss gone for good?

Generally no. Publication 550 directs you to add the disallowed loss to the cost of the replacement shares. The 2014 taxmap copy also says the holding period of those shares includes how long you held the originals; check the current text on irs.gov.

Does my broker's 1099-B catch every wash sale?

No. Publication 550, as quoted by StockTitan, says you cannot deduct a wash-sale loss even if it is not reported on Form 1099-B, so you need to track cross-account and spouse purchases yourself.

Sources

  1. Publication 550 - Investment Income and Expenses - Capital Gains and Losses (IRS taxmap copy) (IRS)
  2. Wash-Sale Rules (Fidelity Investments)
  3. Tax-Loss Harvesting 2026: Deadline, Wash Sale Rule and Examples (StockTitan)
  4. Wash sale rule: the 61-day window, basis adjustment and traps (Finabase)
  5. Wash Sale Rule ETFs: What the IRS Says (2026) (VWRP)
  6. The Wash Sale Rule Explained, With IRS Examples (Reign Creative LLC)
  7. Wash Sale Rule 2025: 30 Days, IRAs, and Form 8949 Code W (ClearMoneyGuide)
  8. Wash Sale Rules: The Complete 2026 Guide (TakeHomeTax)
  9. IRS Wash Sale Calculator 2025 & 2026 — 30-day rule, disallowed loss basis adjustment (ustax.tools)