Skip to main content
14 min read

Tax-Loss Harvesting Guide: How to Use Losses to Save on Taxes

This tax-loss harvesting guide explains how to offset capital gains, the wash sale rule, and strategies to reduce your tax bill legally.

14 min read
Share:
Tax-Loss Harvesting Guide: How to Use Losses to Save on Taxes

Tax-loss harvesting is a powerful tax strategy that allows investors to sell losing investments to offset capital gains taxes on winning investments—potentially saving hundreds or thousands of dollars annually. When done correctly, you can reduce your tax bill while maintaining your overall portfolio allocation by reinvesting in similar securities. The key is understanding the IRS wash sale rule, which prohibits buying "substantially identical" securities within 30 days before or after the sale. This strategy works best for investors in higher tax brackets with taxable brokerage accounts, and can even offset up to $3,000 of ordinary income per year if your losses exceed your gains. Whether you harvest losses manually or use robo-advisors that automate the process, mastering this technique is essential for tax-efficient investing.

What Is Tax-Loss Harvesting?

Tax-loss harvesting is the strategic selling of investments at a loss to offset capital gains taxes owed from selling profitable assets. Rather than letting losses sit on paper indefinitely, you realize them strategically to create tax benefits.

Here's the core concept: When you sell an investment for more than you paid, you owe capital gains tax on the profit. But when you sell at a loss, that loss can offset your gains—reducing or eliminating the tax you'd otherwise owe.

Tax-loss harvesting doesn't eliminate taxes entirely—it typically defers them. When you reinvest in similar securities at a lower cost basis, you may owe more taxes when you eventually sell those replacement investments. However, deferring taxes has real value, and in some situations (like holding until death), you may avoid those deferred taxes altogether.

How the Process Works

The tax-loss harvesting process follows these steps:

  1. Identify investments with unrealized losses in your taxable brokerage accounts
  2. Sell the losing positions to realize the loss for tax purposes
  3. Use the losses to offset gains—short-term losses first offset short-term gains
  4. Reinvest in similar but not substantially identical securities to maintain your portfolio allocation
  5. Report on your tax return using Form 8949 and Schedule D

For example, if you sold stock for a $10,000 gain and have another position sitting at a $7,000 loss, selling the losing position would reduce your taxable gain to just $3,000.

Understanding Capital Gains Tax Rates

To appreciate why tax-loss harvesting matters, you need to understand how capital gains are taxed. The rates depend on how long you held the investment before selling.

Short-Term vs. Long-Term Capital Gains

Short-term capital gains apply to assets held one year or less. These gains are taxed as ordinary income at your marginal tax rate—which can be as high as 37%. High earners may also face an additional 3.8% Net Investment Income Tax (NIIT), bringing the effective top rate to 40.8%.

Long-term capital gains apply to assets held longer than one year. These enjoy preferential tax rates:

Taxable Income (Single Filers, 2025)Long-Term Capital Gains Rate
Up to $48,3500%
$48,351 – $533,40015%
Over $533,40020%

Note: Thresholds vary by filing status. Married filing separately has different brackets. See IRS Topic 409 for all filing statuses.

According to the IRS, these preferential rates make long-term investing significantly more tax-efficient than frequent trading.

Because short-term gains face much higher tax rates, prioritize harvesting short-term losses first when possible. A $5,000 short-term loss could save you up to $2,040 in taxes (at 40.8%), compared to $1,190 for a long-term loss (at 23.8% including NIIT).

The Wash Sale Rule: What You Must Know

The wash sale rule is the most critical regulation governing tax-loss harvesting. Violate it, and your carefully planned tax savings evaporate.

The 61-Day Window

According to IRS Publication 550, 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 creates a 61-day window you must navigate: 30 days before the sale, the sale date itself, and 30 days after.

Consequences of Triggering a Wash Sale

If you trigger a wash sale:

  • The loss is disallowed for that tax year
  • The disallowed loss gets added to the cost basis of your replacement shares
  • The holding period of your original shares transfers to the new shares

The good news? The loss isn't permanently gone—it's deferred. You'll benefit when you eventually sell the replacement shares (assuming you don't trigger another wash sale).

What Counts as "Substantially Identical"?

The IRS doesn't provide a specific definition, which creates some gray areas. Here's what we know:

Generally TRIGGERS a wash sale:

  • Repurchasing the same stock
  • Buying the same stock in a different account (including IRAs)
  • Having your spouse purchase the same stock
  • Automatic dividend reinvestment into the same stock
  • Convertible securities that can become the same stock

Generally DOES NOT trigger a wash sale:

  • Two different index funds tracking the same benchmark from different providers
  • Selling an individual stock and buying a sector ETF
  • Different companies in the same industry

The wash sale rule applies across ALL your accounts—including IRAs, Roth IRAs, and your spouse's accounts if filing jointly. Selling a losing stock in your taxable account and buying it in your 401(k) the same week still triggers a wash sale.

Safe Swap Examples

Here are practical examples of what you can swap without triggering wash sales:

Sell ThisBuy This Instead
SPY (SPDR S&P 500 ETF)VOO (Vanguard S&P 500 ETF)
QQQ (Invesco Nasdaq-100 ETF)VGT (Vanguard Information Technology ETF)
Individual tech stockBroad technology sector ETF
Vanguard Total Stock Market FundSchwab Total Stock Market Index Fund

According to Investopedia, two S&P 500 ETFs from different providers (like SPY and VOO) are generally not considered substantially identical, making them popular swap candidates.

The $3,000 Ordinary Income Deduction

What happens when your capital losses exceed your capital gains? The IRS allows you to deduct up to $3,000 of net capital losses against your ordinary income each year ($1,500 if married filing separately).

How the Math Works

Let's walk through an example:

  • Capital gains realized: $5,000
  • Capital losses realized: $12,000
  • Net capital loss: $7,000
  • Applied against ordinary income: $3,000 (maximum allowed)
  • Carried forward to future years: $4,000

Real Tax Savings

According to Bankrate, the $3,000 deduction saves you money based on your marginal tax rate:

Tax BracketAnnual Savings from $3,000 Deduction
22%$660
24%$720
32%$960
35%$1,050
37%$1,110

Unlimited Loss Carryforward

Any losses beyond the $3,000 annual limit carry forward indefinitely. There's no expiration date—you can use these losses in future years until they're exhausted.

This creates what some advisors call a "tax savings account"—accumulated losses you can deploy against future gains, including gains from real estate sales or business exits.

Where Tax-Loss Harvesting Works (and Doesn't)

Tax-loss harvesting only applies to taxable investment accounts. Understanding this limitation is crucial for your overall asset allocation strategy.

Eligible Account Types

Tax-loss harvesting works in:

  • Individual brokerage accounts
  • Joint brokerage accounts
  • Trust accounts
  • Custodial accounts (UTMA/UGMA)

Ineligible Account Types

Tax-loss harvesting does NOT work in tax-advantaged accounts:

  • 401(k) plans
  • Roth IRAs
  • Traditional IRAs
  • 403(b) plans
  • 529 education savings plans
  • Health Savings Accounts (HSAs)

Why? Gains and losses aren't taxed annually in these accounts. There's no mechanism to claim investment losses for tax benefit—all tax consequences occur at contribution or distribution.

Even though you can't harvest losses in retirement accounts, remember that the wash sale rule still applies across account types. Selling a losing stock in your taxable account and buying the same stock in your IRA within 30 days triggers a wash sale and disallows the loss.

Step-by-Step Implementation Guide

Ready to harvest some tax losses? Here's your practical playbook.

Step 1: Review Your Portfolio for Unrealized Losses

Log into your brokerage account and review positions showing unrealized losses. Most platforms display this prominently—look for red numbers or positions marked "down."

Consider the size of the loss relative to:

  • Your realized gains for the year
  • Transaction costs and bid-ask spreads
  • Whether the investment still fits your strategy

Step 2: Check the 61-Day Window

Before selling, verify you haven't purchased the same security in the past 30 days. Also plan to avoid buying it for 30 days after the sale.

Don't forget to check:

  • Automatic dividend reinvestment settings
  • Any pending purchases in other accounts
  • Your spouse's accounts (if filing jointly)

Step 3: Identify Replacement Securities

Find similar but not substantially identical securities to maintain your exposure. If you're selling an index fund tracking the S&P 500, identify a different provider's version of the same index.

Step 4: Execute the Trades

Sell the losing position and immediately purchase your replacement security. Most brokers allow you to execute both trades simultaneously or within minutes of each other.

Step 5: Document Everything

Keep records of:

  • Original purchase date and price
  • Sale date and price
  • Replacement purchase date and price
  • Wash sale window dates
  • Any disallowed losses and adjusted cost basis

Step 6: Track Carryforward Losses

If your losses exceed your gains plus the $3,000 deduction, track your carryforward amount. You'll need this for future tax years.

When Tax-Loss Harvesting Makes the Most Sense

According to Fidelity, tax-loss harvesting is most valuable in these situations:

Best Candidates

  • Higher tax brackets: Greater tax savings per dollar of loss
  • Significant realized gains: Losses offset gains dollar-for-dollar
  • Market corrections: Volatility creates harvesting opportunities
  • Portfolio rebalancing: Align tax strategy with allocation changes
  • Planning to donate securities: Harvest losses, then donate winners
  • Estate planning: Heirs receive stepped-up basis at death

When to Skip It

  • Low tax brackets: Minimal benefit from the strategy
  • Only tax-advantaged accounts: No mechanism to benefit
  • Strong conviction in the investment: Don't sell winners just for tax losses
  • Small loss amounts: Transaction costs may exceed tax savings
  • Complex situation without professional guidance: Mistakes can be costly

Automated Tax-Loss Harvesting with Robo-Advisors

According to NerdWallet, robo-advisors have revolutionized tax-loss harvesting by automating the entire process.

How Robo-Advisors Handle It

Modern robo-advisors like Betterment, Wealthfront, and Schwab Intelligent Portfolios:

  • Monitor daily for harvesting opportunities
  • Automatically sell positions at a loss
  • Immediately purchase similar replacement securities
  • Ensure compliance with wash sale rules algorithmically
  • Harvest year-round—not just in December

Benefits of Automation

  • Captures more opportunities than manual review
  • Eliminates human error and emotional decision-making
  • Typically included at no additional cost
  • Handles complexity across multiple accounts
  • Builds portfolios designed for efficient swapping

If you invest primarily through ETFs, robo-advisors often structure portfolios specifically to enable smooth tax-loss harvesting with easily swappable funds.

Common Mistakes to Avoid

Don't let these errors undermine your tax-loss harvesting strategy:

1. Forgetting About Automatic Dividend Reinvestment

If you have dividend reinvestment enabled, purchasing shares of a stock you just sold will trigger a wash sale. Disable automatic reinvestment on positions you plan to harvest.

2. Ignoring Spousal Accounts

The wash sale rule applies to your spouse's accounts if you file jointly. Coordinate your trades to avoid triggering violations.

3. Waiting Until December

Year-end is popular for tax-loss harvesting, but waiting until December means:

  • Opportunities may no longer exist (markets may have recovered)
  • Everyone else is selling, potentially depressing prices
  • Less time to correct mistakes before the deadline

Consider harvesting throughout the year when opportunities arise.

4. Letting Taxes Drive Investment Decisions

As Charles Schwab notes, don't let the "tax tail wag the investment dog." Selling a fundamentally strong investment just to harvest a loss may cost more in missed gains than you save in taxes.

5. Missing the December 31 Deadline

For losses to count in the current tax year, the settlement date must be December 31 or earlier. With T+1 settlement, you need to execute trades by December 30 at the latest.

6. Ignoring State Tax Rules

Some states don't conform to federal wash sale rules or have different loss carryforward provisions. If you live in a high-tax state, consult a tax professional familiar with your state's rules.

Conclusion

Tax-loss harvesting is one of the most effective legal strategies for reducing your investment tax bill. By strategically selling losing positions to offset gains—while staying compliant with the wash sale rule—you can potentially save hundreds or thousands of dollars annually.

The key takeaways:

  • Harvest losses in taxable accounts only—the strategy doesn't apply to retirement accounts
  • Respect the 61-day wash sale window across ALL your accounts
  • Swap into similar but not identical securities to maintain your allocation
  • Track your carryforward losses for future years
  • Consider automation through robo-advisors for hands-off harvesting

Whether you're managing your own portfolio or using automated tools, making tax-loss harvesting part of your annual investing routine can compound into significant savings over your lifetime. Just remember: while minimizing taxes is smart, it should never override sound investment decisions.

The wash sale rule prevents you from claiming a tax loss if you buy a "substantially identical" security within 30 days before or after selling at a loss. This creates a 61-day window you must navigate. If you trigger a wash sale, the loss is disallowed for the current tax year but gets added to the cost basis of your replacement shares—so the loss isn't permanently gone, just deferred.

No. Tax-loss harvesting only works in taxable brokerage accounts. Tax-advantaged accounts like 401(k)s, IRAs, Roth IRAs, and 529 plans don't recognize capital gains or losses for tax purposes. However, the wash sale rule still applies across account types—buying a stock in your IRA that you just sold at a loss in your taxable account will disallow the loss.

Capital losses first offset capital gains dollar-for-dollar with no limit. If your losses exceed your gains, you can deduct up to $3,000 of net capital losses against ordinary income each year ($1,500 if married filing separately). Any remaining losses carry forward to future years indefinitely.

You must wait at least 31 days to repurchase the exact same security without triggering a wash sale. However, you can immediately buy a similar but not substantially identical security—for example, selling one S&P 500 ETF and immediately buying a different provider's S&P 500 ETF. This lets you stay invested while still claiming the loss.

Tax-loss harvesting is most worthwhile for investors in higher tax brackets with significant taxable investments. If you're in the 24% bracket, harvesting $10,000 in losses to offset gains could save you $2,400 in taxes. However, if you're in a low tax bracket, have only tax-advantaged accounts, or would incur significant transaction costs, the benefit may be minimal.

If you trigger a wash sale, the loss is disallowed for the current tax year. However, the disallowed loss amount is added to the cost basis of your replacement shares, so you'll eventually benefit when you sell those shares—assuming you don't trigger another wash sale. Your broker typically tracks this and reports adjusted cost basis on Form 1099-B.

Disclaimer: The information provided on RichCub is for educational purposes only and should not be considered financial, legal, or investment advice. We recommend consulting with a qualified financial advisor before making any financial decisions. RichCub may receive compensation through affiliate links or advertising on this site.

Was this article helpful?
R

RichCub Editorial Team

Contributor

Related Articles