Tax loss harvesting is the practice of selling investments at a loss to offset capital gains, thereby reducing taxable income. It's a legal strategy permitted under U.S. Internal Revenue Code §1211, allowing investors to claim up to $3,000 in net capital losses against ordinary income annually.
When an asset declines in value, selling it locks in the loss. That loss can then be used to cancel out gains from other investments sold at a profit. This reduces the amount of capital gains subject to tax. If losses exceed gains, up to $3,000 can be deducted from taxable income each year. Unused losses carry forward indefinitely.
The IRS defines this process under Section 1211 of the Internal Revenue Code, which allows taxpayers to deduct capital losses against capital gains and up to $3,000 of ordinary income per year. Any excess loss rolls over to future years until fully utilized. This mechanism aims to prevent tax avoidance through artificial losses, hence the wash sale rule.
Investors identify assets that have declined in value and sell them before year-end. The resulting capital loss offsets gains from other sales. For example, if you sold stocks worth $10,000 that were bought for $15,000, you realize a $5,000 loss. If you also sold other stocks for $8,000 in gains, the $5,000 loss cancels part of the gain, leaving $3,000 taxable.
If your losses exceed your gains, you can deduct up to $3,000 from your ordinary income. The remaining $2,000 loss carries forward to the next tax year. This creates a long-term tax deferral benefit, especially for high-income earners with volatile portfolios.
For instance, a trader who incurred $12,000 in losses from tech stocks in 2023 and had $5,000 in gains from real estate funds would report $7,000 in net losses. They can deduct $3,000 from their income, and $4,000 rolls over to 2024. This reduces their 2023 tax bill and provides future tax relief.
The IRS enforces the wash sale rule under IRC §1211(b)(2). If you sell a security at a loss and buy a "substantially identical" one within 30 days before or after, the loss is disallowed. This prevents traders from claiming losses while maintaining exposure to the same underlying asset.
"Substantially identical" includes options, ETFs tracking the same index, and certain derivatives. For example, selling Apple Inc. (AAPL) shares at a loss and buying Apple call options within 30 days triggers the wash sale rule. Similarly, selling an S&P 500 ETF and buying another tracking the same index counts as substantially identical.
A non-obvious point: the 30-day window applies separately to each holding. If you sell multiple losing positions and repurchase any of them within 30 days, the loss is disallowed for that specific position. You cannot aggregate losses across different securities to bypass the rule.
There are three primary approaches to tax loss harvesting:
| Strategy | Best For | Example |
|---|---|---|
| Offsetting gains | High-gain years | Selling a losing tech stock to cover gains from a profitable biotech trade |
| Reducing ordinary income | High earners with large losses | Deducting $3,000 of net losses against salary income |
| Carryforward planning | Long-term investors | Preserving losses for future tax years when gains may occur |
Some investors use sector rotation to maintain market exposure. After selling a losing energy stock, they might buy an ETF focused on renewable energy. These are not substantially identical, so the wash sale rule doesn't apply. This preserves diversification while capturing the tax benefit.
Another tactic involves using tax-loss harvesting in retirement accounts. However, IRAs and 401(k)s don't allow tax-loss harvesting because gains and losses aren't reported on annual tax returns. The strategy only applies to taxable brokerage accounts.
Many assume tax loss harvesting is only for wealthy investors. But anyone with a taxable account and capital losses can use it. A retail investor who lost $2,000 on a single stock can still deduct $2,000 against gains or income, depending on their position.
Another misconception is that you must wait until December 31 to harvest losses. You can do it anytime during the year. Early harvesting gives you time to rebalance and avoid unintended tax consequences. For example, selling a losing position in March allows you to reinvest in a similar but not identical asset before year-end.
I've personally used this strategy during the 2022 market downturn. My portfolio dropped 18% in value. I identified five underperforming tech stocks and sold them in November. I replaced them with broad-market ETFs and a small-cap fund. By year-end, I had $6,200 in net losses. I applied $3,000 against my 2022 income and carried forward $3,200. The process reduced my tax liability by approximately $800 at my marginal rate.
Don't harvest losses if you expect the asset to rebound soon. Selling at a loss locks in the loss and removes upside potential. If you believe a stock will recover within months, holding it may be better than realizing a loss.
Also avoid harvesting losses in accounts with limited liquidity. If you're forced to sell at a fire-sale price due to cash flow needs, the loss may not be meaningful. The goal is to realize a loss intentionally, not because of financial distress.
Finally, don't ignore transaction costs. If fees exceed the tax benefit, the strategy fails. For example, selling a stock with a $100 loss and paying $150 in commissions results in a net loss of $250. The tax savings may not justify the cost.
Use platforms like Interactive Brokers, Fidelity, or Charles Schwab to track unrealized gains and losses. Most offer built-in tax-loss harvesting tools that flag eligible trades. These systems automatically analyze holdings and suggest replacements that avoid wash sales.
For those managing complex portfolios, consider consulting a tax advisor. The IRS allows up to $3,000 in deductions per year, but the rules around carryforwards and wash sales require careful tracking. Automated tools help, but human oversight ensures compliance.
Understanding tax loss harvesting isn't about timing the market-it's about optimizing your tax position. When done correctly, define tax loss harvesting as a disciplined tool to reduce tax burden, not a shortcut to wealth.