Here's a strange thing about investing: sometimes the best investment move you can make is to sell something at a loss. Not because you've given up on it — but because the tax benefit of that loss can be worth more than the loss itself. Tax-loss harvesting turns your losers into tax deductions, and those deductions reduce what you owe to the IRS. Done correctly, it can add meaningful percentage points to your after-tax returns every single year. The name sounds complicated, but the concept is actually pretty straightforward.
How Tax-Loss Harvesting Actually Works
When you sell an investment for less than you paid, you have a capital loss. That loss can offset capital gains you realized elsewhere in the same year. If your losses exceed your gains, you can deduct up to $3,000 per year against ordinary income — and any remaining loss carries forward to future years, indefinitely. So a $10,000 loss in a down year isn't just a paper loss. It's a real tax asset that reduces your tax bill this year or in the future.
Tax-loss harvesting means deliberately identifying investments that are currently at a loss and selling them to realize those losses intentionally. You then immediately buy a similar (but not "substantially identical") investment to maintain your market exposure. The IRS specifically forbids wash sales — where you sell at a loss and buy the same or a "substantially identical" security within 30 days before or after the sale — so you need to buy something that gives you similar economic exposure without being the same security.
For example, if you hold a total market index fund and it drops 15%, you could sell it and buy a S&P 500 index fund instead. The two funds track similar markets, so your investment exposure stays roughly the same, but you've now locked in a deductible loss. When you eventually sell the S&P 500 fund, that new position starts fresh with a new cost basis.
The Wash Sale Rule: The Fine Print That Matters
The wash sale rule is IRS Regulation Section 1091, and it's the compliance nightmare of tax-loss harvesting. The rule says that if you sell a security at a loss and buy the same or a "substantially identical" security within 30 days before or after the sale, the loss is disallowed and added to the cost basis of the new position.
This matters in ways that aren't obvious. If you sell your S&P 500 fund at a loss and buy a Total Market fund the same day, the IRS might consider those substantially identical. If you have the same fund in multiple accounts (a taxable brokerage and an IRA), selling in one and buying in the other within the window still triggers the wash sale. If your spouse buys the same security within the window, it can also be flagged. The 61-day window creates a lot of room for accidental violations.
The smart approach is to either harvest losses broadly across your portfolio, checking positions you hold in all accounts, or to use a systematic approach that maintains a buffer. Some investors use a "core and satellite" approach: the core holding stays put, and they harvest losses from the satellite positions. Others use exchange-traded funds rather than mutual funds, since ETFs have different wash sale treatment in some circumstances. Robo-advisors automate this process, which is part of why they became popular — they track every position and every account, automatically harvesting losses across your entire taxable portfolio.
Direct vs Indirect Matching
When you have multiple positions with both gains and losses, you get to decide how to match them up — at least for the timing of when you realize them. "Direct matching" means you pair specific losses with specific gains. If you have a stock that gained $5,000 and another that lost $5,000, you can sell both on the same day and the result is a wash: zero taxable gain, zero deductible loss. The IRS calls this "specific identification" — you tell your broker which shares you're selling, and they match them accordingly.
"Indirect matching" happens when you have losses and gains but you don't net them out immediately. You might have $5,000 in losses and $5,000 in gains spread across different securities over the course of a year. The IRS requires you to net them at tax time, but you get to choose the order of application: losses offset short-term gains first, then long-term gains, then up to $3,000 of ordinary income. Understanding the ordering rules can save you money, especially if you have a mix of short-term and long-term positions with different tax rates.
When Is Tax-Loss Harvesting Worth the Effort?
Tax-loss harvesting isn't free. It takes time, attention, and a solid understanding of your portfolio. It also means you might be selling something you believe in at a bad time, just to book a tax loss. There's a real psychological cost to that. And for small portfolios, the dollar benefit might not justify the complexity.
Here's a rough framework: if you're in the 22% tax bracket and you harvest $10,000 in losses in a given year, you save about $2,200 in federal taxes. That's meaningful. If you're in the 37% bracket, $10,000 in losses saves $3,700. The higher your marginal tax rate, the more valuable each dollar of harvested loss becomes. It also matters if you're realizing gains anyway — losses are most valuable when they offset gains that would otherwise be taxed at the highest rates.
For most people, the sweet spot is to check your portfolio once or twice a year for harvest opportunities, particularly at year-end when you can see your full picture of gains and losses for the year. If you're working with a financial advisor, many of them now run systematic tax-loss harvesting as part of their service. If you're DIY, there are tools and spreadsheets that can help you track your cost basis and identify positions with unrealized losses. Use our Investment Calculator to model how tax-efficient investing compounds over time versus a strategy where you ignore tax management entirely.