Skip to main content

How Tax-Loss Harvesting Works: A Complete Guide

Tax-loss harvesting offsets capital gains with investment losses. Here is the wash sale rule, the $3,000 deduction, and when this strategy actually helps.

Illustration for How Tax-Loss Harvesting Works: A Complete Guide

You bought a stock at $50. It is trading at $35. That $15-per-share loss sitting in your brokerage account is not just a red number on a screen. It is a potential tax asset. Tax-loss harvesting is the process of selling investments at a loss to offset capital gains elsewhere in your portfolio, reducing your tax bill in the current year while keeping your overall investment strategy intact.

Financial documents and tax forms with a pen on a wooden desk, representing tax planning and investment loss strategies

The concept is simple. The execution has rules that trip people up, most notably the wash sale rule, which the IRS uses to prevent investors from claiming a loss while effectively keeping the same position. Here is how the entire process works, from the basic mechanics to the edge cases that matter.

What Is Tax-Loss Harvesting?

Tax-loss harvesting means selling an investment that has declined in value, realizing the loss for tax purposes, and then reinvesting the proceeds in a similar (but not identical) holding. The realized loss offsets capital gains you have recognized elsewhere.

The offset hierarchy:

  1. Short-term losses first offset short-term gains. Both are taxed at ordinary income rates, which can be as high as 37% federally.
  2. Long-term losses first offset long-term gains. Long-term capital gains rates are 0%, 15%, or 20% depending on income.
  3. Net losses offset the other type. If you have more short-term losses than short-term gains, the excess offsets long-term gains, and vice versa.
  4. Up to $3,000 of net losses offset ordinary income. After all gains are offset, you can deduct $3,000 per year ($1,500 if married filing separately) against wages, salary, and other ordinary income.
  5. Unused losses carry forward indefinitely. There is no expiration on carried-forward capital losses.
Loss TypeFirst OffsetsThen OffsetsAnnual Cap Against Ordinary Income
Short-term capital lossShort-term gainsLong-term gains$3,000 ($1,500 MFS)
Long-term capital lossLong-term gainsShort-term gains$3,000 ($1,500 MFS)
Carried-forward lossCurrent-year gainsOrdinary income$3,000 per year, indefinitely

A Practical Example

Assume you have a taxable brokerage account with the following positions:

PositionCost BasisCurrent ValueGain/Loss
S&P 500 ETF$50,000$58,000+$8,000 (long-term)
International stock fund$30,000$24,000-$6,000 (long-term)
Individual tech stock$15,000$19,500+$4,500 (short-term)

If you sell the international fund, you realize a $6,000 long-term capital loss. That loss offsets your $8,000 long-term gain on the S&P 500 ETF (if sold) dollar-for-dollar, reducing the taxable gain to $2,000. If you also have the $4,500 short-term gain, the remaining losses cannot offset it (they were fully consumed). But if the international loss were larger, the excess would flow to offset short-term gains.

Tax savings at the 15% long-term capital gains rate: $6,000 x 15% = $900.

If the loss instead offsets a short-term gain taxed at 32%: $6,000 x 32% = $1,920.

The same dollar of loss saves you more when it offsets income taxed at a higher rate. This is why the loss hierarchy matters: strategically, you want short-term losses to offset short-term gains first, because the tax rate on short-term gains (ordinary income rates, up to 37%) is higher than long-term gains rates (0-20%).

The Wash Sale Rule: The 61-Day Window

The IRS wash sale rule (Section 1091) exists to prevent a simple abuse: selling a stock at a loss, claiming the deduction, and immediately buying the same stock back. If you buy a “substantially identical” security within 30 days before or 30 days after the sale, the loss is disallowed.

That creates a 61-day window: 30 days before the sale, the sale date itself, and 30 days after.

What triggers a wash sale:

  • Buying the same stock or fund within 61 days
  • Buying a substantially identical security (same fund from the same issuer tracking the same index)
  • Buying the stock in another account you control, including IRAs and 401(k)s
  • Your spouse buying the same security in their account

What does NOT trigger a wash sale:

  • Selling a total U.S. stock market ETF and buying an S&P 500 ETF (different index, different securities, generally not substantially identical)
  • Selling one company’s S&P 500 ETF and buying a different company’s S&P 500 ETF (this is a gray area; the IRS has not issued definitive guidance, but many tax professionals consider different fund families tracking slightly different benchmarks as not substantially identical)
  • Waiting 31 days and then repurchasing the original security

If you violate the wash sale rule, the loss is not permanently gone. It gets added to the cost basis of the replacement shares, which defers the tax benefit until you eventually sell the replacement shares. The loss is postponed, not destroyed.

The $3,000 Ordinary Income Deduction

After offsetting all capital gains, up to $3,000 of remaining net capital losses can reduce your ordinary taxable income. For someone in the 32% federal bracket, that is a tax savings of $960 per year.

If you have $20,000 in net capital losses after offsetting all gains, you deduct $3,000 this year and carry the remaining $17,000 forward. The carry-forward has no time limit. You can use it over the next six years or longer, depending on future gains.

This creates a strategic reserve. In a bad market year, harvesting a large loss and carrying it forward gives you a built-in offset for future years when you might sell appreciated positions, rebalance, or convert a traditional IRA to Roth.

When Tax-Loss Harvesting Makes Sense

  • You have realized capital gains in the same year. Direct offset provides immediate savings.
  • You hold individual stocks or sector funds with losses. These are easier to harvest than broad-market index funds that rarely sit at a loss for long periods.
  • You are rebalancing anyway. If your portfolio needs adjustment, harvesting losses from overweight positions accomplishes two goals at once.
  • You are doing a Roth conversion. Large conversions create significant ordinary income. Carried-forward capital losses offset some of that income at the $3,000/year cap, and capital gains losses offset any investment gains realized in the same year. For more on Roth vs. traditional decisions, see our comparison guide.

When It Does Not Make Sense

  • Your marginal tax rate is 0% on capital gains. Single filers with taxable income below $48,350 in 2026 pay 0% on long-term capital gains. Harvesting losses to offset gains taxed at 0% wastes the loss.
  • You hold the position in a tax-deferred account. Gains and losses inside a 401(k) or traditional IRA are irrelevant until withdrawal. There is nothing to harvest.
  • Transaction costs or tracking complexity outweigh the benefit. If the loss is $200 and the recordkeeping burden is high, the juice is not worth the squeeze.
  • You cannot find a suitable replacement. The 31-day gap creates market exposure risk. If you sell a position and wait 31 days to reinvest, you are out of the market during that window. In a strong rally, the missed gains can exceed the tax benefit.

Common Mistakes

1. Forgetting about dividends. If your mutual fund or ETF pays a dividend that gets automatically reinvested within the 61-day window, that reinvestment can trigger a wash sale on the shares you just sold at a loss.

2. Ignoring spousal accounts. The wash sale rule applies across accounts you and your spouse control. If you sell a fund in your brokerage and your spouse buys the same fund in her IRA, the loss is disallowed.

3. Harvesting losses and then forgetting to reinvest. The goal is to maintain your portfolio allocation while capturing the tax benefit. If you sell your international fund and park the cash in a money market for months, you have changed your investment strategy, not just your tax position.

4. Focusing only on December. Tax-loss harvesting is most commonly discussed in year-end planning, but opportunities can arise any time. A market correction in March or a sector selloff in July can create harvestable losses that disappear if you wait until December.

How It Fits Into a Broader Tax Strategy

Tax-loss harvesting is one tool in a portfolio tax management toolkit that also includes asset location (holding tax-inefficient assets in tax-deferred accounts), Roth conversions, and long-term capital gains rate management. The most effective approach combines all of these, not just one.

For investors with diversified portfolios across taxable, tax-deferred, and Roth accounts, harvesting losses in the taxable account while letting gains compound tax-free in the Roth creates a compounding tax advantage over decades.


Ferrante Capital LLC is a registered investment adviser. Information presented is for educational purposes only and does not constitute investment advice, a solicitation, or a recommendation to buy or sell any security. All investing involves risk, including the possible loss of principal.

FC and its principals may hold positions in securities or asset classes discussed in this article. This analysis is for educational purposes only and does not constitute a recommendation to buy, sell, or hold any security.

Forward-looking statements reflect Ferrante Capital’s current analysis and involve assumptions and estimates. Actual results may differ materially. Past performance is not indicative of future results.

Please consult a qualified financial professional before making investment decisions.