Tax-Loss Harvesting: How to Reduce Capital Gains Tax with Strategic Losses
May 6, 2026 · guides · 12 min read
Tax-loss harvesting is the practice of selling securities that have declined in value to realize a capital loss, then using that loss to offset capital gains (and in some cases ordinary income) elsewhere in your portfolio. You simultaneously reinvest in a similar-but-not-identical security to maintain your market exposure.
The result: you reduce your current tax liability without fundamentally changing your investment positioning.
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):
- Long-term gain: $5,000
- Short-term gain: $3,000
- Tax owed: ($5,000 x 15%) + ($3,000 x 22%) = $750 + $660 = $1,410
Scenario B (with harvesting):
- Long-term gain: $5,000
- Short-term gain: $3,000
- Realized loss: $4,000 (from harvesting two positions)
- The loss is applied first against short-term gains, then long-term gains
- Net gains: $3,000 short-term wiped out by first $3,000 of losses; remaining $1,000 of losses offsets $1,000 of long-term gains
- Taxable: $4,000 long-term gain at 15% = $600
- Tax savings vs. Scenario A: $810
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:
- First offset short-term gains (highest tax rate, biggest benefit per dollar)
- Then offset long-term gains
- Any remaining losses offset up to $3,000 of ordinary income per year
- 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
- Selling shares of Stock A at a loss and buying shares of Stock A within 30 days
- Selling an ETF and buying a nearly identical ETF that tracks the exact same index (e.g., selling SPY and buying SPY immediately — both track the S&P 500)
- Selling shares in a taxable account and buying the same shares in an IRA within the 30-day window
- Selling shares and having a spouse purchase the same security in their account
What does NOT violate the wash-sale rule
- Selling an ETF that tracks the S&P 500 and buying a different ETF that tracks a similar but distinct index (e.g., a large-cap U.S. index with different composition rules)
- Selling an individual stock and buying a sector ETF that includes it (the ETF is not substantially identical to the individual stock)
- Waiting 31 days before repurchasing the exact same security
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:
- Captures temporary dislocations throughout the year before they recover
- Spreads transaction timing, reducing the risk of poor pricing at year-end
- Allows more precise matching of losses to gains as they occur
Disadvantages:
- Requires more active monitoring
- Increases risk of inadvertently triggering wash-sale violations across multiple transactions
- More administrative complexity
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:
- Wait 31 days and repurchase the same stock (accept market exposure gap)
- Purchase a peer company in the same industry as a temporary replacement
- Purchase a sector ETF that covers the same industry
- 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:
- Losses offset short-term gains first (most valuable, taxed as ordinary income), then long-term gains, then up to $3,000 of ordinary income per year
- Excess losses carry forward indefinitely
- The wash-sale rule prohibits repurchasing substantially identical securities within 30 days before or after the sale
- Replacement securities must maintain your investment exposure without triggering the wash-sale rule
- Continuous harvesting throughout the year captures more opportunity than year-end-only reviews
- Harvesting is not beneficial in tax-advantaged accounts, when you expect a higher future tax rate, or when losses are too small to justify transaction costs
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.