Skip to main content
12 minutes reading time (2300 words)

What is Tax Gain Harvesting?

One of the biggest challenges to overcome when investing is trying to minimize your tax liability. Capital gains taxes can take a significant chunk of your gains if you're not careful. This is why you need to understand various tax strategies e to minimize your tax liability. 

what is tax gain harvesting

Although it may seem a bit counterintuitive at first, tax-gain harvesting may be a viable option in some cases. While you may have heard of tax-loss harvesting, today we want to take a closer look at tax-gain harvesting to see how it works and when it should be deployed. This strategy is a bit more advanced than some others, but it can be beneficial when used effectively. 

Tax Loss Harvesting vs. Tax Gain Harvesting

The best way to understand how tax-gain harvesting works is to look at its opposite - tax-loss harvesting. So, let’s break down these two tactics to see how they can play an impactful role on your taxes when it comes to your investments.

Tax Loss Harvesting

When it comes to paying taxes on investments that you sold during the year, the IRS allows you to offset your gains against any losses (again, this is only from investments you actually sold i.e. realized gains and losses). 

Discover 6 immediate opportunities to lower your taxes. Download the 6 "Hidden" Tax Saving Opportunities Opened Up by New Tax Rules.

If you anticipate having large capital gains from selling some investments, you could then sell others that have lost money to help offset the amount of capital gains taxes you will owe. If your losses are more than your gains, then you'll get to carry those forward to future years. More on that later.

For example, let’s say that you bought two investments at $25 per share. One of them went up to $50, while the other went down to $15. You could sell both at the same time, which would create a net gain of only $15 per share, rather than $25, since you sold the one investment at a $10 loss i.e. $25 gain - $10 loss = $15 gain per share

As far as how tax-loss harvesting works, you sell (harvest) your investments that are down in value to lock in your losses so they can be used to offset any short-term gains, ordinary income or long-term gains. If you do have more losses than gains that you can be offset, then those losses will be carried forward and you can use up to $3,000 of those losses in excess of offsetting capital gains each year until they are exhausted.

Once you've sold these investments at a loss, you now have to figure out what to do with this money since it's now just sitting in cash. One very important thing to note is the IRS doesn't allow you to immediately buy back into the investment you just sold. 

The wash sale rule prohibits investors from buying back the same investments within 30 days before or after the sale of the investment at a loss. You should have an idea of where you want to invest the money before selling your losing position for tax-loss harvesting purposes. 

You could just leave it in cash, but then you would be potentially missing out on any gains over the next 30 days so it's recommended to invest that money into a similar investment for that time period. In order not to violate the wash sale rule and negate the ability to realize that loss you must refrain from investing in the same or a substantially similar investment. 

For example if you sold Vanguard’s S&P 500 index fund at a loss, you would be in violation of the rules if you purchased shares in an S&P 500 index fund offered by Fidelity during the same period. However, if you purchased a total stock market index fund you likely wouldn’t violate this rule. Also, you cannot turn around and buy the same or a similar security inside of another type of account such as an IRA during this period. 

Also remember, capital losses are more tax-efficient if they can be used to offset income taxed at higher tax rates (i.e. short-term capital gains and ordinary income). Thus, longer-term losses used against short-term gains are more tax-efficient than short-term losses being used against long term gains.


Short-Term Gain

Long-Term Gain

Short-Term Loss to offset a...



Long-Term Loss to offset a...





Tax Gain Harvesting

As the name implies, rather than selling losing stock to offset your total gains, you will sell an investment when it has actually gained in value. While this tactic may seem counterintuitive at first, there is an excellent reason to take advantage of selling a winning investment now instead of later. 

Typically, you will want to use tax-gain harvesting when you anticipate your income will be higher in the future thus taking advantage of a lower capital gains tax rate.

Single Filers for 2020

Long-Term Capital Gains Tax Rate

Your Income


$0 to $40,000


$40,001 to $441,450


$441,451 or more

*Short-term capital gains are taxed as ordinary income according to federal income tax brackets.

Married, Filing Jointly for 2020

Long-Term Capital Gains Tax Rate

Your Income


$0 to $80,000


$80,001 to $496,600


$496,601 or more

You also need to be aware of the additional 3.8% tax that applies to net investment income, which at higher income levels could increase your capital gains tax rate by an additional 3.8%. This applies to the smaller of your net investment income or the amount by which your modified gross income is above the limits below.

  • Single or head of household: $200,000
  • Married, filing jointly: $250,000
  • Married, filing separately: $125,000

Another reason to utilize tax-gain harvesting is to increase the cost basis for those particular investments. Because the wash sale rule doesn’t apply to assets that have appreciated, you could potentially rebuy the same investment immediately after selling it (however, it is highly recommended you speak with a tax professional before implementing this strategy). 

Find out how the new tax rules could permanently lower the taxes you pay. Download the 6 "Hidden" Tax Saving Opportunities Opened Up by New Tax Rules.

One thing to keep in mind is that tax-gain harvesting only works in a handful of situations to make it worthwhile i.e. if your capital gains tax rate is going to be lower this year than in subsequent years due to the likelihood of your income increasing. 

We’ll get into more details about those scenarios in the next section, but you have to recognize that this tactic will only make sense if you're going to be paying less in capital gains taxes now than you would in future years (at least based on what we know right now as taxes can always increase or decrease in the future). 

Lastly, before engaging in gain harvesting, be sure to take a look at the economic substance doctrine. IRC § 6662(b)(6) imposes a 20% penalty on any underpayment of tax due to a transaction that lacks economic substance. That penalty increases to 40% if the transaction is not adequately disclosed on the return. IRC § 7701(o) provides that a transaction has economic substance only if: (1) it changes the taxpayer’s economic position in a meaningful way; and (2) the taxpayer has a substantial non-tax reason for entering into the transaction. (Robert Keebler, Top 40 Tax Planning Opportunities 2019). This is why it’s so important to work with a tax professional before implementing this strategy.

Examples Of Tax Gain Harvesting In Action

Let’s break down a few specific scenarios of times when this strategy can work well. As I mentioned before, it’s only applicable for very specific situations.

Example One: Avoiding A Higher Tax Rate

Let’s say that you are going to get a raise next year, which will put you into the 20% capital gains tax bracket causing you to incur the 3.8% net investment income tax on top of the regular capital gains tax rate. To keep your capital gains in the lower 0% or 15% tax brackets because you're making much less, you sell assets this year to pay less in capital gains taxes (however, you must remember that selling these investments could potentially incur the net investment income tax, so plan accordingly). 

Another reason to expect a higher rate in the future is that tax laws can change suddenly. The capital gains earnings limit was raised in 2017, but they could be lowered again at any time. 

With the amount of debt that the government is carrying this could be a real possibility in the future.  Alternatively, the tax rate for capital gains may increase, which could cut an even more significant chunk out of your earnings. 

However, this is all speculation. It is best to make your decision based on current tax rates versus speculation about where future tax rates are headed.

Example Two: Boosting Your Cost Basis

Let’s say that you bought a stock at $30 per share, and it goes up to $40 a year from now. You then sell the investment at the 15% capital gains rate and then rebuy the same stock at the higher price. Remember, the wash rule doesn’t apply to appreciated stocks. 

The next year it moves up to $50 per share. Now, if you sell it again, you will only be looking at a net gain of $10, not $20. In this case, you could again rebuy the stock without incurring either a higher capital gains tax rate or the 3.8% net investment income tax as may have happened if you would have sold it at a $20 per share gain. 

As the stock continues to grow, your goal is to stay below tax thresholds, meaning that you can maintain a more preferable capital gains tax rate and without having to pay the net investment income tax.

The other reason to boost your cost basis is to provide more of a buffer if you want to utilize tax loss harvesting later on. Using this example, if you re-bought the stock at $50 per share and then it plummets back to $30, you can claim a loss of $20. 

If you didn’t do tax gain harvesting in the meantime, you wouldn’t be able to harvest a loss at all, since the current price is identical to your original cost basis. Again, this is complicated and I would recommend consulting a tax professional before implementing any of these strategies.

Example Three: Incurring A Zero Percent Tax Rate

This particular situation will be tough for many investors to achieve. However, I’ll do my best to explain it here.

As we illustrated above, the current income limit in 2020 for individuals to claim zero taxes on gains is $40,000, or $80,000 for joint filers. So, let’s say that either you or your spouse is going to claim significantly less income this year, which means that you will fall well under that limit. For example, let’s say that your joint earnings will be $50,000 in total. 

In this case, you will want to sell appreciated stocks to cover the $30,000 difference. Since your total earnings will be within the threshold, you would pay 0% in capital gains. Overall, you will definitely want to implement this strategy whenever your earnings are below the threshold so that you can take advantage of the 0% capital gains tax rate.

The best part about this example is that you still get the benefit of increasing your cost basis if you reinvest your gains. This way, you can manage to claim a more significant loss later on, or you could minimize your tax rate by having fewer earnings. 


Other Considerations Related To Tax Gain Harvesting

If you look at our examples listed above and they seem like they could apply to you, then definitely speak with a financial or tax professional to make sure. That being said, there are a few other factors to keep in mind when trying to utilize tax gain harvesting so that you don’t get hit with any nasty surprises. 

Find out why you need to take advantage of this limited-time opportunity now before it expires. Download the 6 "Hidden" Tax Saving Opportunities Opened Up by New Tax Rules.

State Tax Rates

Depending on where you live, you may likely have to pay state taxes for any investment earnings. While the federal rate is relatively generous, some states have much lower thresholds, meaning that you may have to pay taxes no matter what. Be sure to research the rates and income limits for your state of residence before trying to take advantage of this strategy. 

Long-Term Investing

The federal tax rates we listed above are for investments that have been held for more than 365 days i.e. long-term gains. If you sell an investment that isn’t held for 365 days, your capital gains tax rate will be the same as your ordinary income tax rate. This means that you can’t take advantage of the lower long-term capital gains tax rates. As a rule, you never want to sell investments before 365 days, unless there is a specific reason to do so. 

Bottom Line: Talk To A Professional

As we mentioned, tax gain harvesting is a relatively advanced investment and tax planning tool, which means that you will need help to understand the finer points of it when trying to put it in action. Be sure to contact a tax professional to discuss your investment options to ensure that this strategy will work in your favor and you’re going about it the right way. And of course, investment decisions should be made for investment reasons first, with the tax benefits being an important, but secondary consideration.

Share This Article

Free Retirement Checkup™

Our free checkup will show you step-by-step how to reduce taxes, invest smarter, and optimize retirement income.

We want you to know exactly how we can help before you pay us a single dollar.

Want a financial newsletter that you'll actually enjoy reading?

Sign up today to receive a weekly newsletter that's surprisingly refreshing.

About the Author

Aurtho Clint Haynes, CFPThis article was written by Clint Haynes, CFP®. Clint is a Certified Financial Planner® and Founder of NextGen Wealth. You can learn more about Clint by reading his full bio here.