← Back to Academy

Tax-Loss Harvesting Explained

Unction Trade Academy•7 min read•Updated September 2026

Not every part of investing is about picking winners. Tax-loss harvesting is the deliberate practice of selling an investment that's lost value, using that loss to offset gains elsewhere, and lowering what you owe the IRS in the process. It's one of the few strategies where a losing position can still work in your favor.

The Basic Mechanics

When you sell an investment for less than you paid for it, that's a capital loss. The IRS allows you to use that loss to offset capital gains you've realized elsewhere in the same tax year, dollar for dollar. If your losses exceed your gains, you can use up to $3,000 of the excess to offset ordinary income each year, and carry any remaining loss forward into future tax years indefinitely.

Step 1
Identify a position trading below what you paid for it
Step 2
Sell it, realizing the loss for tax purposes
Step 3
Use the loss to offset gains, then up to $3,000 of ordinary income

The Wash Sale Rule

Here's where most beginners trip up. The IRS's wash sale rule disallows the loss if you buy the same security, or one considered "substantially identical," within 30 days before or after the sale. Buy back into the exact same ETF the next day, and the loss you thought you'd banked gets disallowed. The rule exists precisely to prevent people from selling purely to harvest a tax loss while keeping their actual market position unchanged.

Common workaround: instead of buying back the exact same fund immediately, investors often rotate into a similar but not "substantially identical" fund, for example selling one S&P 500 ETF and buying a different provider's S&P 500 ETF or a total-market fund. This keeps market exposure roughly intact while staying outside the wash sale window. Whether two funds count as substantially identical isn't always clear-cut, and a tax professional's judgment matters here.

Short-Term vs. Long-Term Losses

Losses are categorized the same way gains are: short-term for positions held one year or less, long-term for positions held longer. The IRS requires short-term losses to first offset short-term gains, and long-term losses to first offset long-term gains, before any leftover loss can cross over to offset the other category. Since short-term gains are typically taxed at higher ordinary income rates, harvesting a short-term loss to offset a short-term gain often delivers the larger tax benefit.

Why Timing Matters

Tax-loss harvesting is often discussed as a year-end move, but losses can be harvested any time a position is down, not just in December. Waiting until the final weeks of the year to review your whole portfolio at once is common practice, but it also means less time to manage the wash sale window carefully if you want to stay invested in a similar position.

It's a Tax Strategy, Not an Investment Thesis

The strategy makes the most sense when the tax benefit doesn't come at the cost of your actual investment plan. Selling a fundamentally sound long-term holding purely to harvest a temporary paper loss, then scrambling to find a replacement that satisfies the wash sale rule, can introduce complexity and risk that outweighs the tax savings for a smaller portfolio. It tends to matter most for investors with meaningful realized gains elsewhere to offset.

Track Your Cost Basis and Gains

Log your positions and see which ones are sitting at a loss right now.

Open the Trade Journal →

Frequently Asked Questions

Does tax-loss harvesting apply to retirement accounts like a 401(k) or IRA?
No. Because gains and losses inside tax-advantaged retirement accounts aren't taxed as they occur, there's nothing to harvest. Tax-loss harvesting only applies to taxable brokerage accounts.
How long is the wash sale window exactly?
61 days total: 30 days before the sale, the day of the sale, and 30 days after. Buying the same or a substantially identical security anywhere in that window disallows the loss.
Can I carry losses forward if I don't use them all this year?
Yes. Any capital loss beyond what offsets your gains and the $3,000 income allowance carries forward to future tax years indefinitely, until it's fully used.
Is tax-loss harvesting the same as tax avoidance?
It's a legal, IRS-sanctioned strategy for managing when and how you recognize losses, not a way to avoid taxes owed on actual gains. It's generally best approached with guidance from a tax professional given how the wash sale rule and carryforward calculations interact with your specific situation.

Related Reads

This article is for educational purposes only and does not constitute investment, financial, or tax advice. Unction Trade is not a registered investment advisor. See our full Investment Disclaimer.