Home / Blog / taxes

The Wash Sale Rule: What Investors Get Wrong

Wash Sale Rule Explained

A guy named Tom emailed me in February 2023. He'd done his own tax loss harvesting in December, sold three positions at a combined $18,000 loss, felt very proud of himself. Then in early January, he bought back two of the same ETFs. "They're good funds," he explained. "I wanted to stay invested."

I had to tell him that the IRS wash sale rule just disallowed his entire $18,000 loss. Because he repurchased within 30 days, the loss got added to his cost basis instead of being deductible. He couldn't claim it. $18,000 of tax deductions, poof, gone.

He was not happy. I don't blame him. The wash sale rule is one of the most commonly misunderstood rules in investing, and it costs people thousands every year.

What the Rule Actually Says

IRS Section 1091: If you sell a security at a loss and buy the same or "substantially identical" security within 30 days before or after the sale, you can't claim the loss. Instead, the disallowed loss gets added to the cost basis of the new purchase.

Thirty days. Not 29. Not "business days." Thirty calendar days. And it applies to both directions: 30 days before the sale and 30 days after. So the total window is actually 61 days.

"Substantially identical" is intentionally vague. Selling SPY (S&P 500 ETF) and buying VOO (different S&P 500 ETF)? Probably substantially identical. Selling SPY and buying VTI (total stock market)? Probably fine. But the IRS hasn't given hard rules, so I play it safe.

Common Mistakes I See

Automatic dividend reinvestment is the sneakiest one. You sell a fund at a loss on December 15th for tax harvesting. Your December 20th dividend gets automatically reinvested. Boom, wash sale. The dividend reinvestment counts as a purchase.

Another one: selling in your taxable account while holding the same position in your IRA. The IRS considers purchases across all your accounts. Selling VTI in taxable and buying VTI in your IRA within 30 days? Wash sale.

And the spouse rule: if your spouse buys the same security within the 30-day window, that's also a wash sale. The IRS looks at it as essentially the same economic position.

How to Avoid It

My rule is simple: when I harvest a loss, I buy something different. Not slightly different, meaningfully different. Large-cap fund at a loss? I buy a total market fund. US fund? I buy an international fund. I stay invested in the market, just in a different slice of it.

After 31 days, I can switch back if I want. Usually I don't bother. The replacement fund is fine, and switching again creates another taxable event. But the option exists.

Before harvesting any loss, I check: no automatic reinvestment scheduled, no dividends coming in the next 30 days, no matching positions in other accounts. Takes two minutes, saves thousands.

The tax loss harvesting calculator on this site includes wash sale warnings. Use it. And if you're doing any significant harvesting, consider talking to a CPA. The rules are nuanced enough that professional advice pays for itself.

The Substantially Identical Problem

The IRS deliberately left "substantially identical" undefined. They want wiggle room to challenge aggressive positions. This creates uncertainty for investors.

Here's what I consider safe: switching between different index providers (Vanguard to iShares), switching between different indexes (S&P 500 to total market), switching between different asset classes (US large-cap to US small-cap).

Here's what I consider risky: switching between ETFs tracking the same index from different providers (SPY to VOO both track S&P 500). The IRS has never officially ruled on this, and most tax professionals think it's probably fine, but I don't risk it.

Wash Sales Across Accounts

The wash sale rule applies across all your accounts, including IRAs. Sell VTI in your taxable account at a loss, buy VTI in your IRA within 30 days? Wash sale. The loss is disallowed and added to the IRA's cost basis, which is meaningless since IRAs don't track basis the same way. Effectively, the loss just vanishes.

I almost made this mistake in 2022. Had my tax loss harvesting all planned out, then realized my automatic IRA contribution was scheduled to buy the same fund. Cancelled the IRA purchase, waited 31 days, then resumed. Close call.

Tracking and Record-Keeping

If you do any significant tax loss harvesting, you need a tracking system. I use a simple spreadsheet: date of sale, security sold, loss amount, replacement security, date of repurchase (if any), 31-day window end date. At year-end, I review for any accidental wash sales and hand the sheet to my CPA.

Your broker will report wash sales on Form 1099-B, but only for transactions within the same account. They won't catch cross-account issues or spouse transactions. That's on you to track.

Final Thoughts

Look, I'm just a guy in Denver with a spreadsheet habit and a dog who sheds too much. I don't have a crystal ball. I can't predict where the market is going next month or next year. Nobody can, despite what they might tell you on TV.

What I can do is show you the math. The numbers don't lie, even when we want them to. Compound interest works. Fees matter. Diversification protects you. Time is your greatest asset if you're young, and your greatest concern if you're not.

The tools on this site are free because I believe everyone deserves access to honest financial analysis. No sales pitch, no hidden agenda, no commissions. Just data and my occasionally sarcastic commentary.

If you take one thing from this article, let it be this: small decisions made consistently beat perfect decisions made occasionally. Start where you are. Use what you have. Do what you can. The rest is just compounding.

What I Learned from 14 Years in the Industry

After analyzing thousands of portfolios at three different firms here in Colorado, I've developed a few principles that guide everything I write on this site. These aren't fancy theories from textbooks. They're observations from real people with real money making real mistakes.

First, complexity is the enemy of execution. The more complicated your investment strategy, the less likely you are to follow it consistently. I've seen PhDs in mathematics fail at personal finance because they couldn't stop tinkering. Meanwhile, my neighbor who barely graduated high school built a $2 million portfolio using nothing but a target-date fund and automatic contributions. Simplicity wins because simplicity is sustainable.

Second, behavior matters more than knowledge. Everyone knows they should buy low and sell high. But when the market drops 30%, emotions take over. I've watched incredibly smart people panic-sell at the bottom and miss the recovery. The best investment strategy is the one you'll actually stick with when things get ugly. That's usually the boring strategy.

Third, fees are the only thing you can control. You can't control market returns. You can't control inflation. You can't control what the Federal Reserve does. But you can absolutely control how much you pay in investment fees. And over decades, that control is worth hundreds of thousands of dollars.

Cooper is scratching at the door now, which means it's time for our afternoon walk along the South Platte. Before I go, let me leave you with this: the best financial decision you can make today is the one you actually follow through on. Not the perfect theoretical strategy. The one you implement. The one you stick with. The one that becomes a habit.

That's just my take. I'm a guy with a spreadsheet and a shedding dog. Do your own homework. And if you found this helpful, try one of the calculators on this site. The numbers might surprise you.

Technology and Tax Loss Harvesting

Robo-advisors have made tax loss harvesting accessible to everyone. Wealthfront and Betterment offer automated tax loss harvesting for a fraction of what human advisors charge. Their algorithms scan your portfolio daily, identify loss opportunities, execute trades, and track everything.

The results are impressive. Wealthfront claims their tax loss harvesting adds about 1.2% to annual after-tax returns. That compounds over time. On a $100,000 portfolio over 20 years, that's potentially $80,000 in additional value from tax savings alone.

But automated harvesting isn't perfect. The algorithms can miss nuances. They might harvest a small loss that's not worth the transaction costs. They might not account for your specific tax situation. And they charge advisory fees (0.25% typically) that partially offset the savings.

Tax Loss Harvesting Calculator

Estimate your tax savings and avoid wash sale mistakes.

Calculate Savings

All data stays in your browser — we never see it.

I prefer manual harvesting for my own accounts. More control, no advisory fee, and I understand exactly what's happening. But for busy people who wouldn't harvest manually, robo-advisors are a solid option. Something is better than nothing.

Tools That Help

I built several free calculators on this site specifically to help with the concepts discussed in this article. They're all browser-based, no signup required, and your data never leaves your computer.

Try plugging in your actual numbers. Adjust the assumptions. See what happens when you change the time horizon or the rate of return. The best financial decisions are informed ones, and these tools give you the information you need.

If you find a bug or have a suggestion for a new calculator, email me at privacy@investcomparetool.org. I read every message, though it might take me a week or two to respond. Cooper keeps me busy.

M

About Marcus Thornton

Independent investment researcher based in Denver, Colorado. Former portfolio analyst with 14 years of experience. CFA charterholder. When not crunching numbers, you'll find him skiing the Rockies or fly-fishing the South Platte with his dog Cooper.

Marcus T.