Tax Loss Harvesting Guide: How It Works, Rules, and Strategies
Tax loss harvesting is a tax-planning technique that lets investors turn paper losses into real tax savings. By selling investments that have dropped in value, you can offset capital gains from other sales, reduce your taxable income, and even carry unused losses into future years. It's one of the few tools in a buy-and-hold investor's toolkit that can improve after-tax returns — without requiring you to fundamentally change your long-term strategy. In this guide, we'll cover the basics, walk through a concrete example, and highlight the rules and pitfalls you need to know.
What Is Tax Loss Harvesting?

Tax loss harvesting is the practice of selling a security at a loss to realize a capital loss for tax purposes. In the eyes of the IRS, you don't owe tax on gains until you sell, and you can't deduct a loss until you sell. By selling a losing position, you convert an unrealized loss into a realized loss, which can be used to offset other taxable gains.
This strategy is only relevant in taxable (non-retirement) accounts. In tax-advantaged accounts like IRAs or 401(k)s, investment gains and losses do not create taxable events each year, so there's no immediate tax benefit from harvesting losses.
The IRS allows capital losses to offset capital gains in full. If total losses exceed total gains, you can deduct up to $3,000 ($1,500 if married filing separately) against ordinary income like wages or interest. Any unused loss is carried forward to future years, indefinitely, to offset gains or ordinary income. That's a powerful benefit — if you have a large loss this year, you could use it to reduce taxes for many years to come.
How Tax Loss Harvesting Works
Let's walk through a simple example. Suppose you bought 100 shares of TechCo at $50 each in January. By October, the shares are worth $30, so your position is down $2,000. If you sell those shares, you realize a long-term capital loss of $2,000 (assuming holding period >1 year). Now, imagine you also sold shares of RetailCorp this year and realized a $5,000 short-term capital gain. Without harvesting the loss, you'd owe tax on the entire $5,000 gain. With the loss, your net gain is reduced to $3,000 ($5,000 gain – $2,000 loss). If you're in the 24% tax bracket for short-term gains, you've just saved $480 in federal taxes ($2,000 × 24%).
Now suppose you have no capital gains at all. The $2,000 loss can be used to offset up to $2,000 of ordinary income, lowering your tax bill by 12% to 37% depending on your marginal rate. If your loss is greater than $3,000, the remainder carries over to the next tax year. For example, a $10,000 loss can offset $3,000 in year one, and the remaining $7,000 is available for future years, subject to the same $3,000 annual limit for ordinary income.
It's also important to understand the order in which the IRS applies losses. Short-term losses are first used to offset short-term gains, while long-term losses are first used to offset long-term gains. If losses remain, they can offset gains of the other type. This matters because short-term gains are taxed at ordinary income rates (up to 37%), while long-term gains are taxed at preferential rates (0%, 15%, or 20%). If you have both short-term and long-term losses, the IRS will match them in a way that minimizes your tax benefit, so planning which losses to harvest can be important.
Rules and Limitations: The Wash-Sale Rule
The most critical rule in tax loss harvesting is the wash-sale rule. It prevents investors from claiming a tax loss while retaining the economic benefits of the investment. Under the rule, if you sell a security at a loss and buy a 'substantially identical' security within 30 days before or after the sale, the loss is disallowed for tax purposes. The entire loss is not lost permanently — it is added to the cost basis of the new shares. This means the loss is effectively deferred until you sell the replacement shares in a later year.
Example to illustrate: You own 100 shares of a large-cap ETF and sell them on December 15 at a $4,000 loss. If you buy 100 shares of the same ETF on December 20, your loss is disallowed. Instead, the $4,000 loss is added to the cost basis of the new shares. If you later sell those shares at $50, your cost basis would be $90 per share, reducing any future gain (or increasing any future loss) accordingly.
The wash-sale rule applies to purchases made in any account you control, including individual retirement accounts. That's a trap: if you sell a losing stock in your taxable account and buy the same stock in your IRA within 30 days, the loss is disallowed. Also, the 30-day window includes both before and after the sale date — so you can't buy the same security a week before selling it and still claim the loss.
To avoid a wash sale, you can:
- Wait at least 31 days before rebuying the same security.
- Choose a replacement investment that is similar but not 'substantially identical.' For example, you might swap an S&P 500 index fund for a total market index fund. That said, the IRS has never clearly defined 'substantially identical,' so conservative investors should select funds with different holdings or different providers.
Strategies for Effective Tax Loss Harvesting
- Harvest in taxable accounts only. Losses in retirement accounts don't produce usable tax losses.
- Target positions with meaningful losses. Don't harvest a $5 loss — the tax benefit is small relative to transaction costs.
- Reinvest within the same market segment — but not in a substantially identical fund — to maintain exposure. This is often called 'tax loss harvesting' and involves swapping one fund for another that follows a similar index or sector.
- Use losses to rebalance your portfolio. If you're overweight in a particular asset class, sell some of the positions at a loss and use the proceeds to buy underweight assets.
- Consider your holding period and future capital gain plans. You might choose to realize losses this year to offset gains you expect next year, but the $3,000 ordinary-income limit applies each year.
- Track your carryover losses. Use Form 8949 and Schedule D to report your transactions and carryover amounts accurately. The IRS provides a worksheet in the Schedule D instructions.
- Be mindful of year-end timing. Trades must execute by the final trading day of the year to count for that tax year. Also, watch out for mutual fund capital gain distributions that occur in December — harvesting losses before those distributions can help offset them.
Common Mistakes to Avoid
- Respect the wash-sale rule — even inadvertently. A common mistake is rebuying the same security in a different account, including an IRA, within 30 days.
- Don't harvest losses just to lower taxes if it disrupts your investment plan. The goal is after-tax returns, not tax avoidance at the expense of good long-term decisions.
- Ignoring transaction costs. If your commission is $20, a $200 loss may not be worth harvesting unless the loss can offset significant gains.
- Not accounting for the $3,000 limit. If you have a $10,000 loss, you can't deduct it all in one year — only $3,000 against ordinary income (though carryover is allowed).
- Selling a security you don't really want to sell and then being forced to wait 31 days to buy it back — this could leave you out of the market during a rally.
- Forgetting to adjust your records for wash-sale disallowances. The increased cost basis of replacement shares must be tracked or you'll overpay tax later.
Bottom Line
Tax loss harvesting is a straightforward yet useful way to reduce your tax liability on investments. It allows you to turn losing positions into tax savings, either by offsetting gains or by deducting up to $3,000 of ordinary income each year. While the strategy is simple in theory, implementation requires attention to the wash-sale rule, an understanding of capital gain and loss ordering, and careful tracking for your tax return. For most investors, it's worth doing, but only if it aligns with your broader investment goals and doesn't expose you to unnecessary risk. When in doubt, consult with a qualified tax professional.
Frequently Asked Questions
What is the wash-sale rule and how does it affect tax loss harvesting?
The wash-sale rule disallows a loss if you buy a substantially identical security within 30 days before or after the sale. The disallowed loss is added to the cost basis of the new shares, so the loss isn't lost — it's deferred until you sell the replacement security.
Can tax loss harvesting reduce ordinary income, not just capital gains?
Yes. If your capital losses exceed your capital gains, you can deduct up to $3,000 ($1,500 if married filing separately) against ordinary income each year. Any remaining loss carries over to future years.
Does tax loss harvesting apply to retirement accounts?
No. Only taxable, non-retirement accounts produce capital gains and losses that are reported to the IRS. Losses inside IRAs or 401(k)s do not create tax deductions or offsets.

