What is Tax-Gain Harvesting?

November 9, 2023 Hayden Adams
Strategically selling your winning investments could reduce current and future taxes.

When it comes to capital gains, the conventional approach is to delay realizing them for as long as possible so you don't have to pay the associated taxes. However, waiting isn't always the best strategy. Sometimes harvesting a gain today can set you up for lower taxes tomorrow.

You can think of such tax-gain harvesting as the less-well-known sibling of tax-loss harvesting. (As a refresher, that's when you sell a depressed asset and use the resulting loss to lower your taxes.) In fact, using them together can help you maximize the benefits of both, as we'll see below.

Finally, it's worth noting that you can harvest gains at any point, but the final few months of the year are a particularly good time to do so as you should already have a sense of your total income and potential tax liability for the year, as well as a target list of tax-loss harvesting opportunities.

Now let's dig in.

How does tax-gain harvesting work?

You can sell investments with a taxable gain for a variety of reasons—to raise cash, rebalance a portfolio, reduce a concentrated position, etc.—but with tax-gain harvesting, you're doing so specifically for tax purposes.

The process is pretty straightforward: You just sell the investment when you think it'll have the least impact on your taxes. If you'd like to keep the investment, you can even turn around and buy it again. Doing so effectively resets the cost basis on which your future tax liability will be calculated. This opportunity isn't available when you're harvesting losses, because of the wash-sale rule. (Just be sure every share you sell is for a gain. If any of them are losses, repurchasing the same asset could trigger a wash sale.)

Before getting into some examples, it's worth keeping a few things in mind:

  • Tax-gain harvesting works only in a taxable account, like a brokerage account. You can't do it in a tax-deferred IRA or 401(k), as you wouldn't realize taxable gains in such accounts.
  • If your taxable capital gains exceed your losses, you could impact tax calculations that look at your modified adjusted gross income (MAGI). This includes whether your Social Security benefits are taxed.

With that in mind, here are three situations in which tax-loss harvesting could make the most sense:

1. You expect to have a "lean" year

For 2023, individuals with taxable income below $44,625 ($89,250 for married couples) pay 0% tax for long-term capital gains (LTCG). In years when you're under the threshold—say, if you're in between jobs, or receive a smaller bonus—you could effectively lock in tax-free long-term gains. The idea would be to realize just enough LTCG to stay within the 0% tax bracket.

For example, a single investor with taxable income of $36,150 for the 2023 tax year (after accounting for the $13,850 standard deduction) could realize up to $8,475 of LTCG without going over the $44,625 threshold for the 0% LTCG tax bracket. If they bought the investment back, they'd reset their cost basis and potentially lower their tax burden in the future.

(Note that this applies only to long-term capital gains; short-term gains on assets held one year or less are taxed as ordinary income.)

Chart shows an investor could realize up to $8,475 of LTCG without going over the $44,625 threshold for the 0% LTCG tax bracket.

Schwab Center for Financial Research. For illustrative purposes only. Representative of 2023 federal tax brackets and does not consider potential state tax effects.

2. You plan to also realize some losses

If you realize a loss on an investment, you can use it to offset your taxable capital gains and potentially lower your ordinary income by up to $3,000.

So, if you plan to lock in some losses this year, you could also realize an equal amount of taxable gains. The losses effectively zero out the gains, likely eliminating the capital gains taxes that might otherwise be due.

Again, if you don't need the proceeds from the sale, you could consider repurchasing the same stock to reset the investment's cost basis. That way, you would pay no tax on the current gain—and any realized capital gain in the future would be based on the new, higher cost basis. 

3. You need to do some portfolio maintenance

Sometimes your winning positions can throw off your portfolio's target asset allocation, as one set of stocks rises faster than the rest. For example, say your tech stocks are doing better than your energy stocks. That could leave you overexposed to volatility in the tech sector and potentially leave you with more market risk than you'd intended.

Selling some of your gainers—ideally along with some losers to help soften the tax hit—can help bring your portfolio back to its target allocation. Then you could use the proceeds to buy some of the laggards.

The bottom line

By strategically harvesting gains in certain tax years, you can potentially reduce your tax liability and keep your portfolio in balance. Be sure to consult your financial advisor and tax professional to implement a strategy that works for your situation.

Learn about tax-smart strategies.

Tax Deduction Basics and Tips

Learn the two main tax deduction types, how tax deductions work, and how they may or may not apply to you and your taxes.

Tax-Smart Strategies for Annual Charitable Giving

Achieve greater impact for the causes you care about by pursuing tax-efficient charitable giving strategies.

The Tax-Planning Life Cycle

Certain tax topics can have an impact on your after-tax wealth. Learn about the tax-planning life cycle and how taxes can affect every stage of your investing journey.

This information provided here is for general informational purposes only and is not intended to be a substitute for specific individualized tax, legal, or investment planning advice. Where specific advice is necessary or appropriate, you should consult with a qualified tax advisor, CPA, Financial Planner or Investment Manager.

Diversification and asset allocation strategies do not ensure a profit and do not protect against losses in declining markets.

Investing involves risk, including loss of principal.

All expressions of opinion are subject to change without notice in reaction to shifting market, economic or political conditions. Data contained herein from third party providers is obtained from what are considered reliable sources. However, its accuracy, completeness or reliability cannot be guaranteed.

Examples provided are for illustrative purposes only and not intended to be reflective of results you can expect to achieve.

Neither the tax-loss harvesting strategy, nor any discussion herein, is intended as tax advice and Charles Schwab Investment Management, Inc. does not represent that any particular tax consequences will be obtained. Tax-loss harvesting involves certain risks including unintended tax implications. Investors should consult with their tax advisors and refer to the Internal Revenue Service (IRS) website at www.irs.gov about the consequences of tax-loss harvesting.

This material is approved for retail investor use only when viewed in its entirety. It must not be forwarded or made available in part.

The Schwab Center for Financial Research (SCFR) is a division of Charles Schwab & Co., Inc.

The Charles Schwab Corporation (Schwab), provides a full range of securities brokerage, banking, money management and financial advisory services through its operating subsidiaries. Its broker-dealer subsidiary, Charles Schwab & Co., Inc. (member SIPC), offers investment services and products. Its banking subsidiary, Charles Schwab Bank (member FDIC and an equal housing lender) provides deposit and lending services and products.