Tax loss harvesting lowers your taxable income by using investment losses to offset gains
When you sell an investment at a loss, that loss can reduce the capital gains you report on your tax return. If you harvest losses strategically—selling underperforming positions and when ready reinvesting the proceeds—you can shrink your taxable income without shrinking your portfolio's long-term growth potential. The math is straightforward: a $5,000 loss offsets a $5,000 gain, dollar for dollar.
The real value emerges when you have more losses than gains in a given year. Excess losses can then reduce your ordinary income (like wages or business profit) by up to $3,000 per year. Any losses beyond that $3,000 threshold carry forward to future tax years, where they can offset future gains or ordinary income again.
This is not a loophole or a deferral trick. You are straightforward matching your actual investment results to your tax bill. The IRS allows it because you genuinely lost money. The timing and sequencing matter, though—and that is where most people either miss the benefit or stumble into the wash-sale rule.
Key Takeaways
- Capital losses offset capital gains dollar for dollar, reducing the gains you owe tax on.
- If losses exceed gains, you can deduct up to $3,000 of ordinary income per year, with the rest carrying forward indefinitely.
- Tax loss harvesting works best when you have significant gains in the same year or when you can use losses to offset ordinary income.
- The wash-sale rule blocks you from buying the same or substantially identical security within 30 days before or after the sale, or the loss is disallowed.
- Harvesting losses in taxable accounts is most valuable for high-income earners and those with large investment portfolios.
How losses reduce capital gains on your tax return
The IRS groups your investment sales into two categories: long-term capital gains (assets held over one year) and short-term capital gains (assets held one year or less). Long-term gains usually receive preferential tax rates. Losses also split into long-term and short-term, and they offset gains in a specific order.
Short-term losses first reduce short-term gains. Long-term losses first reduce long-term gains. Only after one category is exhausted do losses spill into the other. This matters because short-term gains are taxed as ordinary income (your marginal rate), while long-term gains receive lower rates. If you have a $10,000 short-term gain and a $10,000 long-term loss, the loss does not directly reduce your short-term gain—it reduces your long-term gains first, leaving the short-term gain untouched.
In practice, most people harvest losses from positions that have underperformed, which are often long-term holdings. If you also have long-term gains from winners you sold earlier in the year, the losses directly offset those gains, reducing your taxable gain and your tax bill.
When losses exceed gains: the $3,000 ordinary income deduction
Many years you will have more losses than gains—especially in down markets or if you are actively harvesting. Once all your capital gains are offset, you can deduct up to $3,000 of net capital losses against your ordinary income (wages, business profit, interest, dividends, rental income, and so on).
If your total losses are $8,000 and your total gains are $2,000, your net loss is $6,000. You deduct $3,000 against ordinary income this year. The remaining $3,000 carries forward to next year, where it can offset gains or ordinary income again. This carryforward has no expiration—you can use it whenever you have gains or income to offset.
For someone in the 24% federal tax bracket, a $3,000 deduction saves $720 in federal tax. In a 37% bracket, it saves $1,110. The value compounds if you harvest losses year after year and carry them forward, eventually using them all.
The wash-sale rule: the trap that disallows your loss
The wash-sale rule is the single biggest reason tax loss harvesting fails. If you sell a security at a loss and then buy the same security (or one that is substantially identical) within 30 days before or after the sale, the IRS disallows the loss. You cannot use it to reduce your taxable income that year, and the loss does not carry forward either. Instead, the loss amount is added to the cost basis of the replacement security, deferring the loss indefinitely.
The 30-day window runs from 30 days before the sale through 30 days after. So if you sell on January 15, you cannot buy the same stock from December 16 through February 14. Many people accidentally trigger this rule by selling a losing position and buying it back when ready, thinking they have harvested the loss while keeping their exposure intact.
The rule applies to the same security and to substantially identical securities. For individual stocks, "substantially identical" is clear—you cannot sell Apple and buy Apple. For mutual funds and ETFs, the IRS is stricter. Selling a total-market index fund and buying a different total-market index fund within 30 days may trigger the rule. The safest approach is to switch to a genuinely different fund or asset class for 31 days, then move back if you want.
Tax loss harvesting works best in taxable accounts, not retirement accounts
You cannot harvest losses in a 401(k), IRA, Roth IRA, or other tax-deferred account. Those accounts do not generate taxable gains or losses in the first place—all growth is sheltered from tax until withdrawal (or never, in a Roth). There is nothing to harvest.
Tax loss harvesting is a tool for taxable brokerage accounts: the ordinary investment account you open at a broker like Fidelity, Schwab, or Vanguard, where you pay tax on gains and losses each year. If most of your wealth is in retirement accounts, harvesting opportunities are limited to whatever you hold in taxable accounts.
This is one reason financial advisors often recommend maxing out retirement accounts first—they shelter gains from tax entirely. Once you have done that, a taxable account becomes valuable not just for flexibility, but for the ability to harvest losses and reduce your tax bill on the rest of your income.
When harvesting makes financial sense
Tax loss harvesting is most valuable when you have significant capital gains in the same year. If you sold winners early in the year and now face a large tax bill, harvesting losses from losers can offset those gains directly and reduce your bill dollar for dollar.
It is also valuable if you are in a high tax bracket and can use the $3,000 ordinary income deduction to reduce your overall taxable income. Someone earning $200,000 per year in the 24% federal bracket (plus state tax) will save more from a $3,000 deduction than someone earning $50,000 in the 12% bracket.
Harvesting is less valuable—sometimes not worth the effort—if you have no gains to offset and your income is low enough that the $3,000 deduction does not save much in tax. It is also less valuable if you harvest losses but then cannot reinvest the proceeds because you need the cash, since the whole point is to stay invested for long-term growth.
A third scenario where harvesting shines is when you are approaching retirement and expect your tax bracket to drop. Harvesting losses now and carrying them forward means you can use them in lower-income years ahead, when each dollar of deduction is worth more to you.
Reinvestment strategy after harvesting a loss
After you sell a losing position, you have $X in cash. The wash-sale rule requires you to wait 31 days before buying the same security back. During that month, you need to stay invested—otherwise you are out of the market and miss any rebound.
The standard move is to buy a similar but not identical security. If you sold a U.S. total-market index fund at a loss, you might buy a different U.S. total-market index fund from another provider, or a U.S. large-cap fund, or a blend of large-cap and mid-cap funds. After 31 days, you can switch back to your original fund if you want. You have harvested the loss and maintained your market exposure.
Some people use this as an opportunity to rebalance their portfolio or shift their asset allocation. If you were overweight in one fund and wanted to diversify anyway, harvesting a loss from that fund and reinvesting in something different accomplishes both goals at once.
Frequently Asked Questions
Can I harvest losses in a Roth IRA or 401(k)?
No. Retirement accounts do not generate taxable gains or losses. All growth inside them is tax-sheltered, so there is nothing to harvest. Tax loss harvesting only works in taxable brokerage accounts.
What happens if I accidentally trigger the wash-sale rule?
The loss is disallowed for that year and does not carry forward. Instead, the loss amount is added to the cost basis of the replacement security you bought. This defers the loss indefinitely, but you do not lose it entirely—you will eventually recognize it when you sell the replacement security.
Can I harvest losses from mutual funds and ETFs the same way as individual stocks?
Yes, but be careful with the wash-sale rule. The IRS considers some mutual funds and ETFs substantially identical if they track the same index. Selling a Vanguard total-market fund and buying an iShares total-market fund within 30 days may trigger the rule. Switching to a genuinely different fund (like a large-cap or international fund) is safer.
Do I need to report tax loss harvesting to the IRS?
You report it on Schedule D (Capital Gains and Losses) when you file your tax return. You list each sale, the gain or loss, and whether it is long-term or short-term. The IRS sees it automatically if your broker reports it, so you cannot hide it—nor do you need to. It is a legal tax strategy.
Can I harvest losses if I have no capital gains?
Yes. You can deduct up to $3,000 of net capital losses against ordinary income. Any losses beyond that carry forward to future years. This is valuable if you expect to have gains in future years or if you are in a high tax bracket and the $3,000 deduction saves you meaningful tax.