Tax-Loss Harvesting: How to Offset Capital Gains and Reduce Your Tax Bill

May 6, 2026 · guides · 11 min read


title: "Tax-Loss Harvesting: How to Offset Capital Gains and Reduce Your Tax Bill" excerpt: "Learn what tax-loss harvesting is, how it works, the wash-sale rule, and how investors use it to reduce capital gains taxes while maintaining portfolio exposure." date: '2026-05-06' readingTime: 11 category: 'guides' tags: ["tax-loss harvesting", "capital gains tax", "wash sale rule", "tax strategy", "portfolio management"]

Tax-loss harvesting is one of the few legal strategies that lets you use a losing position to your advantage. By deliberately selling investments at a loss, you can offset capital gains elsewhere in your portfolio — and in some cases offset ordinary income — reducing your total tax bill without changing your long-term investment exposure.

This guide explains exactly how tax-loss harvesting works, when it makes sense, the wash-sale rule you must avoid violating, and how to identify candidates systematically.


What Makes a Good Dividend Growth Stock?

Tax-loss harvesting is the practice of selling a security that has declined in value to realize a capital loss. That loss can then be used to offset:

  1. Capital gains from other investments sold at a profit in the same tax year
  2. Up to $3,000 of ordinary income per year (for U.S. taxpayers filing individually or jointly)
  3. Future capital gains, if losses exceed current-year gains (losses carry forward indefinitely)

The key insight: you are not abandoning the investment thesis. You sell the losing position, capture the tax benefit, and immediately reinvest in a similar (but not substantially identical) security to maintain your market exposure. The IRS gets less. Your portfolio stays positioned.


How Tax-Loss Harvesting Works: Step by Step

Step 1: Identify a position with an unrealized loss

You hold 50 shares of a technology ETF. You paid $200 per share (cost basis: $10,000). It now trades at $160. Unrealized loss: $2,000.

Step 2: Sell the losing position

You sell all 50 shares at $160, receiving $8,000. You have now realized a $2,000 capital loss.

Step 3: Apply the loss against gains

Earlier in the year, you sold shares of another stock and realized a $2,000 short-term capital gain. Your realized loss of $2,000 completely offsets that gain. Net capital gain: $0.

Step 4: Reinvest in a similar security

To avoid a 30-day gap in market exposure, you immediately purchase a different ETF that tracks a similar index — but is not "substantially identical" to the one you sold. You maintain your investment exposure while locking in the tax benefit.

Numeric example with tax savings

Assume a 22% ordinary income tax rate and a 15% long-term capital gains rate.

Scenario A (no harvesting):

Scenario B (with harvesting):

The $810 saved compounds forward. You did not lose it — you deferred it to a future year when the replacement security is eventually sold.


Short-Term vs. Long-Term Capital Gains

Not all gains are taxed equally. Understanding the difference changes how you prioritize harvesting.

Short-term capital gains apply to assets held one year or less. They are taxed as ordinary income — the same rate as your salary. In 2026, that rate ranges from 10% to 37%.

Long-term capital gains apply to assets held more than one year. In 2026, U.S. rates are 0%, 15%, or 20% depending on income, with an additional 3.8% Net Investment Income Tax for high earners.

The practical implication: offsetting short-term gains is more valuable per dollar of loss. If you are in the 32% ordinary income bracket, every $1,000 of short-term gain you eliminate saves $320 in taxes. The same $1,000 of long-term gain would only cost $150 or $200.

When you have losses to harvest, apply them strategically:

  1. First offset short-term gains (highest tax rate, biggest benefit per dollar)
  2. Then offset long-term gains
  3. Any remaining losses offset up to $3,000 of ordinary income per year
  4. Excess losses carry forward to future tax years indefinitely

The Wash-Sale Rule: What It Is and What Violates It

The wash-sale rule is the primary constraint on tax-loss harvesting. It prevents investors from selling a security at a loss and immediately repurchasing it just to generate a tax deduction.

The rule: If you sell a security at a loss and purchase a "substantially identical" security within 30 days before or after the sale, the IRS disallows the loss. The disallowed loss is added to the cost basis of the replacement security instead.

The 30-day window runs in both directions: 30 days before the sale and 30 days after. That is a 61-day total window during which you cannot repurchase a substantially identical security.

What violates the wash-sale rule

What does NOT violate the wash-sale rule

The IRS has not issued precise definitions of "substantially identical" for all cases. When in doubt, consult a tax professional.


Identifying Candidates for Tax-Loss Harvesting

Not every losing position is a good harvest candidate. The decision involves three factors.

1. Size of the unrealized loss

Small losses may not justify the transaction costs and administrative effort. As a general guideline, many investors focus on losses of at least $500 per position, though this depends on your portfolio size and tax situation.

2. Duration held

Short-term losses offset short-term gains first, then long-term gains. Long-term losses offset long-term gains first. If you have large short-term gains to offset, a short-term loss is more immediately valuable.

3. Quality of the replacement security

The best candidates are positions where you can identify a suitable replacement — a security that gives you similar market exposure without triggering a wash sale. If no good replacement exists, you face a market exposure gap while waiting 31 days to repurchase.


Replacement Securities Strategy

The replacement security is as important as the loss itself. Your goal is to maintain the intended exposure of your portfolio while satisfying the substantially-not-identical requirement.

For index ETFs: Many broad-market ETFs track slightly different indexes. You can sell one broad U.S. equity ETF and purchase another that tracks a different benchmark, maintaining near-identical exposure while legally clearing the wash-sale threshold. Confirm the indexes are genuinely distinct before transacting.

For sector ETFs: Within a sector, multiple ETFs may hold similar but not identical baskets. Check holdings overlap carefully.

For individual stocks: You cannot replace a specific stock with the same stock without waiting 31 days. But you can replace it with a peer company in the same industry, or with a sector ETF, during the window.

Practical approach: Before executing a harvest, identify your replacement security first. Have a specific ticker in mind. Execute both trades in sequence: sell the loser, immediately purchase the replacement. Do not leave yourself exposed to the market unintentionally.


Year-End vs. Continuous Harvesting

Year-end harvesting is the traditional approach: review your portfolio in November and December, identify unrealized losses, and harvest before December 31. This matches the annual tax filing cycle.

Drawbacks: you are constrained to a short window, losses from earlier in the year may have partially recovered, and you may feel pressure to transact suboptimally.

Continuous harvesting monitors the portfolio throughout the year and harvests whenever a loss exceeds a threshold — say, 5% or 10% below your cost basis. This is the approach used by automated tax-loss harvesting services.

Advantages of continuous harvesting:

Disadvantages:

For most self-directed investors, a hybrid approach works well: review quarterly and harvest aggressively in Q4. The key is not to wait until late December when positions may have recovered.


When Tax-Loss Harvesting Does NOT Make Sense

Tax-loss harvesting is not always beneficial. Avoid it in these situations.

When you expect a higher tax rate in future years. If you harvest losses today and defer gains into a year when your income — and tax rate — will be higher, you may pay more total tax, not less. The math depends on your individual tax trajectory.

When the loss is too small to matter. Transaction costs, bid-ask spreads, and administrative effort have a floor. A $50 loss that saves $12 in taxes is rarely worth executing.

In tax-advantaged accounts. IRAs, 401(k)s, and similar accounts do not generate taxable gains or losses. Harvesting in a Roth IRA produces no tax benefit.

When you cannot identify a suitable replacement. If the only way to maintain exposure is to repurchase the same security, and you are unwilling to wait 31 days, the wash-sale rule negates the benefit.

When you are in the 0% capital gains bracket. If your income falls below the long-term capital gains threshold (approximately $47,000 for single filers in 2026), you may owe nothing on long-term gains anyway. Harvesting short-term losses remains useful, but the priority changes.


Common Mistakes to Avoid

Violating the wash-sale rule unintentionally. The most common error is selling a position and buying back the same (or substantially identical) security too quickly. The 30-day window goes both directions — a purchase before the sale can also trigger the rule.

Ignoring state taxes. Federal capital gains rates are just one part of the equation. Many states tax capital gains as ordinary income with no preferential rate. Your effective combined rate may be significantly higher than the federal rate alone.

Harvesting losses in December and forgetting about January. The wash-sale window extends 30 days past the sale. A December 20 harvest means you cannot repurchase the original security until January 20.

Letting losses recover before harvesting. A position down 15% today may be down only 3% in three months. Continuous monitoring captures losses while they exist.

Focusing only on losses and ignoring overall portfolio fit. Tax efficiency is a means to an end. Do not hold a poor-quality position just because you have not yet harvested the loss, and do not harvest a loss if the replacement security fundamentally misaligns with your portfolio strategy.


Tax-Loss Harvesting with Individual Stocks

Index ETF harvesting is straightforward because many near-substitutes exist. Individual stock harvesting is more nuanced.

When you sell an individual stock at a loss, your options are:

  1. Wait 31 days and repurchase the same stock (accept market exposure gap)
  2. Purchase a peer company in the same industry as a temporary replacement
  3. Purchase a sector ETF that covers the same industry
  4. Rotate into a different stock you already intended to add to your portfolio

Option 2 and 3 are most common. If you harvest a loss on a large-cap technology company, a broad tech sector ETF provides a reasonable placeholder. You maintain sector exposure, you are not substantially identical to a single stock, and you can decide later whether to switch back.

The important consideration with option 2: you are now holding a different business with its own risks and characteristics. Ensure the replacement is a company you have actually evaluated, not just a familiar name.


How Equity Rank Helps Identify Candidates

Identifying good tax-loss harvesting candidates requires more than a list of positions in the red. You need to assess whether the underlying business has deteriorated (suggesting a permanent exit) or whether the decline is a temporary market dislocation (suggesting a harvest and replacement makes sense).

Equity Rank provides institutional-depth fundamental analysis across 3,000+ stocks, including DCF valuations, 8+ valuation methods aggregated into a consensus model fair value estimate, and the SAVE score — a composite measure of Safety, Attractiveness, Value, and Earnings quality. When a position is down significantly, you can run the analysis in seconds and determine whether the model fair value estimate has changed materially or whether the stock is simply cheaper against the same underlying value.

That distinction matters for harvesting decisions. A position down 20% because the business fundamentals have deteriorated may warrant permanent exit. A position down 20% because the whole sector has repriced, while model fair value is largely unchanged, is a stronger candidate for harvest-and-replace.

You can also use Equity Rank's screener to identify replacement securities in the same sector with similar quality characteristics, ensuring you do not accidentally exchange a well-scored position for a lower-quality one during the 30-day window.

Start your 7-day free trial at equity-rank.com. Full access to the valuation engine, SAVE score, and AI narrative across 3,000+ stocks.


Summary

Tax-loss harvesting is a systematic, legal method for reducing your capital gains tax liability by realizing losses to offset gains. The key mechanics:

The strategy works best when you maintain clear records of your cost basis, monitor positions consistently, and identify replacement securities before executing.

Always consult a qualified tax professional to evaluate whether tax-loss harvesting is appropriate for your specific situation, income level, account structure, and state tax obligations.


This article is for educational purposes only. Nothing in this content constitutes investment advice, tax advice, or a recommendation to transact in any security. Equity Rank is not a registered investment adviser. Consult a licensed tax professional and financial adviser before implementing any tax strategy.