Tax-Loss Harvesting Explained: Turn Investment Losses Into Tax Savings
Tax-loss harvesting lets you sell losing investments to offset gains and up to $3,000 of income. Learn how it works, the wash sale rule, and how to do it step by step.

Nobody likes losing money on an investment. Tax-loss harvesting can at least turn a loss into a tax break. It's a simple strategy that investors with taxable brokerage accounts often use at year-end, as long as they avoid a few traps.
How it works
- You sell an investment that is worth less than you paid for it, "realizing" a capital loss.
- That loss offsets capital gains you realized during the year.
- If losses exceed gains, up to $3,000 ($1,500 if married filing separately) can offset ordinary income such as wages.
- Any remaining loss carries forward to future years indefinitely.
To stay invested, you can immediately buy a similar, but not substantially identical, investment.
A simple example
- Earlier this year you sold Fund A for a $6,000 short-term gain.
- Fund B is now down $9,000 from what you paid.
- You sell Fund B: the $9,000 loss wipes out the $6,000 gain, and the remaining $3,000 offsets ordinary income.
In the 22% bracket, that's about $1,320 saved on the gain and $660 on the income offset. Simplified example; state taxes not included.
Losses offset gains of the same type first (short-term against short-term, long-term against long-term). Short-term gains are taxed at higher ordinary rates, so offsetting them is especially valuable. See capital gains tax explained.
The wash sale rule
You can't claim a loss if you buy the same or a "substantially identical" security within 30 days before or after the sale (a 61-day window). The rule also applies if your spouse buys it, or if you buy it in your IRA.
A disallowed loss isn't gone forever: it's added to the cost basis of the replacement shares. But it defeats the purpose of harvesting now.
Ways to stay invested without a wash sale:
- Swap an S&P 500 fund for a total U.S. market fund (similar exposure, different index).
- Swap one individual stock for a sector fund.
- Wait 31 days, then buy back the original if you want it.
Watch out for automatic dividend reinvestment, which can trigger an accidental small wash sale.
When tax-loss harvesting makes sense
- You have realized gains this year, or ordinary income to offset.
- The investment's long-term prospects aren't the reason you're selling; you simply want the tax benefit while staying invested.
- You're in a higher tax bracket now than you expect to be later.
When it doesn't help
- Retirement accounts: losses in IRAs and 401(k)s can't be harvested.
- 0% capital gains bracket: if your gains are already taxed at 0%, you might prefer harvesting gains to raise your cost basis.
- High trading costs or large bid-ask spreads.
The catch: lower cost basis
Harvesting usually lowers the cost basis of your replacement investment, so you may owe more tax when you eventually sell it. In effect you defer tax. That still has value, especially if you hold until death (heirs generally receive a stepped-up basis) or donate the shares to charity.
Step by step
- Review your taxable account for positions with unrealized losses.
- Check realized gains so far this year (your brokerage's tax center shows them).
- Choose a replacement investment that isn't substantially identical.
- Sell and buy the replacement on the same day, before December 31.
- Turn off dividend reinvestment on the sold fund and avoid buying it back for 31 days.
- Keep records. Your Form 1099-B will report the sale.
It's one of several moves in our year-end tax checklist.
Key takeaways
- Selling at a loss offsets capital gains plus up to $3,000 of ordinary income per year.
- Unused losses carry forward indefinitely.
- Avoid the wash sale rule: no substantially identical purchase within 30 days before or after.
- It works only in taxable accounts, and it defers rather than eliminates tax.
Free download
Free 50/30/20 Budget Spreadsheet
Enter your take-home pay and expenses, and it splits your money into needs, wants and savings automatically.
- Works in Excel, Google Sheets and Numbers
- Built-in targets and "left to assign" tracker
- Plus short, practical money tips by email