Wash sale rule 2026 stock loss 30-day repurchase window
Finance

Wash Sale Rule 2026: How the 30-Day Trap Works and How to Legally Avoid It

Daylongs ·
#wash sale #tax-loss harvesting #cost basis #capital gains #IRA #IRS rules #tax planning #investing

Why every US investor needs to understand the wash sale rule

At some point every investor wants to clean out a losing position. From a tax standpoint, realizing a loss is not a bad thing at all — you can offset it against gains elsewhere and shrink your tax bill. But there is a trap the IRS has laid across that path, and it catches people every December. It is called the wash sale rule, IRS §1091.

Here is the bottom line first. If you sell a security at a loss and rebuy it too soon, you cannot use that loss on your taxes for the year. The IRS definition of “too soon” is 30 days on either side of the sale — a 61-day window in total. Investors who cut a position and rebuy it a week later often discover, months later at tax time, that a very real loss was disallowed.

Do not misread that, though. A wash sale does not vaporize your loss in a normal taxable account. In most cases the loss simply defers into the future. The genuinely dangerous scenario is different: repurchasing inside a retirement account like an IRA. There the loss is gone for good. This guide walks through how the rule actually works, which mistakes destroy a loss, and how to sidestep the rule legally — with worked examples.


How the rule actually works: picturing the 61-day window

The heart of the wash sale rule is the “window.” Center it on the day you sell for a loss, then look 30 days back and 30 days forward. Counting the sale day, that is 61 days.

If you buy the same or a substantially identical security anywhere in that window, the loss from your sale is knocked out of your deductible losses for the year. Most people think they only need to avoid rebuying after the sale. That is the first trap. A purchase made in the 30 days before you sell counts too.

Take a simple case. You bought 100 shares of stock A at $100 and it fell to $60. You sell everything to lock in a $4,000 loss. Ten days later A looks attractive again and you rebuy 100 shares. In that instant the $4,000 loss becomes unusable for this tax year.

TimingActionWash sale?
40 days before sale, buy AOutside windowNo effect
20 days before sale, buy AInside windowTriggers wash sale
Loss sale daySell 100 shares, $4,000 lossReference day
10 days after sale, rebuy AInside windowTriggers wash sale
31 days after sale, rebuy AOutside windowSafe

The safe zone is anything more than 30 full days on either side of the sale. Because it is easy to miscount whether the sale day itself is day zero or day one, experienced investors manage this with a comfortable “wait at least 31 days” rule rather than cutting it fine.


The loss defers, it does not vanish: a cost basis example

The biggest misconception is that a wash sale strips your loss away entirely. In a taxable account it does not. The disallowed loss is added to the cost basis of the replacement shares, so it comes back to life when you eventually sell them.

Follow the numbers. You bought 100 shares of A at $100 ($10,000 total) and sold all of them at $60 ($6,000 total), a $4,000 loss. But five days later you rebought 100 shares of A at $65 ($6,500 total). That is a wash sale.

Two things happen. First, the $4,000 loss is not deductible this year. Second, that $4,000 is bolted onto the cost basis of your new shares. So shares you actually paid $6,500 for now carry a tax basis of $10,500. On top of that, the holding period of the original shares carries over, which matters for the long-term versus short-term determination later.

ItemAmount
Original purchase (100 shares)$10,000
Loss sale proceeds (100 shares)$6,000
Disallowed loss$4,000
Actual cost of repurchase (100 shares)$6,500
Adjusted tax cost basis$6,500 + $4,000 = $10,500
Holding periodCarries over from original shares

Once you see this, it is clear that a wash sale is really a tax deferral, not a tax loss. When you later sell the replacement shares above $10,500, your gain is smaller; below it, the deferred loss finally shows up. The one real problem is that if you never sell those replacement shares, the tax benefit is postponed indefinitely. If the whole point was to harvest a loss this year, tripping a wash sale defeats the plan.

If you want the broader picture of how capital gains and losses are taxed, the capital gains tax filing guide sets the context this article builds on.


What triggers a wash sale: spouse, IRA, and options

The rule is dangerous because its reach is wider than people expect. The IRS does not only ask whether you rebought the same stock yourself. All of the following are combined.

Your spouse’s account. If you sell A at a loss and your spouse buys A inside the 61-day window, that is a wash sale — even if the two of you use different brokers. Households that trade the same names need to coordinate.

Entities you control. A purchase by a company you effectively control is also aggregated.

Options and convertibles. It is not just common stock. Buying a call option on the same name after your loss sale, or acquiring a convertible or warrant judged substantially identical, can trigger the rule.

Purchases across separate accounts. Selling in one taxable account and buying in another still combines. If the two are at different brokers, neither broker’s Form 1099-B will catch it, and you are responsible for reporting the adjustment yourself.

Of all of these, the IRA trap deserves its own section, which comes next.


The IRA repurchase trap: the one case where the loss is gone forever

Inside a normal taxable account, a wash sale defers your loss — you get it back eventually. Do the repurchase inside an IRA and the story changes completely. The loss is destroyed permanently.

The reason is structural. A wash sale loss defers by attaching to the cost basis of the replacement shares, waiting to resurface when you sell them. But an IRA is a tax-advantaged account where cost basis adjustments carry no tax meaning. There is simply no vessel to hold the deferred loss. So if you sell A at a loss in a taxable account and rebuy A inside a traditional or Roth IRA, the loss neither defers nor deducts — it just evaporates. The IRS confirmed this outcome years ago, and it remains the harshest corner of the rule.

This is also one of the easiest mistakes to make by accident. Automatic contributions or reinvestment inside an IRA can trigger it without you ever placing a manual trade. Suppose you tax-loss sell a fund in your brokerage account, and that same fund happens to be on your IRA’s automatic contribution schedule. A few days later the IRA buys it, and your harvested loss is gone. Before any year-end harvesting, check that the security you are selling is not being purchased in any IRA by an automated setting.


How to avoid it legally: the ETF switch and the 31-day wait

The rule sounds intimidating, but avoiding it is straightforward. There are two standard ways to keep market exposure and still claim the loss.

Method 1: wait 31 days. The simplest and safest. Sell at a loss, wait at least 31 days, then rebuy the same security. The downside is that if the price rallies during those 31 days, you miss the move. When you are cutting a position in a falling market, that risk is smaller, which makes this method practical.

Method 2: switch into a similar but not substantially identical security. Sell the loser and immediately buy something in the same sector or with the same character that is not substantially identical. Your market exposure never breaks, and the loss is allowed. After 31 days you can rotate back to the original name if you want.

The trick with ETF switches is choosing a replacement with a different issuer and a different underlying index. The table below gives a rough feel for where the risk sits.

Security you sellReplacement candidateSubstantially identical risk
A single large-cap tech stockSame company’s common stockHigh (clear wash sale)
A single large-cap tech stockBroad tech-sector ETFLow
S&P 500 ETF (issuer A)Another issuer’s S&P 500 ETFHigh (effectively the same)
S&P 500 ETFETF tracking a different broad large-cap indexLow
A specific semiconductor ETFA differently constructed semiconductor ETFGray zone (be conservative)

The one to watch is “a different issuer’s fund on the same index.” If both products simply replicate the S&P 500, treat that as high risk and avoid it, even though the IRS has never issued a bright-line ruling. Being conservative here keeps you out of any dispute. Selling a single stock and rotating into a broad sector ETF that merely contains it, by contrast, carries low risk.

This switch technique is especially useful for dividend and index investors. If you run a long-term dividend ETF sleeve, pairing harvesting with the asset-allocation view in the SCHD dividend ETF guide makes the mechanics click.


Five common mistakes that actually destroy losses

Knowing the rule is not enough; in practice small oversights trip people up. Here are the ones that recur.

One: forgetting the purchase before the sale. The window runs both directions. A lot bought 30 days before you sell is enough on its own. Dollar-cost-averaging investors are especially exposed.

Two: leaving dividend reinvestment (DRIP) on. If dividends auto-reinvest, a distribution landing right after your loss sale buys a small amount and creates a partial wash sale. Even a small purchase disallows the loss proportionally.

Three: ignoring IRA auto-contributions. As emphasized above, an IRA repurchase destroys the loss permanently. Confirm that a name you are tax-loss selling is not on any IRA’s buy schedule.

Four: treating broker accounts in isolation. Sell at broker A, buy at broker B, and neither 1099-B catches it — but the IRS still aggregates, and the adjustment is your responsibility to report.

Five: assuming “close enough isn’t identical” and switching into an effectively identical fund. Two ETFs tracking the same index are not a gray area so much as a danger zone. When in doubt, choose a product on a genuinely different index.

If you run a growth-heavy US portfolio, volatile names see more cutting and rebuying, which raises your wash sale exposure. The sector view is covered separately in the AI stocks investment guide 2026.


The crypto exception: allowed now, but maybe not for long

For crypto investors the wash sale rule is an interesting quirk. As of 2026, US tax law treats cryptocurrency as property, not as a “stock or security” — and §1091 is written to apply only to stocks and securities. Read literally, bitcoin and ether fall outside the rule.

What that means in practice: you can sell crypto at a loss and rebuy it minutes later, and under current law still claim that loss for the year. Where a stock would force you to wait 31 days, crypto lets you harvest the loss without giving up a moment of market exposure. That is why crypto tax-loss harvesting is considered more flexible than the equity version.

But this is widely seen as a loophole, and there have been repeated legislative attempts to close it. Bills to bring crypto under the wash sale rule have been introduced more than once. They just have not passed yet, and the political mood can shift the rule at any time. So treat the crypto exception as valid today but not permanent, and check whether the law has changed each year before you build a harvesting plan around it.


The tie to tax-loss harvesting: the rule completes the strategy

Understanding why the rule exists ties everything together. Tax-loss harvesting is the legitimate practice of selling losers to offset gains and cut your tax bill. The problem it invites is obvious: an investor could book a loss purely for taxes and instantly rebuy to keep the position unchanged — nothing economically moved, but taxes dropped. The wash sale rule is the guardrail against exactly that maneuver.

So the wash sale rule is not the enemy of harvesting; it is the rule you harvest around. Done properly, harvesting looks like this. Sell the losing position. Immediately rotate into a similar but not substantially identical holding to keep market exposure. After 31 days, return to the original name if you wish. The loss is claimed, and no wash sale is triggered.

Restated as a principle: the goal of harvesting is to reduce tax, not to exit the market. That is why a replacement purchase almost always follows, and managing that purchase — the timing (31 days) and the security (not substantially identical) — is what completes the tax saving. Miss the rule and you land in the worst outcome: you took a real loss and got no tax benefit for it.



This article is for general information and educational purposes only and is not tax, legal, or investment advice. US tax rules (IRS regulations) depend on your residency status and account types and change over time. Before filing or making any investment decision, consult the current law and a qualified tax professional such as a US CPA.

What exactly is the wash sale rule?

It is IRS §1091, a tax rule that disallows a capital loss if you buy the same or a substantially identical security within 30 days before or after the loss sale. The loss is not usually gone forever in a taxable account; it gets added to the cost basis of the replacement shares, so the tax benefit is deferred rather than lost.

Why do people call it 61 days if the rule says 30?

The rule looks at 30 days before the sale and 30 days after the sale. Add the sale day itself and you get a 61-day window. A common mistake is watching only the days after your sale; a purchase made in the 30 days before you sell can trigger a wash sale too.

Does a wash sale make my loss disappear?

Not in an ordinary taxable account. The disallowed loss is added to the cost basis of the replacement shares, and the original holding period carries over, so you recover the benefit when you later sell those shares. The one exception where the loss vanishes permanently is when you repurchase inside a tax-advantaged account like an IRA.

What counts as a 'substantially identical' security?

The exact same stock is clearly covered, and so can be call options or convertible securities on that same company. Two ETFs that track different indexes from different issuers are generally not substantially identical. Two funds that both replicate the S&P 500, however, sit in a risky zone and are best avoided if you want to be safe.

Can I just sell the loser and buy a similar ETF right away?

Yes, this is the most common legal workaround. You realize the loss on one holding and immediately buy a comparable but not substantially identical fund, keeping your market exposure while claiming the loss. The key is choosing a replacement with a different issuer and a different tracked index so the two are not effectively the same product.

Is it safe if my spouse or my IRA does the buying?

No, it is actually more dangerous. The IRS combines purchases made by you, your spouse, and entities you control. Worse, if the replacement shares are bought in your IRA, the disallowed loss cannot attach to a taxable cost basis, so the tax benefit is lost permanently. This is the single most costly mistake under the rule.

Does the wash sale rule apply to crypto?

As of 2026 the rule does not apply to cryptocurrency in the US, because crypto is treated as property rather than as a 'stock or security,' which is the language §1091 uses. You can technically sell bitcoin at a loss and rebuy it minutes later and still claim the loss. Lawmakers have repeatedly proposed closing this gap, so it could change.

How does the wash sale rule relate to tax-loss harvesting?

Tax-loss harvesting is the legitimate strategy of selling losers to offset gains and reduce taxes, and the wash sale rule is the guardrail that stops that strategy from being abused. To harvest losses correctly you must manage the timing and the replacement security so you never trip the wash sale.

What if I sell 100 shares but only rebuy 30 within the window?

The wash sale applies proportionally to the shares you repurchase. If you sell 100 shares at a loss and buy back only 30 within 30 days, only the loss on those 30 shares is disallowed and deferred; the loss on the other 70 shares is fully allowed.

What is the safest way to avoid a wash sale at year-end?

The cleanest method is to wait at least 31 days after the loss sale before buying the same security again. If you do not want to lose market exposure, hold a similar but not substantially identical ETF during those 31 days, then rotate back. Remember to check the 30 days before your sale as well, not just after.

공유하기

관련 글