MANY PEOPLE ARE familiar with tax loss harvesting, where you sell a losing security/ETF and rebuy a similar, not identical, security/ETF.
But often we don’t really think about the opposite side of the coin: sell a winning security/ETF and rebuy the exact same, or a different, security/ETF.
That strategy is called tax gain harvesting, and because it’s a gain, the wash sale rule doesn’t apply.
Execution
Long-term capital gains can be taxed at 0% depending on your income. That’s how this strategy is executed.
The main benefit isn’t paying 0% tax, it’s resetting your cost basis higher, so future gains are smaller when your income (and hopefully the tax bracket) rises.
For 2025, if your filing status is single and your taxable income is up to $48,350, the long-term gains are taxed at 0% on the federal level. If your filing status is married filing jointly and your taxable income is up to $96,700, the long-term gains are taxed at 0% on the federal level.
The taxable income part is important because it means that the amount is after the standard deduction was applied, which means that your gross income can be ~$64,100 ($15,750 standard deduction for single in 2025) or $128,200 ($31,500 standard deduction for married in 2025).
For example, say that you just started your career and bought $1,000 worth of VTI in your brokerage account. The VTI is now worth $2,000 after 4 years. Since this individual is early in their career, the W-2 income is $50,000.
If this individual sold VTI for $2,000 ($1,000 of long-term gain), and automatically re-bought it, the total gross income for the year would be $51,000. After the standard deduction is applied, the taxable income is $35,250, which means that $1,000 of long-term gains will be taxed at 0% on the federal level.
Note: the gains must be long-term, which means that you’ve held for longer than a year. Otherwise, the short-term gain will apply and will be taxed at your ordinary income tax rates.
Because we rebought, the cost basis increased to $2,000, which means that in the future when we do have to sell it again and cash out, our gain will be calculated using the $2,000 cost, and not the $1,000 as it would’ve originally without doing the strategy. This could be helpful once you are in the 15% or 20% capital gains tax bracket.
Generally, for tax gain harvesting you want to sell specific shares. You can set your cost method to specific identification within the brokerage account to sell specific lots and correctly calculate the amount of gain that would apply to your sale. It’s also generally better to harvest gains on the shares with the lowest gains (highest cost basis).
This strategy applies only to taxable brokerage accounts. It doesn’t apply to tax-advantaged accounts such as IRAs or 401(k)s.
If you have capital loss carryforwards, tax gain harvesting can also be used to “use up” those losses in a low-income year without actually paying any tax. For example, if you have $3,000 of capital loss carryforwards, you can realize $3,000 of long-term gains tax-free and effectively “refresh” your cost basis.
When executing, remember that you’re still selling a security, which means there’s a small risk of market movement between the sale and repurchase. If you sell and rebuy the same ETF immediately, you’re exposed to short-term price changes during that brief window, so consider doing it asap.
The thresholds for 0% long-term capital gains are indexed for inflation, so they typically rise each year.
Your brokerage will report the sale on Form 1099-B, so make sure your cost basis is all correct and is updated for the purchase.
Further considerations:
State/local taxes
Typically, if the state and local taxes will apply to your situation, it’s not recommended to do the gain harvesting strategy. This is because on $1,000 of gain you may have to pay $50-100 of state taxes, and the opportunity cost associated with the tax payment could outweigh the benefit.
This strategy is best for people who don’t have state taxes and/or live in states that don’t tax capital gains. The 0% rate applies only on the federal level.
Tax credits
In our example, the extra $1,000 long-term capital gain increased your income. Tax credits generally depend on your modified adjusted gross income and they could be phased out or completely eliminated depending on your income.
This means that tax gain harvesting could result in some credits being unavailable (for example, the Earned Income Tax Credit or Saver’s Credit).
You have to analyze your specific scenario and attributes to see whether this makes sense. The easiest way would be to enter information into a tax software with before and after scenarios to analyze the impact.
Taxability of other items
There are certain taxability rules that are dependent upon your income.
For example, Social Security benefits could be taxed at 0% depending on your provisional income. Harvesting gains could result in increasing your provisional income, which could push how much of your Social Security benefits are taxed.
This is another area that needs careful consideration.
In addition, ACA credits also have to be taken into account, if they apply to you.
Is the juice worth the squeeze?
It depends on how much you can harvest and on your income. If you are a married couple making $100,000 of total W-2 income, you can harvest a lot of gains, which could result in substantial savings if state taxes and other rules aren’t applicable to your scenario.
But if you are harvesting a few hundred every year, it will likely make a minimal impact.
The strategy itself isn’t too complicated if you can correctly analyze your income and potential credits. The challenge could come where you receive a bonus on 12/25 that you didn’t think through, or some spot bonuses that could push your income higher.
If you have to pay state taxes or sacrifice credits, it’s generally not advisable to harvest your gains.
Bogdan Sheremeta is a licensed CPA based in Illinois with experience at Deloitte and a Fortune 200 multinational.
Does it really matter which shares you sell when harvesting gains? Seems to me that only the total gain, which is also the amount the basis is stepped up by, matters.
It makes sense when loss harvesting to sell the shares with the largest losses (highest cost basis).
Only to the extent that you’ve held the shares for over one year to qualify for long term capital gain treatment
The real winners here can be young people who have appreciated assets in taxable accounts. If you or family members bought stock / funds in a UTMA account for your children when they were young, they likely have massive unrealized gains. These can be recognized using this strategy when they finish college or in early working years when they have low earned income.
I did this for my kids as soon as they graduated from college and were no longer claimed as dependents on my return. It allowed me to reinvest the full amount of their assets with a current tax basis. Nice result.
What I got from this article is that tax laws are far too complicated and unfair.
Thanks for this. The part I learned today: “The taxable income part is important because it means that the amount is after the standard deduction was applied, which means that your gross income can be ~$64,100 ($15,750 standard deduction for single in 2025) or $128,200 ($31,500 standard deduction for married in 2025).”
It’s interesting that capital gains tax rates are based on income after the standard deduction is applied, yet other things like income limits for the Affordable Care Act use income before taking the standard deduction. Hard to keep track of all these rules.
Excellent article. Your example gets at it, but specifically the “stackable” of other income sources is a key complexity to understand as most people will have other income than their cap gains. I screwed up my LT cap gain sale last year due to not calculating this entirely correct.
Interesting. I wrote a bit about this in one of my early HD articles. This one is much better.
I thought the article was going to consider a scenario of harvesting gains early at the 15% rate if one expects overall income to be higher in retirement. That might be interesting. The other side of doing this, is that if left alone, capital gains will eventually get a step up in cost basis.