Tax-loss harvesting is the practice of selling investments that have declined in value to realize a capital loss, then using that loss to offset capital gains elsewhere in your portfolio — reducing your tax bill. You can then reinvest the proceeds in a similar (but not identical) investment to maintain your portfolio’s market exposure.
It sounds counterintuitive to deliberately sell a losing investment, but the tax savings can be substantial — especially for investors in higher tax brackets with significant taxable brokerage accounts.
How Tax-Loss Harvesting Works
Here is a step-by-step example:
- You buy 100 shares of a technology ETF for $10,000. The ETF drops to $7,000 — an unrealized loss of $3,000.
- You sell the ETF and lock in the $3,000 capital loss.
- Immediately, you use the $7,000 proceeds to buy a different (but correlated) ETF — say, a different broad technology or total market ETF. Your market exposure stays roughly the same.
- The $3,000 capital loss offsets $3,000 of capital gains elsewhere — eliminating or reducing the tax on those gains.
If your capital losses exceed your capital gains in a given year, you can deduct up to $3,000 of the net loss against ordinary income. Any remaining losses carry forward to future tax years indefinitely.
The Tax Math
The value of a harvested loss depends on your tax rate:
- If you have $10,000 in long-term capital gains taxed at 15%, you owe $1,500 in tax.
- If you harvest $10,000 in losses to offset those gains, you owe $0.
- Tax savings: $1,500.
For short-term capital gains (assets held less than one year), which are taxed at ordinary income rates, the benefit is even larger for high earners. A taxpayer in the 37% bracket who harvests $10,000 in losses against short-term gains saves $3,700.
The Wash-Sale Rule: The Most Important Constraint
The IRS does not allow you to sell an investment for a loss and then immediately buy back the same or a “substantially identical” security. This is the wash-sale rule. If you violate it, the loss is disallowed — you cannot claim it on your taxes.
The wash-sale window is 30 days before and 30 days after the sale. That is a 61-day window during which you cannot hold the same or substantially identical security.
What counts as “substantially identical”? The IRS has not provided a precise definition, but the general principle is:
- Selling a stock and buying the same stock back: wash sale
- Selling an S&P 500 index fund and buying a different S&P 500 index fund from another provider: likely a wash sale (same underlying index)
- Selling an S&P 500 fund and buying a total market fund: generally not a wash sale (different index, different holdings)
- Selling an individual stock and buying a diversified ETF in the same sector: generally not a wash sale
The safe approach is to swap into a fund that tracks a different but highly correlated index — for example, selling a Vanguard S&P 500 fund (VOO) and buying a total stock market fund (VTI), or swapping between similar-but-not-identical bond funds.
When Tax-Loss Harvesting Adds the Most Value
Tax-loss harvesting is most valuable when:
- You are in a high tax bracket (32% or above)
- You have significant realized capital gains in the same year to offset
- You are in a down market with multiple positions at a loss
- You hold investments in a taxable brokerage account (not an IRA or 401(k), where gains are already tax-deferred)
It adds less value if you are in a low tax bracket (0% long-term capital gains rate applies at lower income levels) or if your only accounts are tax-advantaged retirement accounts.
Tax-Loss Harvesting Is a Deferral, Not a Permanent Elimination
An important nuance: tax-loss harvesting defers taxes rather than eliminating them. When you sell the replacement investment, it has a lower cost basis (the price you paid after the swap). When that investment is eventually sold for a gain, you will owe more tax on that gain.
The benefit is that you are pushing tax liability into the future. If your tax rate is lower in retirement, or if the investment is held until death (when heirs receive a stepped-up cost basis), the deferred tax may be reduced or eliminated entirely.
Automated Tax-Loss Harvesting
Several robo-advisors offer automated tax-loss harvesting as a feature:
- Betterment: Scans your portfolio daily and harvests losses automatically when opportunities arise.
- Wealthfront: Offers both basic tax-loss harvesting and “direct indexing” (Stock-Level Tax-Loss Harvesting) for accounts over $100,000, which harvests losses at the individual stock level within an index.
- Schwab Intelligent Portfolios Premium: Includes tax-loss harvesting for taxable accounts.
For investors who prefer to manage their own portfolios, tax-loss harvesting can be done manually — especially effective during broad market downturns when many positions may be in the red simultaneously.
Common Mistakes to Avoid
- Triggering a wash sale: The most common and costly error. Track the 30-day window carefully.
- Harvesting losses in retirement accounts: Capital gains and losses inside IRAs and 401(k)s have no tax significance — tax-loss harvesting only applies to taxable brokerage accounts.
- Ignoring transaction costs: Frequent selling can generate transaction costs that erode the tax benefit, especially for small accounts. Most major brokerages now charge $0 per trade, reducing this concern.
- Harvesting short-term losses to offset long-term gains: Losses first offset gains of the same type. Short-term losses offset short-term gains first; long-term losses offset long-term gains first. The order matters for maximizing savings.
The Bottom Line
Tax-loss harvesting is one of the few strategies that can reliably improve after-tax investment returns without changing your portfolio’s risk profile or market exposure. It requires attention to the wash-sale rule, an understanding of your tax situation, and a taxable brokerage account with unrealized losses. For high-income investors in volatile markets, the annual tax savings can be significant — and the compounding effect of deferring tax over decades adds up substantially over a long investment horizon.