Tax-loss harvesting is a practical strategy that investors use to turn market dips into tax advantages. Instead of letting a losing investment sit idle, you may be able to sell it, realize the loss, and use that loss to reduce taxable gains elsewhere in your portfolio. When done thoughtfully, tax-loss harvesting can improve after-tax returns without changing your long-term investment goals.

For many investors, the idea sounds simple: sell a losing asset and use the loss to offset gains. In practice, though, there are important tax rules, timing considerations, and portfolio management details to understand. If you overlook those details, you could accidentally trigger a wash sale or create a strategy that helps your taxes but hurts your investing plan.

This guide breaks down how tax-loss harvesting works, when it may be useful, and what to watch out for before making a trade.

What Is Tax-Loss Harvesting?

Illustration of tax-loss harvesting with scales balancing capital gains and losses to reduce taxable income

Tax-loss harvesting is the process of selling an investment at a loss to offset capital gains from other investments. The realized loss can then reduce your taxable gains, and in some cases it may also offset a limited amount of ordinary income.

This strategy is most often used in taxable brokerage accounts. It generally does not apply in tax-advantaged accounts like traditional IRAs or 401(k)s because those accounts already receive special tax treatment.

At a high level, tax-loss harvesting helps investors:

  • Reduce capital gains taxes
  • Improve after-tax portfolio returns
  • Rebalance a portfolio more tax-efficiently
  • Put market volatility to work instead of simply enduring it

The key is that the loss must be realized. Unrealized losses do not count for tax purposes until you sell the investment.

How Tax-Loss Harvesting Works

To understand tax-loss harvesting, it helps to start with the basic tax treatment of investment gains and losses.

When you sell an investment for more than you paid, you realize a capital gain. When you sell it for less than your cost basis, you realize a capital loss. Those gains and losses are typically grouped into short-term and long-term categories depending on how long you held the asset.

Short-Term vs. Long-Term Gains and Losses

  • Short-term: Assets held for one year or less
  • Long-term: Assets held for more than one year

In general, short-term gains are taxed at ordinary income tax rates, which can be higher than long-term capital gains rates. That makes the distinction important when you’re planning trades.

When you use tax-loss harvesting, the loss can first offset gains in the same category. If you have remaining losses, they can usually offset gains in the other category. If you still have leftover net capital losses, a limited amount may offset ordinary income, and any remaining loss may be carried forward to future tax years.

A Simple Example

Suppose you have:

  • A $5,000 long-term gain from one investment
  • A $3,000 long-term loss from another investment

If you sell the losing investment, your net long-term taxable gain drops to $2,000. That smaller gain may mean a lower tax bill.

Now suppose your losses exceed your gains. In that case, some or all of the loss may carry over to future years, depending on your overall situation and tax rules.

Why Investors Use Tax-Loss Harvesting

Tax-loss harvesting is popular because it offers a way to make a difficult market environment more efficient. Losses are never fun, but from a tax perspective they can become a useful asset.

Common Benefits

1. Offsetting capital gains

If you sell winners during the year, realized losses can help reduce the taxes on those gains.

2. Lowering taxable income in limited cases

After offsetting capital gains, a portion of excess capital losses may offset ordinary income, subject to IRS rules.

3. Repositioning your portfolio

You may want to move from one fund or stock to another. Harvesting a loss can help you make that shift while reducing tax friction.

4. Staying invested

In some cases, you can sell a losing security and buy a similar replacement to maintain market exposure. This allows you to pursue tax benefits without sitting entirely in cash.

The Wash Sale Rule: A Critical Detail

The most important rule in tax-loss harvesting is the wash sale rule. If you sell a security for a loss and buy a “substantially identical” security within the restricted time period, the IRS may disallow the loss for current tax purposes.

The Wash Sale Window

The wash sale rule generally applies if you buy the same or a substantially identical security:

  • 30 days before the sale
  • 30 days after the sale

That means the total restricted period spans 61 days around the transaction.

Why It Matters

If a wash sale occurs, the loss is not immediately usable. Instead, it is typically added to the cost basis of the replacement security, which delays the tax benefit.

Practical Ways to Avoid a Wash Sale

Investors often avoid wash sales by:

  • Buying a similar but not substantially identical ETF or fund
  • Waiting more than 30 days before repurchasing the same asset
  • Using a different fund that tracks a comparable index
  • Coordinating trades across all taxable accounts, including a spouse’s account when relevant

Because the rules can be nuanced, especially with mutual funds and ETFs, it’s wise to confirm the details before trading.

When Tax-Loss Harvesting Makes Sense

Tax-loss harvesting is not automatically beneficial in every situation. The best time to consider it is when the tax benefit outweighs the transaction costs, tracking complexity, and potential investment trade-offs.

Situations That May Be a Good Fit

During market downturns

When broad market declines create unrealized losses, you may have opportunities to harvest losses without fundamentally changing your investment allocation.

When rebalancing your portfolio

If you’re already planning to shift assets, harvesting losses can reduce the tax impact of that move.

After realizing gains elsewhere

If you sold appreciated assets during the year, harvesting losses can help offset those gains.

In high-income years

If you expect a large tax bill from business income, a bonus, or a major capital gain, tax-loss harvesting may be worth reviewing with a tax professional.

When It May Be Less Useful

Tax-loss harvesting may offer little value if:

  • You have no gains to offset
  • The potential tax savings are small
  • Trading costs are high
  • A replacement investment would meaningfully weaken your allocation
  • You’re already in a low tax bracket and the benefit is limited

In other words, the tax tail should not wag the investment dog.

A Step-by-Step Guide to Tax-Loss Harvesting

If you’re considering this strategy, here is a simple framework to follow.

1. Review your taxable accounts

Look for positions with unrealized losses in brokerage accounts. Focus on investments that fit within your long-term plan and that you may be willing to replace.

2. Identify realized gains

Check whether you have gains from other sales during the year. Losses are most valuable when they can offset something.

3. Estimate the tax impact

Compare the potential tax savings with the cost of trading. Even a modest loss can matter if you have substantial gains.

4. Check for wash sale risk

Make sure you are not buying the same or a substantially identical security within the restricted period.

5. Choose a replacement investment

Select something that maintains similar market exposure. For example:

  • Sell one S&P 500 ETF and buy a different S&P 500 ETF from another provider
  • Sell a large-cap index fund and buy a broader U.S. equity index fund
  • Sell a bond fund and buy a different fund with a comparable duration and credit profile

6. Keep good records

Track cost basis, sale date, replacement security, and holding periods. Clean records make tax reporting much easier.

Illustration of tax-loss harvesting showing reduced taxable gains and increased tax savings.

Tax-Loss Harvesting Example in Real Life

Imagine an investor with a taxable brokerage account containing two U.S. stock index funds.

  • Fund A is down $4,000
  • Fund B is up $6,000

If the investor sells Fund A, the $4,000 loss can offset part of the $6,000 gain from Fund B, leaving a net taxable gain of $2,000.

To keep the portfolio invested, the investor might buy a similar fund that tracks a different index or uses a different structure, as long as it does not violate the wash sale rule.

This approach preserves market exposure while improving tax efficiency. The investor still owns a diversified stock allocation, but the tax bill may be lower than if the losing fund had simply remained untouched.

Common Mistakes to Avoid

Tax-loss harvesting can be effective, but a few mistakes can reduce or eliminate the benefit.

Selling without a replacement plan

If you sell a security and leave the proceeds in cash too long, you may miss market gains while waiting to reinvest.

Triggering a wash sale

This is one of the easiest ways to lose the current-year tax benefit. Review purchases across all accounts.

Focusing only on taxes

A tax benefit is helpful only if the replacement investment still supports your long-term strategy.

Ignoring transaction costs

Frequent trading, spreads, and fund expenses can chip away at the benefit.

Overlooking fund similarity

Some investors assume two funds are different enough, but the wash sale rule depends on the substance of the holdings, not just the ticker symbol.

Who Should Consider Tax-Loss Harvesting?

This strategy is often most useful for:

  • Investors with taxable brokerage accounts
  • People in higher tax brackets
  • Investors who realize capital gains regularly
  • Long-term investors using index funds or ETFs
  • Households that want to improve after-tax returns over time

It may be less relevant for investors who mostly hold assets in retirement accounts or who do very little taxable investing.

When to Work With a Tax Professional

Tax-loss harvesting is often straightforward at a basic level, but your personal situation may be more complex. A tax professional can help if you have:

  • Large capital gains
  • Business income
  • Real estate transactions
  • Multiple brokerage accounts
  • Married filing considerations
  • Carryforward losses from prior years
  • Questions about mutual funds, ETFs, or options

Professional guidance can help you avoid mistakes and coordinate your investment decisions with your broader tax picture.

Frequently Asked Questions

1. What is tax-loss harvesting in simple terms?

Tax-loss harvesting means selling an investment that has gone down in value so you can realize the loss for tax purposes. That loss can then offset capital gains and potentially reduce your tax bill.

2. Does tax-loss harvesting only work with stocks?

No. Investors can potentially harvest losses in stocks, ETFs, mutual funds, and other taxable investments. The important part is that the loss is realized in a taxable account and not disallowed by the wash sale rule.

3. Can I use tax-loss harvesting if I have no capital gains?

Yes, but the benefit may be smaller. Net capital losses can offset a limited amount of ordinary income, and any remaining loss may carry forward to future tax years. Even so, the strategy is often most valuable when you have realized gains to offset.

4. How do I avoid a wash sale?

Avoid buying the same or substantially identical security within 30 days before or after selling it at a loss. Many investors use a similar replacement fund or wait at least 31 days before repurchasing the same investment. Be careful with all taxable accounts you control.

5. Is tax-loss harvesting always worth it?

Not always. The strategy works best when the tax savings are meaningful and the replacement investment fits your plan. If costs, complexity, or portfolio disruption outweigh the tax benefit, it may not be the right move.

Official Resources

Conclusion

Tax-loss harvesting is one of the more practical ways investors can manage the tax side of investing without abandoning a long-term plan. By realizing losses in a taxable account, you may be able to offset capital gains, reduce your tax bill, and reposition your portfolio more efficiently. The strategy works best when it’s coordinated carefully, with attention to the wash sale rule, replacement investments, and your overall asset allocation.

The biggest takeaway is that tax efficiency should support—not replace—sound investing. A well-timed loss harvest can be helpful, but only if it fits your goals and doesn’t create unnecessary trading or risk. For many investors, the best approach is to review taxable positions periodically, identify opportunities during market volatility, and keep clear records of every trade.

If you want to make the most of tax-loss harvesting, start by understanding your gains, your losses, and the rules that govern them. A disciplined approach can turn short-term market setbacks into a meaningful long-term advantage.

Sarah Mitchell

Mary S, CFP®, is a Certified Financial Planner with over 12 years of experience in personal finance, retirement planning, and wealth management. She writes educational content that helps readers understand financial concepts and make informed decisions based on reliable information.