Home / Guides / Taxes

Wash sale rule explained: the 61-day window that can erase your tax loss

You sell a losing stock to claim the loss on your taxes, then buy it back a week later when it looks cheap. Sensible — except the IRS wash sale rule may quietly cancel that deduction. Here is what a wash sale is, the exact 61-day window, what "substantially identical" really means, where crypto stands, and how to harvest losses the right way.

⚑ Educational information, not tax or legal advice

This is general educational content, not legal or tax advice and not a substitute for a professional. Tax rules, thresholds and the treatment of crypto change, and results vary by your jurisdiction, filing status and individual case. Before acting, consult a licensed CPA, enrolled agent or tax attorney about your own situation.

Selling an investment at a loss is one of the few good things about a position going down: that loss can offset gains elsewhere and shrink your tax bill. The strategy is called tax-loss harvesting, and it is completely legal. But there is a tripwire — the wash sale rule — designed to stop people from claiming a paper loss while never really giving up the investment. Step on it, and the loss you were counting on simply disappears from this year's return.

What is a wash sale?

A wash sale happens when you do two things close together: you sell a security at a loss, and you buy the same or a "substantially identical" security within a narrow window around that sale. When both happen, the IRS treats the loss as if it never occurred for the current tax year and disallows the deduction.

The logic is straightforward. If you sell stock at a loss on Monday and rebuy the identical stock on Tuesday, your economic position has barely changed — you still own essentially the same thing. The rule, codified in Internal Revenue Code Section 1091, exists to stop investors from manufacturing tax losses without genuinely exiting an investment.

The 61-day window

The single most misunderstood part of this rule is the timing. People say "30 days," but the real window is wider. A wash sale is triggered if you buy a substantially identical security in the period that runs from:

  • 30 calendar days before the sale, through
  • the day of the sale itself, through
  • 30 calendar days after the sale.

That is 61 days in total. The "before" half catches you too — if you bought more shares shortly before selling the original lot at a loss, that purchase can taint the sale. Critically, the count uses calendar days, not trading days, so weekends and market holidays are included. To be safely clear of the window after a sale, you generally wait until day 31.

30 days before + the sale day + 30 days after = a 61-day no-rebuy zone.

What happens to the disallowed loss?

Here is the reassuring part: a wash sale does not destroy your loss forever — it defers it. The disallowed loss is added to the cost basis of the replacement shares you bought. Your holding period also rolls over. So when you eventually sell those replacement shares, the higher basis produces a larger loss (or smaller gain), and you recover the benefit then.

The catch is timing. You wanted the loss this tax year — perhaps to offset a big gain — and instead it is locked inside shares you may hold for years. If you needed it now, the deferral can be a real problem.

A worked example

Numbers make it concrete. Imagine you bought 100 shares of a fund at $50 ($5,000) and it has dropped to $40. You sell to harvest the $1,000 loss. The table compares two ways the next 31 days can play out.

StepWash sale (rebuy day 10)Clean harvest (wait 31 days)
Original cost$5,000$5,000
Sold at$4,000$4,000
Realized loss−$1,000−$1,000
Rebought same fundDay 10, at $4,100Day 31, at $4,300
Loss deductible this year$0 (disallowed)$1,000
New cost basis$5,100 (basis adjusted)$4,300 (normal)
Tax saved now (24% bracket)$0$240

Illustrative only. Assumes a $1,000 short-term loss offsetting ordinary income at a 24% rate; your result depends on income, filing status, the type of gain offset and current law. State tax ignored.

Both investors end up holding the fund again. But the one who rebought on day 10 triggered a wash sale and got no deduction this year — the $1,000 simply rode along into a higher basis. The one who waited past day 30 keeps the $1,000 deduction and roughly $240 of real tax savings. Same investment, very different outcome, decided only by patience.

→ See what a harvested loss is actually worth

Run your purchase price, sale price, holding period and income through the calculator to see your gain or loss and the tax it offsets at short-term versus long-term rates — so you know whether waiting out the 61-day window is worth it.

Open the Capital Gains Tax Calculator →

What counts as "substantially identical"?

This phrase does most of the work in the rule, and the IRS deliberately leaves it fuzzy. There is no official list. In practice:

  • Clearly identical: the exact same stock, or options and contracts to buy that same stock. Selling a share and buying a call option on it can trigger the rule.
  • Usually not identical: two different providers' broad index funds tracking the same market — say one total-market ETF swapped for another firm's total-market ETF. Many investors use this to stay invested while harvesting a loss.
  • Grey area: two S&P 500 funds from different sponsors. They track the exact same index, and some advisers consider them risky to swap, even though the IRS has never formally ruled them identical. When in doubt, choose a fund tracking a clearly different index.

One more trap: the rule reaches across your accounts. A repurchase in your IRA, or in your spouse's account, counts as your purchase for wash sale purposes. Buying it back in a Roth IRA is actually worse — the disallowed loss is lost entirely, with no basis adjustment to recover it later.

Why it matters for tax-loss harvesting

Tax-loss harvesting only works if the loss is allowed. The whole point is to bank a deduction now — to offset realized gains or up to $3,000 of ordinary income per year — while staying invested. A wash sale defeats that by erasing the current-year deduction, which is exactly when you wanted it. Understanding the window is what separates a smart harvest from a wasted trade.

Does the wash sale rule apply to crypto?

As of the 2026 tax year, no. Section 1091 applies to "stocks or securities," and the IRS classifies cryptocurrency as property, not a security. That means a wash sale, in the strict tax sense, does not currently apply to assets like Bitcoin or Ether. A holder can sell crypto at a loss and rebuy it minutes later, and still claim the loss.

⚑ This crypto gap may not last

Lawmakers have repeatedly proposed extending the wash sale rule to digital assets, and the treatment can change with new legislation or guidance. Do not build a strategy around it without confirming the current-year rules with a tax professional.

How to harvest losses without triggering a wash sale

1. Wait at least 31 days

The simplest fix: sell, then do not rebuy the same security until 31 days have passed. You take some market risk by being out of the position, but the loss is clean. Mark the date on a calendar so you do not rebuy a day early.

2. Swap into a similar — not identical — investment

To stay invested through the 31 days, immediately buy something that tracks a similar exposure but is not substantially identical: a different provider's total-market fund, or a fund tracking a related index. You keep market participation and keep the loss. After 31 days you can switch back if you prefer the original.

3. Mind every account you control

Turn off automatic dividend reinvestment on the security during the window — an auto-buy of a single share can trigger the rule. And remember the purchase is tainted if it lands in your IRA, your 401(k) self-directed brokerage or your spouse's account, not just your taxable brokerage.

4. Harvest deliberately, not just in December

Losses can be harvested any time markets dip, not only at year-end. Spreading harvests across the year gives you more chances to bank deductions and more room to maneuver around the 61-day window. If you are deciding which account to hold investments in, our Roth vs traditional IRA calculator can help you picture the long-run after-tax outcome before you commit.

How this fits the bigger capital-gains picture

Harvesting losses is one lever among several. The same calendar that governs wash sales also governs whether a gain is short-term or long-term, and both feed your final bill. For the full breakdown of rates, brackets and timing, see our guide to capital gains tax explained, and for the legal ways to keep more of a winning position, how to avoid capital gains tax on stocks.

Frequently asked questions

What is a wash sale in simple terms?

A wash sale happens when you sell a security at a loss and buy the same or a substantially identical security within 30 days before or after that sale. The IRS then disallows the loss for that tax year. You do not lose it permanently — the disallowed amount is added to the cost basis of the replacement shares, so you recover it when you sell those.

How long is the wash sale window?

It spans 61 days in total: the 30 calendar days before the sale, the day of the sale itself, and the 30 calendar days after. Rebuying a substantially identical security anywhere inside that window disallows the loss. The count uses calendar days, so weekends and holidays are included — wait until day 31 to be clear.

What counts as a substantially identical security?

The IRS does not publish a precise list, but it generally means the same stock, or options and contracts to acquire it. Two different providers' broad index funds are usually not considered identical, which is why investors swap between them to harvest losses. A stock and a call option on that same stock can trigger the rule. When unsure, ask a CPA.

Does the wash sale rule apply to cryptocurrency?

As of the 2026 tax year, no. The rule under Section 1091 applies to stocks and securities, and the IRS treats crypto as property, so it does not currently apply. That lets crypto holders sell at a loss and rebuy immediately. Congress has repeatedly proposed closing this gap, so confirm the current law before relying on it.

How do I harvest a tax loss without triggering a wash sale?

Wait at least 31 days before rebuying the same security, or immediately buy a similar but not substantially identical investment — such as swapping one total-market fund for a different provider's. Avoid buying the security in your IRA or your spouse's account during the window, since those count too. A licensed CPA can confirm the swap is safe.

KH
Karim Haddad

Karim researches money, tax and legal-claims topics for AMAADOR and writes from hands-on research. This is general education, not financial, tax or legal advice — verify current figures and consult a licensed professional.

Sources & further reading

  1. IRS — Publication 550, Investment Income and Expenses (wash sales section), and Topic No. 409 on capital gains and losses, irs.gov.
  2. Internal Revenue Code § 1091 (Loss from wash sales of stock or securities), and Schedule D / Form 8949 instructions on reporting disallowed losses (code W), irs.gov.
  3. IRS Notice 2014-21 and subsequent guidance treating convertible virtual currency as property for federal tax purposes, irs.gov.

Last updated: 19 June 2026. Read our full disclaimer →

Advertisement