HomeGlossary › Tax-Loss Harvesting

Tax-Loss Harvesting: How It Works, Rules & When It’s Worth It

Tax-loss harvesting is the strategy of selling investments at a loss to offset capital gains and reduce your tax bill. You realize a loss on paper, immediately reinvest in a similar (but not identical) asset to maintain your market exposure, and use the loss to cancel out gains elsewhere in your portfolio. It doesn’t eliminate taxes — it defers and reduces them.

How Tax-Loss Harvesting Works — Step by Step

The process is straightforward once you understand the mechanics:

StepActionExample
1. Identify a lossFind a position in your taxable account trading below your cost basisYou bought Fund A for $50,000; it’s now worth $38,000
2. Sell the positionSell to realize the lossYou lock in a $12,000 capital loss
3. Reinvest immediatelyBuy a similar but not “substantially identical” fund to stay investedYou buy Fund B (same asset class, different index or provider)
4. Use the loss at tax timeThe $12,000 loss offsets realized gains; excess offsets up to $3,000 of ordinary incomeYou had $15,000 in gains → now only $3,000 is taxable

The key: you stay fully invested. Your portfolio allocation barely changes. What changes is your tax bill — you’ve turned an unrealized loss into a realized tax benefit while maintaining the same market exposure.

What Losses Can Offset

Capital losses are applied in a specific order by the IRS. Understanding this order helps you harvest strategically:

PriorityWhat the Loss OffsetsTax Savings
1stCapital gains of the same type (short-term losses offset short-term gains first; long-term losses offset long-term gains first)Highest — short-term gains are taxed up to 37%
2ndCapital gains of the other type (net short-term losses offset long-term gains and vice versa)Moderate — depends on the gain type offset
3rdUp to $3,000 of ordinary income per year ($1,500 if married filing separately)Saves at your marginal rate
4thCarry forward excess losses to future years — indefinitelyContinues reducing taxes until fully used
Strategic Insight
Short-term losses are more valuable than long-term losses because they first offset short-term gains taxed at ordinary rates (up to 37%). If you have both types of losses available to harvest, prioritize short-term losses when you have short-term gains to shelter.

The Wash Sale Rule — The Critical Constraint

The IRS won’t let you claim a loss if you buy a “substantially identical” security within 30 days before or after the sale. This 61-day window (30 days before + sale day + 30 days after) is the wash sale rule, and violating it disallows the loss entirely.

Triggers a Wash SaleDoes NOT Trigger a Wash Sale
Selling Vanguard S&P 500 ETF (VOO) and buying it back within 30 daysSelling VOO and buying iShares Core S&P 500 ETF (IVV)
Selling a stock and buying a call option on the same stockSelling an S&P 500 fund and buying a total stock market fund
Buying the same security in your IRA within the 61-day windowSelling a bond fund and buying a different duration bond fund
Your spouse buying the identical security in their accountWaiting 31+ days and rebuying the original security
IRA Wash Sale Trap
If you sell at a loss in a taxable account and buy the same security in your Roth IRA or Traditional IRA within 30 days, the loss is permanently disallowed — you can’t add it to the IRA’s basis. This is worse than a regular wash sale, where the disallowed loss at least gets added to your new cost basis.

A Worked Example — Full Year of Harvesting

Here’s how tax-loss harvesting plays out over a year for a single filer in the 24% ordinary income bracket with a 15% long-term capital gains rate:

EventAmount
Long-term capital gains realized (stock sales + fund distributions)+$25,000
Short-term capital gains from rebalancing+$5,000
Tax-loss harvesting — long-term loss realized−$18,000
Tax-loss harvesting — short-term loss realized−$5,000
Without HarvestingWith Harvesting
$25,000 LTCG × 15% = $3,750$7,000 net LTCG × 15% = $1,050
$5,000 STCG × 24% = $1,200$0 net STCG (fully offset)
Total tax: $4,950Total tax: $1,050
Tax saved: $3,900

The investor stayed fully invested throughout — they simply swapped into similar funds to realize the losses. The $3,900 in savings compounds for years if reinvested.

When Tax-Loss Harvesting Makes Sense

Good CandidateLess Effective
Taxable brokerage account with realized gainsTax-advantaged accounts (401(k), IRA, HSA) — no gains to offset
High-income earner in 32–37% bracketLow-income filer already in the 0% long-term gains bracket
Diversified portfolio with some positions downConcentrated stock position you can’t find a swap for
Market downturn creating widespread lossesStrong bull market where nothing is trading below basis
Year with unusually large realized gainsYear with no realized gains and income under $3,000 deduction threshold

The Trade-Off: Lower Basis Going Forward

Tax-loss harvesting isn’t a free lunch — it’s primarily a tax deferral. When you reinvest in a replacement fund, your new cost basis is lower. That means when you eventually sell the replacement, you’ll have a larger taxable gain. However, the strategy is still valuable for three reasons:

First, the time value of money — a dollar saved today is worth more than a dollar owed years from now. Second, you might never sell — if you hold until death, the step-up in basis eliminates the deferred gain entirely. Third, your future tax rate might be lower (in retirement, for example), so you defer from a high-rate year and pay in a low-rate year.

Automating Tax-Loss Harvesting

Robo-advisors like Betterment and Wealthfront have popularized automated tax-loss harvesting. These platforms monitor your portfolio daily and execute swaps whenever a position drops below basis by a meaningful amount. For investors with large taxable accounts, the annual tax savings can exceed the advisory fee — making the service effectively free or better.

If you prefer to do it yourself, review your portfolio quarterly or during market pullbacks. Focus on your largest positions first — a 10% loss on a $100,000 position generates $10,000 in harvestable losses. For a complete walkthrough, see our Tax-Loss Harvesting Guide.

Key Takeaways

  • Tax-loss harvesting offsets realized capital gains with realized losses, reducing your current-year tax bill.
  • Up to $3,000 of excess losses can offset ordinary income annually, with unlimited carryforward.
  • The wash sale rule prevents repurchasing a “substantially identical” security within 30 days — swap to a similar but different fund instead.
  • It’s most valuable in taxable accounts for high-income investors with significant realized gains.
  • The strategy defers taxes (lower basis on replacement), but time value of money, potential step-up in basis at death, and future lower rates make it worthwhile.

Frequently Asked Questions

Can I tax-loss harvest in my 401(k) or IRA?

No. Tax-advantaged accounts like a 401(k), Traditional IRA, and Roth IRA don’t generate taxable gains or deductible losses. Tax-loss harvesting only applies to taxable brokerage accounts. However, be careful not to trigger a wash sale by buying the same security in your IRA within 30 days of selling at a loss in your taxable account.

How much can tax-loss harvesting save me per year?

It depends on your portfolio size, market conditions, and tax rate. Studies suggest automated harvesting can add 1–2% in after-tax returns annually for large taxable portfolios. In a year with significant market volatility, the opportunities are larger.

What counts as “substantially identical” for the wash sale rule?

The IRS hasn’t defined this precisely, but buying the exact same stock or fund clearly qualifies. Buying a different fund tracking the same index is a gray area — most tax professionals consider it safe to swap between different providers (e.g., VOO to IVV) or between similar but non-identical indexes (e.g., S&P 500 to Total Stock Market). Just don’t buy the exact same security.

Should I harvest losses year-round or only in December?

Year-round is better. Losses can appear at any time — a March downturn creates harvesting opportunities that may disappear by December. The wash sale window is only 30 days, so you can harvest, wait 31 days, and swap back if you prefer the original fund. Many advisors review monthly or quarterly.