Estimate Time6 min

What is tax-gain harvesting?

Key takeaways

  • Tax-gain harvesting is a strategy of selling appreciated investments during low-income years, paying little or no tax on those gains.
  • Tax-gain harvesting can increase cost basis, potentially reducing future capital gains taxes or creating future tax-loss harvesting opportunities if markets decline.
  • Early retirees may be able to realize gains tax-free before Social Security and RMDs increase taxable income.
  • Tax-gain harvesting takes careful consideration and in general should not be undertaken in the same year as tax-loss harvesting.

You may be familiar with the strategy called tax-loss harvesting, which is selling investments that have lost value and then applying the losses to offset realized capital gains elsewhere in your portfolio. If losses exceed the gains, you can use the excess to offset a small amount of ordinary income tax now and in future years.1

What is tax-gain harvesting?

But an equally powerful strategy is called tax-gain harvesting, which allows you to sell securities when they’ve gained value and then repurchase them at their new price, thereby resetting their cost basis.

Tax-gain harvesting could be useful in years when you are in a lower tax bracket. But it could be especially useful for early retirees, who might fall into low- or even no-tax brackets for a period of time, for example in the years before Social Security benefits and required minimum distributions (RMDs) begin.

Note: You don’t have to repurchase the same security you sold for tax-gain harvesting to be useful. You also can invest in a different security, which could be a helpful part of rebalancing a portfolio in retirement as you move towards more stable, fixed-income investments.

How does tax-gain harvesting work?

If used as part of a tax-efficiency strategy in or near retirement, tax-gain harvesting may let you reset the value of an investment at a time when your tax rate is low. You essentially step up the cost basis to the new security price going forward, allowing you to potentially reduce capital gains in the future while also positioning you to use tax-loss harvesting for additional tax savings if the investment subsequently declines in value.

Here’s a simple example of how tax-gain harvesting could work:

  • Imagine a recently retired married couple, both age 65 and living in Florida, with a $100,000 portfolio.
  • The original cost basis of their investments was $50,000 and they have $50,000 in gains.
  • Because they are 65, they have not yet reached the RMD starting age (currently 73). Further, let’s assume they have not yet started claiming their Social Security benefits.
  • With no income from a job and living off funds in their checking and savings accounts, their federal ordinary income tax rate is effectively 0%, and so is their long-term capital gains tax rate for taxable income up to $98,900 in 2026.
  • Along with the standard deduction ($32,200 for a married couple filing jointly in 2026), the additional standard deductions for those age 65+ ($1,650 each for a married couple filing jointly in 2026), and the new additional senior deductions of up to $6,000 each in 2026, they could potentially realize up to $146,400 in taxable gains before owing federal income tax. For individual filers or couples who itemize deductions, this amount could be even higher.

By selling and repurchasing the position during a 0% tax-rate year, they can potentially pay no federal tax on their $50,000 of gains and reset the basis of their portfolio to $100,000. That could be important if their income is higher in future years due to taking RMDs and collecting Social Security benefits, which could push their capital gains rate to 15% or more.

Who should use tax-gain harvesting?

While this is a hypothetical scenario, it mirrors a phenomenon many retirees encounter when they enter something Fidelity calls the “retirement income valley.” It’s a period shortly after retirement, when you no longer receive a paycheck but before you collect Social Security benefits and must start taking RMDs, when your federal tax rate can fall as low as 0%.

Once you start receiving Social Security benefits and RMDs, your income rises, and so can your ordinary and capital gains rate, which would potentially increase the tax rate on any sale of appreciated investments.

In essence, tax-gain harvesting is a good opportunity to reset the basis of the security, potentially giving you more flexibility in later years. As we’ll explore further, the resetting of basis can allow you to employ tax-loss harvesting on the reset value.

Tax-gain harvesting vs. tax-loss harvesting

The value of each tactic is slightly different. While tax-loss harvesting can potentially reduce taxes in the present, tax-gain harvesting provides an opportunity to reset cost basis, thereby potentially reducing taxes in the future.

Here’s a quick breakdown of key differences between tax-gain harvesting and tax-loss harvesting:

Comparison of tax-loss and tax-gain harvesting, showing what each strategy is, potential tax benefits, wash sale rule treatment, and when investors may consider using each approach.

How tax-loss harvesting and tax-gain harvesting can work together

Think of tax-gain harvesting as an additional tool in your tax-planning toolbox for retirement. When used in conjunction with tax-loss harvesting, it can be a potentially powerful way to save money on taxes in different market scenarios.

For example, let’s assume that the same $100,000 stock position above loses 20% of its value after the basis is reset. The couple could then use tax-loss harvesting to realize the $20,000 in losses, which they could use that year or carry forward to future years.

By contrast, if the couple had not used tax-gain harvesting to reset their cost basis higher, then they would have a potential $30,000 taxable gain and no tax-loss opportunity.

Comparison of portfolios with and without tax-gain harvesting, showing how harvesting gains in a 0% tax year resets cost basis, can create a potential tax loss opportunity in later years, and avoids future taxable gains.
Comparison of portfolios with and without tax-gain harvesting, showing how harvesting gains in a 0% tax year resets cost basis, can create a potential tax loss opportunity in later years, and avoids future taxable gains.
We assume securities in this hypothetical example are held for more than 1 year and are therefore subject to long-term capital gains rates. Assumes that in year 2 investors' taxable income puts them in the 15% long-term capital gain tax bracket. State and local taxes not considered.

If the married couple had chosen not to step up the cost basis of their portfolio using tax-gain harvesting, they would not be able to use tax-loss harvesting in year 2. If they sold the position in year 2 and realized the $30,000 taxable gain, they could potentially face a tax bill of $4,500.

Note: It takes careful tax planning to perform both tax-loss harvesting and tax-gain harvesting in the same year─the losses can offset the gains you planned to harvest. This can be avoided by waiting to tax-loss harvest in the subsequent tax year and outside the wash-sale window.

What are drawbacks to tax-gain harvesting?

Although there are many potential tax benefits to tax-gain harvesting, here are 3 potential drawbacks:

  • Even if your federal tax rate is 0% you may still potentially owe state tax on capital gains, although many states offer deductions on capital gains, and 9 states have no income tax.
  • Tax-gain harvesting creates taxable income. Although it may not trigger capital gains taxation if taxable income is within the 0% long-term capital gains bracket, it could still affect Medicare IRMAA surcharges or Social Security taxation, as well as trigger phaseouts for some tax deductions and credits.
  • It could also reduce your existing capital-loss carryforwards. If you have losses from prior years, those generally must be used to offset current-year gains. You cannot elect to save them for a later year.

Consult a tax advisor on how additional taxable income could affect your personal tax situation.

The bottom line on tax-gain harvesting

Used together, tax-gain harvesting and tax-loss harvesting can potentially reduce lifetime tax bills—and possibly increase savings—for many retirees or anyone experiencing lower-income years. However, it’s important to understand that both tax-loss harvesting and tax-gain harvesting may not be for everyone, depending on their financial situations. Remember to consult with a tax and financial professional to create a tax strategy that works for you.

Looking to keep more of what you earn?

Consider our comprehensive, tax-smart investing approach.

More to explore

Try our Tax-Loss Harvesting ToolLog In Required

Check your gains and losses for potential tax savings.

Tips on taxes

Ideas to help reduce taxes on income, investments, and savings.
1. Tax-loss harvesting allows you to deduct up to $3,000 ($1,500 if married filing separately) in net capital losses a year against ordinary income. Remaining losses generally may be carried forward into future years.

This information is intended to be educational and is not tailored to the investment needs of any specific investor.

Fidelity does not provide legal or tax advice. The information herein is general and educational in nature and should not be considered legal or tax advice. Tax laws and regulations are complex and subject to change, which can materially impact investment results. Fidelity cannot guarantee that the information herein is accurate, complete, or timely. Fidelity makes no warranties with regard to such information or results obtained by its use, and disclaims any liability arising out of your use of, or any tax position taken in reliance on, such information. Consult an attorney or tax professional regarding your specific situation.

Fidelity Brokerage Services LLC, Member NYSE, SIPC, 900 Salem Street, Smithfield, RI 02917

1285523.1.0