You sold some shares at a loss last month, feeling clever about locking in a tax deduction. Then, a week later, you bought the same stock again because you still believed in the company. Guess what? That clever tax move just vanished. The IRS calls this a "wash sale," and their 30-day rule is the single biggest trap for investors trying to do tax loss harvesting. Get it wrong, and you lose the deduction entirely. I've seen it happen too many times, even to savvy people.
What You’ll Learn
What Exactly Is the 30-Day Wash Sale Rule?
Let's strip away the jargon. Tax loss harvesting is selling an investment that's down to realize a capital loss. You can use that loss to offset capital gains or even up to $3,000 of ordinary income each year. It's a powerful tool.
The wash sale rule (Internal Revenue Code Section 1091) is the IRS's way of saying, "You can't just sell for a tax break and immediately buy back the same thing." It disallows the loss if you buy a "substantially identical" security 30 days before or after the sale. That 61-day total window (30+1+30) is critical.
The Nuts and Bolts: Time Windows and "Substantially Identical" Securities
Most people know about the 30 days after. The 30 days before is the silent killer. You buy more shares on October 1st. The stock drops, and you sell the original lot for a loss on October 15th. That loss is disallowed because you bought the "replacement" shares 14 days before the sale.
Now, "substantially identical." This is where interpretations get fuzzy and mistakes happen.
- Clearly Identical: Selling Apple (AAPL) stock and buying Apple (AAPL) stock. This is a textbook wash sale.
- Usually Safe Swaps: Selling an S&P 500 ETF from one provider (like IVV) and buying another S&P 500 ETF from a different provider (like VOO). The IRS hasn't explicitly blessed this, but the consensus among tax professionals is that they are not substantially identical because they track the same index but are different legal entities with different structures.
- The Gray Zone: Selling shares of a company and buying deep-in-the-money call options of the same company. Many experts argue this is substantially identical. I'd avoid it.
The rule also applies across all your accounts—taxable, IRA, Roth IRA, even your spouse's accounts. Buying the security in your IRA within the window still triggers the wash sale. This is a trap.
| Your Action | Within 30-Day Window? | Wash Sale Triggered? | What Happens to Your Loss? |
|---|---|---|---|
| Sell VTI for a loss, wait 31 days, buy VTI again. | No | No | Deductible. You waited out the full period. |
| Sell VTI for a loss, buy VTI 15 days later. | Yes | Yes | Disallowed. The loss is added to the cost basis of the new shares. |
| Buy more VTI, sell original VTI shares at a loss 20 days later. | Yes (bought BEFORE) | Yes | Disallowed. The pre-sale purchase kills it. |
| Sell VTI for a loss in taxable account, buy VXUS (Total International Stock ETF) next day. | N/A | No | Deductible. Not substantially identical. |
| Sell VTI for a loss, spouse buys VTI in their IRA 10 days later. | Yes | Yes | Disallowed. Spousal accounts are included. |
A Step-by-Step Guide to Harvesting Losses Without Getting Washed Out
Let's walk through a real scenario. Meet John. He has 100 shares of TechGiant Inc. (Ticker: TECH) bought at $150/share, now trading at $100. He wants to harvest the $5,000 loss but remains bullish on the sector.
Step 1: Identify the Loss and the 61-Day Calendar
John checks his purchase history. Did he buy any TECH shares in the last 30 days? No. Good. He marks his calendar: The day he sells is Day 0. He cannot buy TECH again until Day 31.
Step 2: Find a Suitable Replacement (The Pivot)
John doesn't want to be out of the market. He needs a security that isn't "substantially identical" but keeps his portfolio's risk profile similar. He looks at a competitor, CloudMajors Corp (CLOD), or a tech sector ETF like XLK. He chooses XLK because it's diversified and tracks the sector, not a single company.
He sells all 100 shares of TECH at $100, realizing a $5,000 capital loss. Immediately, he invests the $10,000 proceeds into shares of XLK.
Step 3: The Waiting Game and Reversion
John waits 31 full days. On Day 32, he has a choice. He can stick with XLK if he's happy. Or, if he strongly prefers TECH, he can sell XLK (which may have a gain or loss) and buy back TECH. This second sale triggers a new taxable event, but the original $5,000 loss is safely locked in.
John's tax saving? If he's in the 24% federal bracket and uses the loss to offset ordinary income, he saves $1,200 on his tax bill ($5,000 * 24%). Not bad for a bit of paperwork.
Advanced Strategies and the Mistakes Everyone Makes
Here's where experience talks. The basics are simple. The execution is messy.
Dividend Reinvestment (DRIP): This is the #1 automated mistake. You turn off loss harvesting in December, but your DRIP automatically buys more shares on December 15th. If you sold for a loss on December 20th, wash sale. You must suspend DRIP in any security you plan to harvest at least 31 days before and after.
The "Substantially Identical" Blind Spot with Mutual Funds: Selling a Vanguard S&P 500 index fund and buying the Fidelity S&P 500 index fund is likely safe. But selling a Vanguard Total Stock Market Index fund and buying a Fidelity Total Stock Market Index fund? That's even safer, but the logic is the same. The real danger is assuming two different "Total Market" funds are identical—they might track slightly different indexes. Check the index they follow.
Tax-Lot Accounting Specifics: If you trigger a wash sale, the disallowed loss isn't gone forever. It's added to the cost basis of the replacement shares you bought. This defers the loss until you eventually sell those new shares. Your brokerage should track this on Form 1099-B, but don't blindly trust them. Keep your own records.
My non-consensus take? People obsess over avoiding the 30 days after but completely ignore the 30 days before. They also forget about retirement accounts. I once reviewed a portfolio where someone was meticulously harvesting in their taxable account but had automatic monthly purchases set up in their Roth IRA. They were violating the rule every single month without knowing it. The brokerage won't flag cross-account wash sales on your tax form.
Leave a Comment