What Is Tax-Loss Harvesting?

What is tax-loss harvesting, and how can it help your portfolio? Learn more about the rules and strategies, and see an example of tax-loss harvesting in action.

https://tickertapecdn.tdameritrade.com/assets/images/pages/md/Grain harvest: Tax-loss harvesting
6 min read
Photo by TD Ameritrade

Should you consider tax-loss harvesting? It’s a process designed to take advantage of the IRS tax-loss harvesting rule that allows realized losses to offset the realized gains in your taxable portfolio. This process may potentially lower your tax liability—on the condition that all the trades are closed out in the same calendar year.

Sound complex? Let’s break it down.

What is tax-loss harvesting? Here are the basics

As most investors know, the more positions you hold, and the longer you’ve been investing, the more likely you are to sustain a capital loss somewhere in your taxable portfolio. And at the same time, you might have realized taxable gains. But the IRS lets you match those gains and losses, and this can potentially lower your tax bill. Even if your losses exceed your gains, you can still claim capital losses—up to $3,000 per calendar year—until the entire amount of capital losses has been claimed.

At its core, tax-loss harvesting is the process of seeking out and culling losing positions to offset capital gains. This can be a manual process—as in the example below. 

To illustrate the tax-loss harvesting strategy in its most basic form, consider two investors: Investor Allen and Investor Bea

Investor Allen:

  • Purchases 1,000 shares of ABCD stock at $10/share on the first trading day of the year.
  • Purchases 1,000 shares of XYZ stock at $10/share on the first trading day of the year.
  • Sells ABCD for $11/share on the last trading day of the same year.
  • Holds XYZ stock, which closes the year at $9/share.  

In this scenario, Investor Allen has a $1,000 profit on his ABCD trade, which will be subject to capital gains tax.

Investor Bea:

  • Purchases 1,000 shares of ABCD stock at $10/share on the first trading day of the year.
  • Purchases 1,000 shares of XYZ stock at $10/share on the first trading day of the year.
  • Sells ABCD for $11/share on the last trading day of the same year.
  • Sells XYZ for $9/share on the last trading day of the same year.

In this scenario, although Investor Bea has the same $1,000 profit as Investor Allen, because Investor Bea sold XYZ before the end of the year, the $1,000 loss on the stock is considered “realized” and may be used to offset ABCD’s gains—potentially eliminating capital gains tax. 

If you don’t have any capital gains or if you have more losses than gains, you can use the losses to offset up to $3,000 of other taxable income per year. After using your losses to offset capital gains and income, you can use any remaining losses to offset gains or income in later years (under current tax laws).

Tax-loss harvesting flow chart
FIGURE 1: WITH AND WITHOUT TAX-LOSS HARVESTING. Hypothetical example for illustrative purposes only.

Beware of the wash sale rule

Investors should educate themselves about the IRS’s wash sale rule, which prohibits them from claiming a tax loss if they open the same security position just recently closed (or a substantially similar security) either 30 days before or 30 days after closing a position for a loss. To evaluate whether you violated the wash sale rule, the IRS reviews the trading activity for all your accounts.

In other words, the IRS looks at trades you place in other accounts at TD Ameritrade, at other brokerage firms, and in IRAs or Roth IRAs, as well as transactions your spouse made and transactions by a business entity you control to determine if you violated the wash sale rule. 

So a trade placed in one account may inadvertently create a wash sale in another account. You should be aware of investments in all of your investment accounts to determine if you run the risk of violating the wash sale rule.

Tax-loss harvesting for your portfolio

There are a couple other potential advantages to tax-loss harvesting. First off, it can help minimize complexity. It’s a wealth management strategy that typically requires either the resources of a full-time advisor to manage or a significant amount of time spent by a client to effectively manage on their own. 

Strategic tax-loss harvesting can help make your portfolio more efficient and potentially improve your after-tax returns. Just remember, as with any tax-related questions, you should talk to your tax professional, who can advise you on what’s appropriate for your specific tax situation.

Call Us

Do Not Sell or Share My Personal Information

Content intended for educational/informational purposes only. Not investment advice, or a recommendation of any security, strategy, or account type.

Be sure to understand all risks involved with each strategy, including commission costs, before attempting to place any trade. Clients must consider all relevant risk factors, including their own personal financial situations, before trading.

All investments involve risk, including loss of principal. Past performance does not guarantee future results. There is no assurance that the investment process will consistently lead to successful investing. Asset allocation and diversification do not eliminate the risk of experiencing investment losses.


Market volatility, volume, and system availability may delay account access and trade executions.

Past performance of a security or strategy does not guarantee future results or success.

Options are not suitable for all investors as the special risks inherent to options trading may expose investors to potentially rapid and substantial losses. Options trading subject to TD Ameritrade review and approval. Please read Characteristics and Risks of Standardized Options before investing in options.

Supporting documentation for any claims, comparisons, statistics, or other technical data will be supplied upon request.

This is not an offer or solicitation in any jurisdiction where we are not authorized to do business or where such offer or solicitation would be contrary to the local laws and regulations of that jurisdiction, including, but not limited to persons residing in Australia, Canada, Hong Kong, Japan, Saudi Arabia, Singapore, UK, and the countries of the European Union.

TD Ameritrade, Inc., member FINRA/SIPC, a subsidiary of The Charles Schwab Corporation. TD Ameritrade is a trademark jointly owned by TD Ameritrade IP Company, Inc. and The Toronto-Dominion Bank. © 2024 Charles Schwab & Co. Inc. All rights reserved.

Scroll to Top