Stock Basics · Lesson 115/118 · Advanced · 10 min read

The Wash Sale Rule Explained: Why Rebuying Within 30 Days Kills Your Tax Loss

You Harvested a Loss in December. In May, the Deduction Was Gone.

Every December, investors holding US stocks go through their portfolios looking for positions still sitting on a loss. Selling one before year-end "locks in" that loss, which can then offset gains elsewhere and reduce the capital gains tax owed for the year. There's a trap in this strategy that anyone who files taxes with the IRS — US citizens, green card holders, and US tax residents — needs to understand. If you sell a losing position to realize the loss, then buy it back a few days later because you still like the stock, that loss can be disallowed entirely for that year's tax return. This is the wash sale rule. This lesson covers exactly what transaction it blocks, whether the loss disappears forever, and why the answer is different for investors who only file taxes in another country.

Why the Rule Exists: Blocking a Loss With No Real Economic Change

Tax-loss harvesting is meant to be a natural byproduct of genuinely changing your mind about a position. The problem is that nothing stops an investor from selling and immediately buying back the same security purely to generate a paper loss, while leaving their actual market exposure completely unchanged — same number of shares, same price, same bet. The IRS has long treated this kind of transaction as a loss with no real economic substance, and disallows the deduction for it. The rule is codified in Section 1091 of the Internal Revenue Code, and a transaction that falls under it is called a "wash sale." The logic is straightforward: if an investor's actual financial position hasn't meaningfully changed, the tax code won't treat it as if a loss occurred.

The 61-Day Window: 30 Days Before, 30 Days After

The wash sale rule is often shorthanded as "the 30-day rule," but the actual window spans 61 days — the 30 days before the sale date and the 30 days after it, with the sale date itself in the middle. Buying the same or a "substantially identical" security anywhere inside that 61-day window causes the loss from the sale to be disallowed for that tax year.

For example, if you sell a stock at a loss on November 15, the relevant window runs from October 16 through December 15. Buying even a single additional share of that same stock anywhere in that span triggers the rule. One detail trips up a lot of investors: the window runs both backward and forward from the sale date. If you'd already bought more shares in the 30 days before the loss sale — say, through a dividend reinvestment plan or a regular recurring purchase — that earlier purchase counts too, even though it happened before you decided to sell.

What Counts as "Substantially Identical"

The phrase that causes the most confusion in this rule isn't "same security" — it's "substantially identical." Buying back common stock in the same company obviously counts, and so does anything that recreates essentially the same economic exposure, such as buying a call option on the stock or exercising a put option you already held on it. On the other end, buying stock in a different company in the same industry is clearly not substantially identical and doesn't trigger the rule.

The genuinely gray area is ETFs. If you sell an S&P 500 index ETF at a loss and immediately buy a different S&P 500 index ETF from another issuer, is that a wash sale? The IRS has never issued clear guidance on this specific question. Tax professionals are split: a more conservative view holds that two funds tracking the identical index are substantially identical regardless of issuer, while a more liberal view argues that different expense ratios, structures, and tracking methods make them distinct securities. Because of that ambiguity, a common practical approach is to switch into a fund tracking a genuinely different index — for example, a total-market or Russell 1000 fund instead of another S&P 500 fund — which keeps the investment exposure similar while avoiding the dispute altogether.

A Practical Workaround: Keep the Exposure, Swap the Security

None of this means an investor has to sit out a sector entirely for 61 days after harvesting a loss. The most common practical workaround is to rotate into something similar in character but not substantially identical, holding the replacement through the window and then rotating back. Sell a specific semiconductor stock at a loss, for instance, and instead of buying it straight back, hold a broad semiconductor-sector ETF for the 61 days, then switch back to the original stock once the window closes. This preserves the broad "bet on this industry" thesis while legally buying a different security, so the wash sale rule never applies. The trade-off is real, though: if the stock or the sector rallies hard during those 61 days, the opportunity cost of being in the substitute instead of the original position can easily exceed whatever tax benefit was gained. The rule of thumb worth keeping in mind is that avoiding a wash sale should never become the reason for an investment decision — it's a tax-efficiency layer on top of a sell decision you'd already made, not the driver of it.

The Loss Isn't Gone — It's Deferred

A disallowed wash sale doesn't mean the loss disappears permanently. What actually happens is a deferral: the disallowed loss amount is added to the cost basis of the replacement shares, and the holding period of the original shares carries over to the new ones.

Here's a concrete example. Say you bought 100 shares at $50 each ($5,000 total), then sold them at $40 each ($4,000 total) for a $1,000 loss. Twenty days later, you buy back 100 shares of the same stock at $42 each ($4,200 total). This is a wash sale, so the $1,000 loss is disallowed on that year's return. Instead, that $1,000 gets added to the cost basis of the new shares — so instead of a $4,200 basis, your replacement shares carry an adjusted basis of $5,200 ($4,200 + $1,000). When you eventually sell those replacement shares, your gain or loss is calculated against that higher basis, meaning the deduction you couldn't take now effectively shows up later as a bigger loss (or smaller gain) whenever you finally exit the position. The tax benefit isn't destroyed — it's pushed down the road until you're out of the security for good.

The Trap Most People Miss: Switching Accounts Doesn't Help, and an IRA Repurchase Is Permanent

The wash sale rule isn't limited to a single brokerage account. It applies across every account you or your spouse controls — a different brokerage, a joint account, even a traditional or Roth IRA — all added together for the purpose of the 61-day test. Harvesting a loss in a taxable account and buying the same stock back in a retirement account around the same time doesn't avoid the rule just because the purchase went through a different window.

The far more serious trap is buying the replacement shares inside an IRA within the 61-day window. In that case, the loss isn't deferred — it's permanently disallowed. The deferral mechanism described above works by raising the cost basis of the replacement shares, but an IRA doesn't track and apply cost basis the way a taxable account does, so there's no mechanism left for that adjustment to ever flow through. The deduction is simply gone for good. This is worth keeping in mind specifically when planning where to rebuild a position after a loss sale.

Why This Doesn't Apply at All to Investors Who Only File Taxes in Korea

This is the point where investors based outside the US most often get confused. The wash sale rule is a provision of US domestic tax law that applies to "US persons" — US citizens, green card holders, and anyone who meets the IRS's substantial-presence test for tax residency. An investor who holds no US citizenship or green card, lives in Korea, and files taxes only with Korea's National Tax Service is not subject to this rule at all.

As covered in the lesson on Korean capital gains tax on overseas stocks, a Korean tax resident's gains and losses on overseas stocks are netted together across the calendar year, a 2.5 million won basic deduction is applied, and the remainder is taxed at 22%. Nothing in that calculation asks when you bought the replacement shares back. A Korean resident can realize a loss in December and buy the identical stock back the very next day with zero impact on how Korean tax law treats that year's net gain or loss. One wrinkle does cause confusion: because the trade itself is executed through a US brokerage on a US exchange, the broker's own tax documents (like a Form 1099-B) may still flag the transaction as a wash sale, simply because the broker applies US tax conventions uniformly across every account it services. That flag reflects the broker's own recordkeeping convention — it has no bearing on the actual Korean tax filing of someone with no US filing obligation. The reverse is also true: a US citizen living in Korea is still a "US person" regardless of residency, is taxed by the IRS on worldwide income, and remains fully subject to the wash sale rule no matter which country's brokerage they use.

It Doesn't Apply to Crypto — For Now

One notable exception is worth knowing. The wash sale rule's statutory language applies specifically to "stock" and "securities," and the IRS classifies cryptocurrencies like Bitcoin and Ethereum as property, not securities. Under current US tax law, that means you can sell crypto at a loss and buy it straight back without triggering the wash sale rule at all. That said, lawmakers in Congress have repeatedly introduced bills aiming to close this gap, so it would be a mistake to treat this exception as permanent.

Key Takeaways

  • The wash sale rule disallows a tax deduction when you sell a security at a loss and buy a "substantially identical" security back within 30 days before or after the sale — a 61-day window in total.
  • "Substantially identical" covers the same company's stock and things that recreate the same exposure, like call options on it; ETFs tracking the same index from different issuers remain a genuine gray area with no clear IRS guidance.
  • A disallowed loss isn't erased — it's added to the cost basis of the replacement shares and recovered when those shares are eventually sold. Rebuying inside an IRA breaks that mechanism, making the loss permanently lost instead of deferred.
  • The rule aggregates across every account you and your spouse control, so switching brokerages or accounts does not avoid it.
  • This is US domestic tax law that applies only to US persons (citizens, green card holders, US tax residents). An investor who files taxes only in Korea is not subject to it, even though a US broker's tax forms may still display a wash sale flag out of habit.
  • Cryptocurrency is currently classified as property rather than a security, so it sits outside the wash sale rule for now — though legislative proposals to extend the rule to digital assets keep resurfacing in Congress.

Frequently Asked Questions

Is it safe to just wait 31 days?

Counting forward from the sale date, yes — buying back on day 31 or later avoids the rule. But the window also looks backward 30 days from the sale date, so if you'd already bought additional shares before deciding to sell, that purchase still counts. Always check both directions from the sale date, not just the days afterward.

Is it fine to buy a different but similar stock instead?

Yes. The rule only applies to "substantially identical" securities, so buying a competitor in the same industry doesn't trigger it. Swapping between ETFs tracking the exact same index is murkier territory, as described above, so a more conservative approach — switching to a fund tracking a different index — is the safer path.

Does this apply to a US citizen living in Korea who invests through a Korean brokerage?

Yes. The wash sale rule is triggered by tax-filing status, not residency or brokerage location. US citizens and green card holders owe US tax on worldwide income no matter where they live or which broker they use, so the rule applies to them in full.

⚠️ This lesson is for educational purposes only and is not tax or investment advice. Whether a specific security is "substantially identical" and whether you are a "US person" for tax purposes can depend on individual facts. Consult a qualified tax professional (CPA/EA) before relying on any tax-loss harvesting strategy.