When an investment in a regular taxable brokerage account drops below what you paid, you can sell it, record the loss, and use that loss to cut your taxes. You then put the money into something similar so you stay invested. That’s tax-loss harvesting. It only applies to taxable accounts. Losses inside an IRA, 401(k) or HSA don’t count for this.
The catch is a rule meant to stop people from selling and buying back the same thing just for the tax break. That’s the wash-sale rule, and most mistakes come from it.
How losses reduce your taxes
Capital losses first offset capital gains. Short-term losses (on investments held one year or less) offset short-term gains first, and long-term losses offset long-term gains first, then any leftover crosses over.
If your losses are bigger than your gains for the year, you can deduct up to $3,000 of the net loss against ordinary income like wages, or $1,500 if you’re married filing separately. Anything beyond that carries forward to future years with no expiration.
Here’s a simple example. In March you sold some stock for a $4,000 long-term gain. In October, an index fund you bought earlier in the year for $20,000 is worth $14,000. If you sell it, the $6,000 short-term loss wipes out the $4,000 gain, and the remaining $2,000 reduces your ordinary income. At a 22% federal bracket, the $2,000 alone saves $440, and the gain you didn’t pay tax on saves more.
The wash-sale rule
You can’t claim the loss if you buy the same or a “substantially identical” security within 30 days before or after the sale. That’s a 61-day window centered on the sale date.
If you trigger it, the loss isn’t gone forever. It’s disallowed for now and added to the cost basis of the new shares you bought. You’ll get the benefit when you eventually sell those shares, but not this year, which defeats the point of harvesting.
The rule catches more than people expect:
- Purchases before the sale count. Buying more shares 20 days before selling at a loss is a wash sale, not just buying after.
- Automatic reinvestment counts. If the fund pays a dividend that reinvests during the window, that small purchase can make part of your loss a wash sale. Turn off dividend reinvestment on that holding before harvesting.
- Your other accounts count. Buying the same fund in your IRA within the window triggers the rule, and in that case the IRS has said the loss isn’t added to the IRA’s basis. It’s simply lost.
- Your spouse counts. A purchase by your spouse can trigger it too.
- Brokers only track what they see. Your broker reports wash sales within one account, but not across different brokers or your spouse’s accounts. Keeping track is your job.
Staying invested without breaking the rule
The usual approach is to sell the losing fund and immediately buy a fund that’s similar but not substantially identical. For example, people often swap an S&P 500 index fund for a total U.S. stock market fund, or a fund from one company for a fund tracking a different index from another. The IRS has never published an exact definition of “substantially identical” for funds, so there’s some judgment involved. Swapping a fund for a different share class of the same fund is risky. Swapping between funds that track different indexes is the common, more cautious choice.
After 31 days, you can switch back if you want, or just keep the replacement fund.
When it isn’t worth doing
Harvesting lowers your cost basis on the new investment, so you may pay more tax when you sell it later. The benefit comes from deferring that tax, from using losses against short-term gains taxed at higher rates, and from the $3,000 a year against ordinary income. It’s not free money.
- If you’re in the 0% long-term capital gains bracket, you may want to harvest gains instead of losses, since you can raise your basis tax-free.
- If the loss is small, say $150, the effort and the risk of a wash-sale mistake may not be worth it.
- If the replacement fund has a much higher expense ratio, the extra cost over years can eat the tax savings.
Keep a simple log of every harvest: date sold, what you sold, the loss, and what you bought instead. When tax season comes, compare it with your Form 1099-B. If the 1099-B shows a wash-sale adjustment you didn’t expect, the log will help you figure out which purchase caused it.
This post is general information, not financial advice.