Wash Sale Rules and How to Avoid Violations

Equicurious Teamintermediate2026-03-22

You sell a stock at a loss to harvest the tax benefit, then buy it back a few days later because you still like the thesis. The IRS says no — that loss is disallowed, and if you're not careful about the timing, you've created a phantom tax bill with no deduction to offset it. The wash sale rule under IRC Section 1091 trips up more investors than almost any other tax provision, and the penalties aren't a fine — they're the permanent loss of a deduction you thought you had.

TL;DR: The wash sale rule disallows a loss deduction if you buy substantially identical securities within 30 days before or after the sale. The loss isn't gone forever — it gets added to the replacement's cost basis — but violating the rule in an IRA can destroy the loss permanently.

The 61-Day Window (Why the Math Isn't What You Think)

Most investors hear "30 days" and think they need to wait a month. The actual window is 61 calendar days — 30 days before the sale, the sale date itself, and 30 days after. That "before" part catches people off guard.

Here's how it works in practice. You buy 200 shares of a stock on March 1. On March 20, you buy another 100 shares (maybe averaging down). On April 5, you sell the original 200 shares at a $4,000 loss. That March 20 purchase — which happened before the sale — falls within the 30-day pre-sale window. The IRS treats 100 of your 200 shares as a wash sale because you acquired 100 substantially identical shares within the lookback period.

The point is: the window runs in both directions from the sale date. If you're planning a tax-loss harvest in December, any purchases of the same security from early November through early January can trigger the rule.

How Brokers Count Days

Brokers count calendar days, not trading days. Weekends and holidays count toward the 30. Day 1 is the day after the sale (not the sale date itself), and you need to get through day 30 without repurchasing. If you sell on December 15, the safe date to repurchase is January 15 — assuming no purchase occurred between November 15 and December 14 either.

KEY INSIGHT: The wash sale rule uses trade dates, not settlement dates. Your trade date is the date the order executes, regardless of the T+1 settlement cycle.

What Counts as "Substantially Identical" (The Gray Zone)

The IRS has never published a definitive list of what qualifies as substantially identical. The statute is deliberately vague, which gives the IRS enforcement flexibility — and gives you uncertainty.

What's clearly substantially identical:

  • Same stock or bond. Selling and rebuying Apple (AAPL) is an obvious wash sale.
  • Options on the same underlying. Selling AAPL stock at a loss and buying AAPL call options within the window triggers the rule.
  • Contracts to acquire. Entering a forward contract or writing a cash-secured put on the same security counts as "acquiring" for wash sale purposes.

What's clearly NOT substantially identical:

  • Different companies in the same industry. Selling Coca-Cola (KO) and buying PepsiCo (PEP) is not a wash sale — they're different issuers with different fundamentals.
  • An index fund vs. individual stocks. Selling shares of Apple and buying an S&P 500 ETF is not a wash sale, even though the ETF contains Apple.
  • Bonds with different issuers, maturities, or coupon rates. A 10-year Treasury and a 5-year Treasury are not substantially identical.

The gray zone:

  • S&P 500 ETFs from different providers. Is selling SPY and buying IVV (both track the S&P 500) a wash sale? The IRS hasn't ruled definitively, but many tax professionals say it's risky — the underlying index, methodology, and economic exposure are essentially identical. Conservative practitioners avoid this swap.
  • Total market funds vs. large-cap funds. Selling a total stock market ETF (VTI) and buying a large-cap ETF (VOO) is generally considered safe because the compositions differ meaningfully (VTI holds ~3,600 stocks vs. VOO's 500).
  • Mutual fund vs. ETF of the same index. Selling Vanguard S&P 500 mutual fund (VFIAX) and buying the ETF version (VOO) from the same provider? This one is genuinely ambiguous, and cautious advisors treat it as a wash sale.

Why this matters: the penalty for getting the gray zone wrong isn't a fine — it's losing the loss deduction for the current year. If you're harvesting $20,000 in losses, the stakes are high enough to stay clearly on the safe side.

The Five Triggers That Catch Investors Off Guard

1. Automatic Dividend Reinvestment (DRIPs)

This is the single most common accidental wash sale. You sell a stock at a loss, but your DRIP is still active on the replacement or the original position. A few days later, a $47 dividend reinvestment buys a fractional share of the same security — and suddenly the entire loss (or a proportional share) is disallowed.

The fix: turn off DRIP reinvestment at least 31 days before any planned tax-loss harvest. Most brokers let you toggle this per position. It's a 30-second change that can save thousands in lost deductions.

Under IRS rules, the wash sale rule extends to your spouse's accounts. If you sell a stock at a loss in your account and your spouse buys the same stock in their account within the 61-day window, it's a wash sale. This applies whether or not you file jointly.

The point is: tax-loss harvesting requires household coordination, not just individual account management.

3. IRA and Roth IRA Repurchases (The Worst Trap)

This is the most punishing wash sale scenario. If you sell stock at a loss in your taxable brokerage account and repurchase it within 30 days in your IRA or Roth IRA, the loss is disallowed — and under Revenue Ruling 2008-5, the basis adjustment does NOT transfer to the IRA. The loss is permanently destroyed.

In a taxable-to-taxable wash sale, the disallowed loss at least gets added to the replacement shares' basis (you'll recover it eventually when you sell those shares). But IRAs don't track cost basis for tax purposes, so the basis increase vanishes into the retirement account and you never get the deduction.

REMEMBER: A wash sale between a taxable account and an IRA or Roth IRA permanently destroys the loss. There is no recovery mechanism. This is the single most expensive wash sale mistake an investor can make.

4. Year-End Tax-Loss Harvesting

December is prime season for wash sales because investors rush to harvest losses before year-end. The problem: if you sell on December 20 to capture a loss for the current tax year, you can't repurchase until January 20 (at the earliest). During that 30-day gap, the stock might rally 10-15%, and you've traded a tax deduction for a missed recovery.

The test: is the expected tax savings worth 30 days of exposure risk? For a $10,000 loss in the 37% bracket, the deduction is worth $3,700. You need to weigh that against the probability and magnitude of a rebound.

5. Automated Tax-Loss Harvesting Services

Robo-advisors that offer automated tax-loss harvesting (Wealthfront, Betterment, etc.) generally handle wash sales within their platform. But they can't see your other accounts. If you hold the same ETFs in a separate brokerage or 401(k), the automated selling can trigger wash sales the algorithm doesn't know about.

How Cost Basis Adjusts (The Loss Isn't Truly Lost — Usually)

When a wash sale occurs in a taxable-to-taxable transaction, the disallowed loss is added to the cost basis of the replacement shares. The holding period of the original shares also carries over.

Here's a worked example:

  1. You buy 100 shares at $50/share ($5,000 total cost)
  2. You sell all 100 shares at $40/share ($4,000 proceeds) — a $1,000 loss
  3. Within 30 days, you buy 100 shares at $42/share ($4,200)
  4. The $1,000 loss is disallowed. Your new cost basis becomes $42 + $10 = $52/share ($5,200 total)
  5. If you eventually sell at $55/share, your gain is $300 ($5,500 - $5,200), not $1,300

The point is: in taxable accounts, a wash sale doesn't eliminate the loss — it defers it by rolling the loss into the replacement's basis. You'll capture the benefit when you eventually sell the replacement shares (assuming you don't trigger another wash sale).

But this deferral has real costs. You lose the time value of the deduction, you may push the loss into a year with a lower marginal rate, and if you die holding the shares, the stepped-up basis at death wipes out the deferred loss entirely.

Reporting Wash Sales on Form 8949

Your broker reports wash sales on Form 1099-B using Box 1g (wash sale loss disallowed). When you transfer this to Form 8949:

  1. Report the sale on the appropriate line (Part I for short-term, Part II for long-term)
  2. In column (f), enter code "W" to indicate a wash sale adjustment
  3. In column (g), enter the disallowed loss as a positive number
  4. This effectively adds the disallowed loss back to your proceeds, zeroing out the deductible loss

What this means in practice: your broker does most of the heavy lifting. But brokers can only track wash sales within their own platform. If you have accounts at multiple brokers and trigger a cross-broker wash sale, you're responsible for making the adjustment yourself on your return.

When Brokers Get It Wrong

Brokers report wash sales on a best-effort basis within their platform, but they make mistakes — particularly with complex option strategies, short sales, and cross-account transactions within the same brokerage. Always review your 1099-B wash sale adjustments against your own records, especially if you trade actively.

ETF Substitution Strategies (The Smart Workaround)

The most common wash sale avoidance technique is selling one fund and immediately buying a similar but not substantially identical replacement. This lets you harvest the loss without being out of the market for 30 days.

Commonly used swap pairs:

SellingReplacementWhy It Works
SPY (S&P 500)VTI (Total Market)Different index, different composition
QQQ (Nasdaq-100)VGT (Info Tech Sector)Different index methodology
AGG (Total Bond)BND (Total Bond — different provider)Risky — same index, different issuer
EFA (Intl Developed)VEA (Intl Developed)Risky — very similar exposure

The test for any swap: would a knowledgeable investor see a material economic difference between the two positions? If the answer is no, don't rely on the swap surviving an audit.

KEY INSIGHT: The safest approach is to swap into a fund that tracks a genuinely different index — not just the same index from a different provider. Total stock market vs. S&P 500 is defensible. S&P 500 ETF vs. S&P 500 ETF from another issuer is a gamble.

Action Checklist

Essential (do these or you'll lose deductions)

  • Turn off DRIPs on any position you plan to harvest at least 31 days in advance
  • Coordinate with your spouse — check their accounts for the same securities
  • Never repurchase in an IRA/Roth within 30 days of a taxable loss sale
  • Mark your calendar with both the 30-day pre and post windows

High-Impact (saves meaningful money)

  • Use specific identification for tax lots so you control which shares you sell
  • Set up ETF swap pairs in advance so you can harvest without being out of the market
  • Review 1099-B wash sale adjustments annually against your records

Optional (for active traders and optimizers)

  • Track wash sales across brokers manually if you hold the same securities at multiple firms
  • Consider dedicated tax-lot tracking software (TradeLog, GainsKeeper) if you trade more than 50 times per year
  • Document your "substantially identical" reasoning for any gray-zone swaps

Your Next Step

Pull up your brokerage account and check which positions have DRIP reinvestment enabled. For any position you might want to harvest losses on before year-end, turn off the DRIP today. It takes 30 seconds and prevents the most common wash sale mistake investors make.

Related Articles