What is tax-loss harvesting? | Stash Learn

What is tax-loss harvesting?

By: Team Stash

Published: Jun 13, 2022

•  Updated: Jun 09, 2026

In this article:

  1. How tax-loss harvesting works
  2. Example of tax-loss harvesting in action
  3. IRS rules and tax-loss limits
  4. Benefits of tax-loss harvesting
  5. Risks of loss harvesting
  6. How to claim a loss
  7. Harvest your losses or hold out for long-term growth?
  8. Tax-loss harvesting FAQ:

Tax-loss harvesting is selling investments at a loss to lower your tax liability. The losses you “harvest” could offset up to $3,000 of capital gains or ordinary income, as of the 2021-22 tax year. The basic idea is to make a profit selling some investments while selling others at a loss. Then you subtract the loss from the gain, and only pay taxes on that amount.

There are several factors that affect how tax-loss harvesting works in any given situation, including: short and long-term capital gains taxes, your income, and special Internal Revenue Service (IRS) rules.

And if your investments are in a tax-advantaged account like a 401(k) or an individual retirement account (IRA), tax-loss harvesting can’t be used at all.

How tax-loss harvesting works

If you own taxable investments, tax-loss harvesting could reduce your tax liability by reducing the amount of income subject to capital gains or ordinary income taxes.

Imagine you sold Stock A and Stock B. If you earned $1,000 on Stock A, you have a taxable capital gain. If you sold Stock B at a $400 loss, though, you also have a capital loss. If you subtract the loss from the gain, you’d only owe tax on $600. That’s what’s known as “harvesting” your loss.

Here’s how the process works:

Example of tax-loss harvesting in action

So what is the tax-loss harvesting strategy like in practice? Let’s follow imaginary investor Alex through the process. Alex is single and earns $87,000 per year, paying a marginal tax rate of 24% and a capital gains tax rate of 15% (as of 2021-22).

Alex’s taxes with no loss harvesting: Alex’s taxes with loss harvesting:
Fund A $50,000 unrealized gain, held for 600 days. $50,000 unrealized gain, held for 600 days.
Fund B $7,000 unrealized loss, held for 400 days. Sold and realized a loss of $7,000, held for 400 days before selling.
Fund C Sold and realized a gain of $10,000, held for 500 days before selling. Sold and realized a gain of $10,000, held for 500 days before selling.
Result Alex owes long-term capital gains tax on the $10,000 gain realized from Fund C. At the 15% capital gains tax rate, that’s $1,500. ($10,000 x 15% = $1,500) Alex subtracts the $7,000 loss realized from Fund B from the $10,000 gain realized from Fund C. That comes out to $3,000 in gains; at the 15% capital gains tax rate, Alex owes $450. ($3,000 x 15% = $450)

By selling the investments in Fund B at a loss instead of holding onto them, Alex pays less in capital gains taxes. As long as the amount saved in taxes is more than the amount lost by selling the investments in Fund B, Alex comes out ahead overall for the year.

IRS rules and tax-loss limits

Wash sale rule (30-day rule)

A wash sale is selling a security at a loss and buying “substantially identical” securities in the 30 days prior or following the sale. Wash sales aren’t illegal, but it is illegal to claim a wash sale as a capital loss.

Substantially identical stocks are usually shares of the same corporation. Things can be somewhat more complex with funds. For example, if you sold shares of an exchange-traded fund (ETF) that tracks a specific index, you may run afoul of the wash sale rule if you buy shares in a different ETF that tracks the same index or holds most of the same securities.

Note: The wash sale rule doesn’t reset at the end of the year, even though that’s the deadline for loss harvesting. So if you sold Amazon stock at a loss on December 31 and purchased more Amazon stock on January 3 the following year, it would be a wash sale.

Tax-loss harvesting carryover/carryforward

You can only offset an allotted amount in a given year, regardless of what you may have lost.

Based on the 2021-22 tax year:

You can, however, carry additional loss forward to future tax years, using up to the limit each year until the loss is exhausted. The IRS calls this a carryover or a carryforward. You can use the Capital Loss Carryover Worksheet found in IRS Publication 550 to find out how much you can carry forward.

Benefits of tax-loss harvesting

In practice, the benefits depend on your income, whether you have short-term or long-term capital gains, and your investment strategy.

Long-term capital gains

When you sell stock you’ve owned for more than a year, you earn what’s known as a long-term capital gain. These gains are subject to the capital gains tax rate, which is generally lower than the marginal tax rate on ordinary income. For single filers earning less than $40,400, the capital gains rate is zero, so there’s no tax to be offset. For single filers earning more than that, the rate ranges from 15-20%. The potential upsides of tax-loss harvesting depend on your capital gains tax rate. If you are subject to capital gains tax, you’ll want to calculate how much you can reduce your taxes compared to how much money you’ll lose by selling at a loss.

If your capital gains rate is zero, however, tax-loss harvesting will not benefit you at all if you sell investments you’ve held for over a year.

Short-term capital gains

If you hold a stock for less than a year before selling, the IRS considers the profit you earn a short-term capital gain. In that case, you’d pay your regular marginal tax rate of 12% if you earned $40,000 as a single filer, and higher if your income was over $40,000 (as of 2021-22). Because the marginal tax rate is higher than the capital gains tax rate, the amount by which you can reduce your tax liability with short-term capital losses may be more than with long-term capital losses. But there’s a wide variety of tax brackets and other considerations, so whether you’ll benefit from harvesting short-term capital losses depends on your unique circumstances.

Your investment strategy

If your focus is on the short term, tax-loss harvesting might be a standard part of your investing strategy. But selling investments that have lost value may not align with a buy-and-hold plan that seeks long-term gains. It’s common for stock values to go up and down over time, and some fluctuate more rapidly than others. In some cases, the immediate tax benefits of tax-loss harvesting may be outweighed by lost opportunities for future gains.

Risks of loss harvesting

Tax-loss harvesting comes with some special risk considerations:

How to claim a loss

You claim your capital gains and losses when you file your annual tax return.

Harvest your losses or hold out for long-term growth?

There’s an investment strategy for every kind of investor. You need to choose the one that’s right for your portfolio, but what? Is tax-loss harvesting a winner for you? Consider the following questions to help you decide:

Only you can decide if tax-loss harvesting is right for you, but for many investors, it’s worthwhile to weigh the risks and benefits so you can move forward with confidence.

Tax-loss harvesting FAQ:

1. Is tax-loss harvesting worth it?

Only you can decide what’s right for your portfolio, but it usually offers the greatest benefits to higher earners who hold their investments in taxable accounts and aren’t strict buy-and-hold investors.

That said, it’s likely worthwhile for any investor who holds securities in taxable accounts to weigh the benefits of loss harvesting with the potential long-term impacts on their portfolio.

2. When should you not do tax-loss harvesting?

If you have tax-advantaged retirement accounts like IRAs and 401(k)s, tax-loss harvesting is not applicable. In some cases, your capital gains tax rate may already be zero; in that case, there’s no benefit to loss harvesting.

3. Who benefits from tax-loss harvesting?

Anyone who earns more than $40,400 as a single filer or $80,800 for married filing jointly (as of 2021-22) and has a capital gain could potentially benefit, at least in the short term, from tax-loss harvesting.

4. When should you use tax-loss harvesting?

You might consider using tax-loss harvesting if it will benefit you over both the short and long term. If you’re pursuing a long-term buy-and-hold investment strategy, the short-term benefits could be outweighed by potential long-term costs of selling investments whose value has temporarily fallen but may rise again.

5. What is the last day for tax-loss selling?

Any loss sales must be settled by the last calendar day of the year to offset gains realized in that year.

6. What accounts should use tax-loss harvesting?

Only taxable investment accounts can use tax-loss harvesting. Tax-advantaged retirement accounts like 401(k)s and IRAs are not taxable.

7. Can tax-loss harvesting carry over to the next year?

Typically, yes. You can use the Capital Loss Carryover Worksheet found in IRS Publication 550 to find out how much you can carry forward.