StructureX

Home › Tools

Wash sale window calculator: the 61 dates to watch after a loss sale

You sold at a loss. Which dates are risky, and when is it safe to buy back? Type the sale date and see the whole window on a calendar.

Free tool · 30 days before and after · first clear day · US and Canada · runs in your browser · Updated 2026-11-28

The window is the sale date, the 30 days before it and the 30 days after it: 61 days in all. The first day after the window is the sale date plus 31 days. IRS Publication 550 says "within 30 days before or after the sale." The CRA says "30 calendar days before the sale" and "30 calendar days after the sale."

How it works: the window is the day you sold, the 30 days before it and the 30 days after it. That is 61 days. This tool counts every calendar day. Weekends and market holidays are counted like any other day. IRS Publication 550 says "within 30 days before or after the sale." It does not say "calendar days" or "trading days." The CRA does say "30 calendar days."

What the window does and doesn't tell you

It tells you which dates to watch. It doesn't tell you whether a buy is "substantially identical" (the same or nearly the same stock), or whether your loss is really disallowed. For the US, that is in the wash sale timeline with real dates and the wash sale calculator, which works out the dollars. For options, see wash sale rule with options. For Canada, use the superficial loss calculator.

The formula

Sale date
the day you sold the shares at a loss
30 days
the number in both the IRS and CRA wording
Calendar days
every day on the calendar, weekends and holidays too (this tool's counting method)

Worked example (the IRS's own dates)

  1. IRS Publication 550 has an example where you sold 100 shares on January 3, 2025, at a loss.
  2. 30 days before is December 4, 2024. 30 days after is February 2, 2025.
  3. Shares bought on December 13, 2024 (21 days before) and December 20, 2024 (14 days before) are inside the window.
  4. Shares bought on September 20, 2024 (105 days before) are outside it.

The window runs December 4, 2024 to February 2, 2025. The first clear day is February 3, 2025.

What this assumes

Questions

How many days is the wash sale window?

It is 61 days: the day of the sale, the 30 days before it and the 30 days after it. IRS Publication 550 says a wash sale happens when you buy "within 30 days before or after the sale."

When can I buy back after selling at a loss?

The first day outside the window is the sale date plus 31 days. Type your sale date above to get it.

Are the 30 days calendar days or trading days?

IRS Publication 550 doesn't say. It says "30 days." The CRA says "30 calendar days." This tool counts every calendar day, weekends and holidays included.

Is there a wash sale window when I sell at a gain?

No. Publication 550 describes a wash sale as selling "at a loss." Switch the box to "At a gain" to see the answer.

Does the window count days before the sale?

Yes. A buy up to 30 days before the sale is inside the window too. The IRS example with buys on December 13 and 20 and a sale on January 3 shows it.

Follow along

XTradingViewFacebook