Articles

What Is a Wash Sale? The Rule Explained

A wash sale disallows a tax loss when you rebuy a substantially identical security within 30 days before or after selling it at a loss.

Kurumi Kurumi · · 4 min read
A financial trading dashboard showing charts and figures

A wash sale happens when you sell a security at a loss and buy a “substantially identical” one within 30 days before or after the sale — and when it happens, the tax code disallows the loss you were trying to claim. The rule exists to stop a specific maneuver: selling a losing position purely to book a tax deduction while immediately buying it right back, so your actual investment position never really changes.

The core mechanic

Say you hold shares that have dropped in value. You sell them, realizing a capital loss you can use to offset other gains — this is the basic move behind tax-loss harvesting. If you then buy back the same (or a substantially identical) security within 30 days of the sale — before or after, giving a 61-day window centered on the sale date — the loss is disallowed for tax purposes in that period. You still own the position; you just don’t get the tax benefit for having briefly sold it.

The disallowed loss isn’t gone forever. It gets added to the cost basis of the newly purchased shares, deferring the tax benefit until you eventually sell those replacement shares for good, outside any wash-sale window. In effect, the rule doesn’t eliminate the loss — it postpones it until the trade reflects a genuine change in position, not just a paper one.

What counts as “substantially identical”

The rule doesn’t only apply to buying back the exact same shares. Tax authorities generally treat “substantially identical” securities as covered too — the same company’s stock repurchased through a different account, for instance, or options and other derivatives tied to the same underlying security. What counts as substantially identical isn’t always crisp: two different companies in the same sector are not the same security even if their price movements are correlated, but a fund that closely tracks the same index as one you sold might raise the question. When the answer isn’t obvious, that’s a case for a tax professional rather than a guess.

The 30-day window also applies across your accounts, not just the one where you made the sale. Selling a stock at a loss in a taxable brokerage account and buying it back in an IRA within the window still triggers a wash sale — and in that scenario, the disallowed loss is permanently lost rather than added to a basis, since IRAs don’t track cost basis the same way taxable accounts do. Spouses filing jointly can also trigger a wash sale across each other’s accounts.

Why the 30-day window exists

Without a rule like this, an investor could sell a losing position on the last day of the year purely to realize a deductible loss, then buy it right back the next morning — capturing the tax benefit while never actually being out of the position for more than a day. The wash-sale rule forces a real commitment: either stay out of the position for over a month, or accept that the loss gets deferred rather than claimed immediately.

This matters most around year-end tax planning, when investors deliberately harvest losses to offset gains elsewhere in a portfolio before December 31. The temptation to immediately rebuy a stock you still believe in, right after selling it for the tax loss, is exactly the scenario the rule is written to catch.

How to avoid triggering it

The straightforward way to harvest a loss without a wash sale is to stay out of the exact position for the full 30-day window. If you want to maintain market exposure to the same sector or theme in the meantime, a common approach is buying a similar — but not substantially identical — fund or stock during the window, then optionally switching back afterward. This keeps you invested in roughly the same exposure without the two positions being considered the same security.

Comparing a broad-market index fund vs. an ETF tracking a different but related index is a common way to do this: sell one, hold a similar-but-distinct fund through the window, and decide afterward whether to switch back. The details depend on the specific funds involved, since two funds tracking sufficiently similar indexes can still raise the substantially-identical question.

Wash sales vs. ordinary losses

Ordinary capital lossWash sale
TriggerSell a security below cost basisSell at a loss, then rebuy within 30 days (before or after)
Tax treatmentLoss usable immediatelyLoss disallowed for now
What happens to the lossOffsets gains / limited ordinary incomeAdded to replacement shares’ cost basis
When it’s realizedThe tax year of the saleDeferred until replacement shares are sold outside the window
Cross-account?N/AYes — applies across your accounts, including a spouse’s

Why brokers track this for you (mostly)

Most brokers report wash sales on the tax forms they issue for securities held in a single account, adjusting reported cost basis automatically when a wash sale occurs within that account. What they typically can’t see is activity across multiple brokers, across a household’s separate accounts, or trades involving options and other related instruments — which is why the rule remains something investors doing active tax-loss harvesting need to track themselves, particularly near year-end when harvesting activity clusters.

The takeaway

The wash-sale rule doesn’t ban selling and rebuying a stock — it disallows claiming the tax loss when you do it within 30 days on either side of the sale, and instead rolls that loss into the replacement shares’ cost basis for later. Understanding the 30-day window, what counts as “substantially identical,” and the fact that it applies across your accounts is what separates a real tax-loss harvest from one the tax code will unwind for you at filing time.

Kurumi Kurumi · · 4 min read

What Is a Credit Rating? How Bond Ratings Work

A credit rating is a letter-grade opinion on how likely a borrower is to repay debt, set by agencies like S&P, Moody's, and Fitch.

#Finance #Markets #Investing
Kurumi Kurumi · · 4 min read

What Is Arbitrage? Risk-Free Profit, Explained

Arbitrage is profiting from a price gap for the same asset in different markets, buying low and selling high nearly simultaneously with minimal risk.

#Finance #Markets #Investing
Kurumi Kurumi · · 4 min read

What Is a DRIP? Dividend Reinvestment Plans

A DRIP automatically reinvests cash dividends into more shares, often commission-free, compounding returns without a manual trade each time.

#Finance #Markets #Investing