Skip to main content

Tax-loss harvesting

Turn investment losses into tax savings. Offset capital gains legally, avoid the wash sale rule and time it well.

Tax-loss harvesting calculator

Estimate what harvesting your losses saves this year and what carries forward.

Your gains and losses

Tax-loss harvesting strategies

Four approaches, from a simple same-year offset to active factor rotation.

  1. Direct Offset Strategy

    Low riskSimple

    Sell losing positions to directly offset realized capital gains in the same tax year

    Best: When you have realized gains to offset

    1. 1.Identify realized capital gains for the year
    2. 2.Review portfolio for unrealized losses
    3. 3.Sell losing positions up to gain amount
    4. 4.Reinvest in similar (not identical) assets

    Consider: Must avoid wash sale rule (30-day period). Consider transaction costs. Maintain desired asset allocation. Best for significant realized gains.

  2. Loss Banking Strategy

    Medium riskModerate

    Realize losses even without current gains to carry forward and offset future gains

    Best: Year-end when no current gains to offset

    1. 1.Identify underperforming positions
    2. 2.Realize losses up to $3,000 annually
    3. 3.Carry forward excess losses
    4. 4.Use losses against future gains

    Consider: Can deduct $3,000 annually against ordinary income. Unlimited carryforward period. May miss potential recovery. Opportunity cost of early selling.

  3. Paired Trading Strategy

    Medium riskAdvanced

    Simultaneously harvest losses while maintaining market exposure through similar investments

    Best: Throughout the year for ongoing optimization

    1. 1.Identify losing position to harvest
    2. 2.Research substantially different but similar asset
    3. 3.Sell losing position
    4. 4.Immediately buy similar asset
    5. 5.Wait 31 days before repurchasing original

    Consider: Requires knowledge of substantially different securities. Higher transaction costs. Tracking wash sale compliance. Market exposure maintained.

  4. Factor Rotation Strategy

    High riskAdvanced

    Harvest losses while rotating between different investment factors or styles

    Best: During factor performance divergences

    1. 1.Monitor factor performance differences
    2. 2.Identify losses in underperforming factors
    3. 3.Rotate to outperforming factors
    4. 4.Maintain overall portfolio balance
    5. 5.Rebalance according to long-term strategy

    Consider: Requires sophisticated factor analysis. Higher portfolio turnover. Style drift risks. May conflict with long-term allocation.

Essential tax rules & compliance

The rules that decide whether a harvested loss actually counts.

Wash Sale Rule

Cannot deduct losses if you buy substantially identical security within 30 days before or after sale

Timeframe: 61-day window (30 days before + 30 days after)

Penalty: Loss deduction disallowed and added to cost basis of new purchase

How to avoid violations

  • Wait 31 days before repurchasing
  • Buy similar but not identical securities
  • Use spouse's account carefully (applies to spouses too)
  • Avoid buying in IRA or 401(k) during period

Common examples

  • Selling Apple stock and buying Apple stock again within 30 days
  • Selling S&P 500 ETF and buying another S&P 500 ETF
  • Selling individual stock and buying call options on same stock

Loss Limitation Rules

Capital losses can only offset capital gains plus $3,000 of ordinary income annually

Timeframe: Annual limitation with carryforward

Penalty: Excess losses must be carried forward to future years

How to avoid violations

  • Plan loss realization around gain realization
  • Consider timing of gains and losses
  • Track carryforward losses accurately
  • Optimize between short-term and long-term

Common examples

  • $10,000 loss can offset $7,000 gains + $3,000 ordinary income
  • Remaining losses carry forward indefinitely
  • Short-term losses offset short-term gains first

Constructive Sale Rules

Certain transactions that eliminate risk may trigger constructive sale treatment

Timeframe: Immediate effect when transaction occurs

Penalty: Gain recognition even without actual sale

How to avoid violations

  • Avoid short sales against appreciated positions
  • Be careful with collar strategies
  • Understand forward contract implications
  • Consult professionals for complex strategies

Common examples

  • Short selling stock you own
  • Buying put options while owning stock
  • Entering forward sale contracts

Net Investment Income Tax

Additional 3.8% tax on investment income for high-income taxpayers

Timeframe: Applies to tax year when income thresholds exceeded

Penalty: Additional 3.8% tax on net investment income

How to avoid violations

  • Consider NIIT in tax planning calculations
  • May affect optimal gain/loss timing
  • Evaluate strategies to reduce modified AGI
  • Professional planning for high-income situations

Common examples

  • Singles with MAGI over $200,000
  • Married filing jointly over $250,000
  • Applies to capital gains, dividends, interest

Common tax-loss harvesting scenarios

Four worked examples at a 22% bracket.

  • Perfect Offset

    Full offset of capital gains with harvested losses

    Capital gains
    $10,000
    Available losses
    $10,000
    Calculation
    $10,000 × 22% = $2,200
    Tax savings
    $2,200
  • Partial Offset + Ordinary Income

    Offset gains plus deduct $3,000 against ordinary income

    Capital gains
    $5,000
    Available losses
    $8,000
    Calculation
    $5,000 × 15% + $3,000 × 22% = $1,410
    Tax savings
    $1,410
  • Loss Banking

    No current gains, bank losses for future use

    Capital gains
    $0
    Available losses
    $5,000
    Calculation
    $3,000 × 22% = $660 (plus $2,000 carryforward)
    Tax savings
    $660
  • Excess Losses

    Large losses requiring multi-year carryforward strategy

    Capital gains
    $5,000
    Available losses
    $20,000
    Calculation
    $5,000 × 15% + $3,000 × 22% = $1,410 (plus $12,000 carryforward)
    Tax savings
    $1,410

Frequently asked questions

When is the best time to harvest tax losses?
The best time depends on your situation. Harvest losses when you have realized gains to offset, during market downturns, or near year-end for tax planning. Avoid harvesting just before year-end if you plan to repurchase soon due to wash sale rules.
What exactly constitutes a wash sale?
A wash sale occurs when you sell a security at a loss and buy a substantially identical security within 30 days before or after the sale. This includes the same stock, similar ETFs tracking the same index, or even options on the same security.
What makes securities "substantially different" to avoid wash sales?
Securities must have meaningful differences in composition or strategy. Examples: different sector ETFs, growth vs. value funds, different market cap focuses, or individual stocks in different industries. The IRS hasn't provided specific guidelines, so differences should be significant.
Do wash sale rules apply to IRA and 401(k) purchases?
Yes, buying the same or substantially identical security in an IRA or 401(k) within the wash sale period will trigger the rule. The loss deduction is disallowed, but you can't add the loss to the cost basis in the tax-advantaged account.
How long can I carry forward unused capital losses?
Capital losses can be carried forward indefinitely until used. They retain their character (short-term or long-term) and can offset future capital gains or up to $3,000 of ordinary income annually. Track carryforward losses carefully for future tax planning.
How do transaction costs affect tax-loss harvesting benefits?
Transaction costs reduce net benefits from tax-loss harvesting. Calculate the tax savings versus costs including commissions, bid-ask spreads, and potential tracking differences. Benefits are generally higher for larger positions and higher tax brackets.
How much in capital losses can I deduct each year?
You can deduct capital losses against capital gains without limit. If losses exceed gains, you can deduct up to $3,000 ($1,500 if married filing separately) against ordinary income annually. Excess losses carry forward indefinitely.
How are short-term vs. long-term losses treated differently?
Short-term losses (assets held ≤1 year) first offset short-term gains, then long-term gains. Long-term losses first offset long-term gains, then short-term gains. Short-term losses are more valuable as they offset income taxed at higher ordinary rates.
Is automated tax-loss harvesting worth it?
Robo-advisor tax-loss harvesting can be valuable for hands-off investors with taxable accounts over $50,000. They monitor portfolios daily and harvest losses automatically while avoiding wash sales. Compare fees against potential tax savings.
How often should I harvest tax losses?
You can harvest losses throughout the year as opportunities arise. Many investors review quarterly or during significant market downturns. Year-end is popular for tax planning, but don't wait if good opportunities exist earlier.
Can I harvest losses on municipal bonds?
Yes, you can harvest losses on municipal bonds. The losses can offset capital gains from any source. However, be aware that some municipal bond interest may be subject to AMT, and losses might affect the tax-equivalent yield calculations.
How does tax-loss harvesting affect estate planning?
Tax-loss harvesting reduces your current tax bill but may reduce the step-up in basis for heirs. Assets receive stepped-up basis at death, eliminating unrealized gains. Consider your estate size and beneficiary tax situations when harvesting.
Can I harvest losses on international stocks and ETFs?
Yes, tax-loss harvesting applies to international stocks and ETFs. Be careful with similar international funds - two funds tracking the same foreign index may be substantially identical. Consider geographic or sector differences when replacing positions.
Does tax-loss harvesting work for cryptocurrency?
Yes, cryptocurrency is treated as property for tax purposes, so tax-loss harvesting applies. The wash sale rule currently doesn't apply to crypto, allowing immediate repurchase. However, proposed legislation may change this in the future.
Can I harvest losses from partnerships or K-1 investments?
Partnership losses pass through to your personal return and can offset other income subject to passive activity rules. These aren't typically "harvested" like securities since you can't easily control the timing. Consult a tax professional for complex situations.

Important disclaimer

Tax and investment advice: This calculator and guide are for educational purposes only and are not personalized tax or investment advice. Tax laws are complex and change frequently, and tax-loss harvesting may not suit every investor.

Professional consultation: Consult a qualified tax professional, financial advisor or CPA before implementing these strategies. Individual circumstances vary and affect whether they are appropriate.

Calculation accuracy: The calculator makes simplified assumptions and may not account for state taxes, AMT, net investment income tax or complex securities.

Market risks: Harvesting means selling investments that may recover in value. Consider your overall strategy and risk tolerance. Past performance does not guarantee future results.

No warranty: Warren AI provides this information "as is" without warranty of any kind and is not responsible for losses or damages resulting from its use.

By the numbers

What the data says

National figures from the sources shown, as of the period on each card. They are context, not a forecast or advice for your situation.

Ready to optimize your investment taxes?

Start implementing tax-loss harvesting strategies to reduce your tax bill legally and efficiently. Warren watches your accounts for the opportunities.