Tax-Loss Harvesting: How to Offset Gains

POST UPDATED: October 28, 2026

Tax Lost Harvesting

By ATGL

Updated October 28, 2026

Tax-loss harvesting is the practice of selling an investment at a loss to reduce the taxes owed on gains from other investments. Investors then reinvest the proceeds in a comparable, but different, security to maintain market exposure.

As with broader investment strategies, harvesting works best when it follows defined rules. This article explains how the IRS offsets losses against gains and income, how to choose replacement investments, when to trade before the December 31 deadline, and how frequent traders can manage wash sales.

Tax-Loss Harvesting Rules: How Losses Offset Gains and Income

Realized capital losses offset capital gains first, then up to $3,000 of ordinary income per year. These tax-loss harvesting rules apply in order:

  • Same-type netting: Short-term losses (positions held one year or less) offset short-term gains, and long-term losses offset long-term gains.
  • Cross-type netting: Any net loss remaining in one category then reduces a net gain in the other.
  • Annual income limit: The tax-loss harvesting limit is $3,000 per year, or $1,500 if married filing separately.
  • Carryforward: Unused losses roll into future years indefinitely and keep their short-term or long-term status.
  • Eligible accounts: The strategy applies only to taxable brokerage accounts, not 401(k)s or IRAs.

These are federal rules. State treatment varies, so confirm how your state handles capital losses before harvesting.

Tax-Loss Harvesting for Capital Gains: A Step-by-Step Process

Harvesting is most effective as a repeatable process, run several times a year:

  1. Review unrealized losses. Identify taxable positions trading below cost basis.
  2. Match losses to realized gains. Compare losses with this year’s short-term and long-term gains.
  3. Select specific tax lots. Use specific lot identification at your brokerage to sell the highest-basis shares.
  4. Execute the sale. Sell the selected lots and confirm the trade date.
  5. Buy a replacement. Choose a security with comparable exposure, such as a fund tracking a different index.
  6. Record the trades. Report each sale on Form 8949 and Schedule D.

Tax-Loss Harvesting Examples With Real Numbers

Each tax-loss harvesting example below applies one formula:

Net capital gain or loss = total capital gains − total capital losses.

All figures are hypothetical, and tax rates are illustrative.

Scenario Realized Gains Realized Losses Net Result Tax Effect
Losses fully offset gains $12,000 long-term $12,000 long-term $0 About $1,800 saved at an illustrative 15% rate
Losses exceed gains $5,000 short-term $14,000 short-term −$9,000 $3,000 deducted from ordinary income, $6,000 carried forward
Short-term loss offsets long-term gain $8,000 long-term $8,000 short-term $0 Long-term gain fully offset

In the second scenario, $5,000 − 14,000=-9,000. The investor deducts $3,000 this year and carries $6,000 forward.

Choose Replacement Investments That Avoid Wash Sales

An effective replacement keeps similar market exposure without being substantially identical to the security sold. The wash sale rule disallows the loss if you buy such a security within a 61-day window, from 30 days before through 30 days after the sale. Review how the wash sale rule works before placing the trade.

Common swaps include an S&P 500 ETF for a Russell 1000 fund, or a single stock for a sector ETF, which allows stock loss harvesting without exiting the industry. The IRS offers no bright-line test for funds, so confirm swaps with a tax professional. Less obvious triggers include:

  • Reinvested dividends
  • Recurring automatic purchases
  • IRA or Roth IRA purchases
  • A spouse’s purchases

In a taxable account, the disallowed loss is added to the cost basis of the new shares and claimed when they are sold. In an IRA, the loss is permanently forfeited.

Plan Your Harvesting Trades on a Year-End Timeline

Sales must have a trade date of December 31 or earlier to count for that year, even if settlement falls in January. Harvesting can also follow market declines earlier in the year. A typical year-end schedule follows four stages:

  • October–November: Total realized gains and losses and flag unrealized losses.
  • Early to mid-December: Execute trades while time remains to correct errors.
  • Final trading days: Confirm trade dates. Losses on closing short sales count on the settlement date instead.
  • Following 30 days: Avoid repurchasing the original security, including through dividend reinvestment.

How Active Traders and Swing Traders Can Harvest Losses

Frequent trading triggers wash sales more often because the same tickers are bought and sold repeatedly. A swing trader who exits at a loss and re-enters on a new buy signal within 30 days has made a wash sale.

For example, a trader buys 100 shares at $50, sells at $44 for a $600 loss, and re-enters at $46 eight days later. The disallowed $600 raises the new basis to $52 per share, and the loss is recognized when that position closes.

Short-term losses are especially valuable because short-term gains are taxed at ordinary income rates. Review the tax rates that apply to active traders. Brokers typically flag wash sales within a single account only, so track trades across all your accounts. Another effective tax-loss harvesting strategy is to rotate into a correlated but distinct ticker for 30 days.

Qualifying traders may also consider the Section 475(f) mark-to-market election, which removes the wash sale rule and the $3,000 limit for covered securities. Consult a tax advisor well before the filing deadline.

When Tax-Loss Harvesting Is Worth the Effort, and When It Isn’t

Tax-loss harvesting is a good idea for investors with gains to offset. It is most valuable when:

  • You have realized short-term gains taxed at ordinary rates
  • You are in a high federal or state tax bracket
  • A market decline has created large unrealized losses

It adds little when:

  • Few gains are realized and large carryforwards already exist
  • Your income qualifies for the 0% long-term capital gains rate
  • Trading costs exceed the expected tax savings

Harvesting usually postpones taxes rather than eliminating them because the replacement’s lower cost basis creates a larger gain when it is sold. Replacement funds may also perform differently. Frequent selling can cause dividends to lose qualified status and be taxed at higher rates, so review how capital gains and dividend income are taxed differently. Financial advisors should coordinate any harvesting plan with each client’s tax professional.

Build a Rules-Based Plan for Your Next Trades

Tax-loss harvesting manages positions after they decline, but consistent results depend on disciplined entry and exit decisions. Above the Green Line uses a rules-based model to help remove emotion from trading. The model tracks indicators such as relative strength and moving averages to identify stocks worth watching, and members receive annotated charts that highlight potential buy and sell points. Explore Above the Green Line memberships to apply a structured approach to your next trades.

Become a Greenliner. Join Today

Candlestick. A Swing Traders Friend

A snapshot of the daily updates that help traders stay aligned with market direction.