Most investors are familiar with tax-loss harvesting — selling investments at a loss to offset gains. Far fewer know about its mirror image: tax-gain harvesting. This strategy involves intentionally selling appreciated investments at a gain when your income is low enough to qualify for the 0% long-term capital gains rate — then immediately repurchasing the same investment to reset your cost basis to the higher price.[2]
The result: you realize gains tax-free, permanently eliminate the embedded tax liability, and start fresh with a higher basis. For retirees in the right income range, this is one of the most powerful and underused strategies in the tax code.
How the 0% Capital Gains Rate Works
Long-term capital gains (on assets held more than one year) are taxed at three rates: 0%, 15%, or 20%, depending on your taxable income. For 2026, the 0% rate applies to taxable income up to:[1]
- Single: $49,450
- Married Filing Jointly: $98,900
- Head of Household: $66,250
Critically, “taxable income” here includes both ordinary income and long-term capital gains. Ordinary income fills the bracket first — from the bottom up — and capital gains stack on top.[4] This means your ordinary income determines how much room you have for 0% gains.
For example, a married couple filing jointly with $40,000 in ordinary taxable income (after deductions) has $58,900of room in the 0% capital gains bracket ($98,900 − $40,000). They could realize up to $58,900 in long-term capital gains and pay zero federal tax on those gains.
The Mechanics: Sell, Rebuy, Reset
Tax-gain harvesting is straightforward in execution:
Step 1: Identify appreciated holdings. Look for stocks, ETFs, or mutual funds in your taxable brokerage account with significant unrealized gains. The larger the embedded gain relative to your basis, the more valuable the harvest.
Step 2: Calculate your available 0% room. Estimate your total taxable income for the year (after the standard deduction), then subtract from the 0% threshold for your filing status. The result is the maximum gain you can realize at the 0% rate.
Step 3: Sell and immediately repurchase. Sell enough shares to realize gains up to your available 0% room. You can repurchase the identical security immediately — there is no wash sale restriction on gains.[3] The wash sale rule under IRC Section 1091 applies only to losses, not gains. This is a key advantage over tax-loss harvesting, which requires waiting 30 days or buying a different security.
Step 4: Your new cost basis.After the sale and repurchase, your cost basis resets to the current market price. The gain you realized is permanently erased from your tax liability. If you hold the shares until death, your heirs still get a stepped-up basis — but you've already captured the benefit during your lifetime.
Capital Gains Bump Zone Calculator
Enter your income to see exactly how much room you have in the 0% capital gains bracket.
The “Golden Window” for Retirees
Tax-gain harvesting is most valuable during what financial planners call the golden window — the years after retirement but before Social Security benefits and required minimum distributions (RMDs) begin.
During this window, a retiree's ordinary income may consist only of a small pension, modest investment income, or withdrawals from taxable accounts. With the 2026 standard deduction of $32,200 (MFJ) or $16,100 (single), plus the additional deduction for taxpayers 65+ ($1,600 each for MFJ, $2,000 for single), a married couple age 65+ could have up to $35,400 in gross income before any taxable income appears.[1]
That means the entire $98,900 0% capital gains bracket is nearly available for gain harvesting. A couple could potentially realize $98,900 or more in long-term gains completely tax-free each year during the golden window.
Once Social Security starts (especially at higher benefit levels) and RMDs kick in at age 73, ordinary income fills up more of the bracket space, leaving less room for 0% gains. The golden window may be the only opportunity to harvest gains at this scale.
Coordinating with Roth Conversions
Here's the tension: Roth conversions and tax-gain harvesting both compete for the same low-bracket space. A Roth conversion is treated as ordinary income, which fills the bracket from the bottom. Capital gains stack on top. If your Roth conversion uses up all the room below the 0% gains threshold, there's no space left for tax-free gain harvesting.
Example:A married couple has $30,000 in other ordinary income (after deductions). They have $98,900 − $30,000 = $68,900 of space below the 0% capital gains ceiling. They can use that space in three ways:
- All Roth: Convert $68,900 to Roth, leaving no room for 0% gains
- All gains: Harvest $68,900 in capital gains at 0%, but do no Roth conversion
- Split: Convert $40,000 to Roth and harvest $28,900 in gains at 0%
The optimal split depends on your specific situation. Roth conversions are generally more valuable when your Traditional IRA balance is large and RMDs will push you into high tax brackets. Gain harvesting is more valuable when you hold highly appreciated taxable assets that you plan to sell eventually. In many cases, a split approach provides the best overall outcome.
Watch Out: Interactions with Social Security and IRMAA
Realized capital gains increase your adjusted gross income, which can trigger or worsen two other retirement tax traps:
The Social Security tax torpedo. Capital gains count toward provisional income, which determines how much of your Social Security benefits are taxable. Even gains taxed at 0% still increase provisional income and can push your Social Security taxation from 50% to 85% of benefits.[5]If you're already receiving Social Security, each dollar of realized gains may make $0.50 to $0.85 of benefits taxable — creating a hidden tax on the gains themselves.
IRMAA Medicare surcharges.Capital gains are included in MAGI for IRMAA purposes. A large gain harvest in 2024 can trigger IRMAA surcharges on your 2026 Medicare premiums. If you're already near an IRMAA threshold, even modest gain harvesting could push you into a higher tier.[1]
Mitigation: The golden window strategy naturally avoids both of these interactions — if you harvest gains before starting Social Security and beforeenrolling in Medicare, neither the torpedo nor IRMAA applies. This is another reason why the early retirement years (59–64) are so valuable for this strategy.
Practical Tips for Tax-Gain Harvesting
1. Use specific lot identification. When selling, instruct your broker to sell specific tax lots (the shares with the lowest basis, i.e., the largest gains). This maximizes the amount of gain you reset per dollar sold.[3]
2. Account for state taxes. The 0% rate is a federal benefit. Most states tax capital gains as ordinary income, so you may still owe state tax on harvested gains. States like Florida, Texas, Nevada, and Washington have no state income tax, making them ideal for this strategy.
3. Don't forget the Net Investment Income Tax. If your MAGI exceeds $200,000 (single) or $250,000 (MFJ), the 3.8% NIIT applies to net investment income, including capital gains. Stay below these thresholds or factor the NIIT into your calculation.
4. Harvest every year.Tax-gain harvesting is not a one-time event. Repeat the process annually during the golden window. Each year you reset the basis, and each year new appreciation accumulates that can be harvested the following year. Over a 5–10 year window, you can eliminate hundreds of thousands of dollars in embedded gains.
5. Consider the ACA cliff.If you're under 65 and on a Marketplace health plan, realized capital gains increase your MAGI, which can push you over the ACA subsidy cliff at 400% FPL. For early retirees on ACA plans, the subsidy value often exceeds the tax savings from gain harvesting — so model both before acting.
Roth Conversion Calculator
Model the optimal split between Roth conversions and tax-gain harvesting for your situation.
Key Takeaways
Tax-gain harvesting is the mirror image of tax-loss harvesting — and for retirees in the 0% capital gains bracket, it can be even more valuable. By selling and repurchasing appreciated assets during low-income years, you permanently reset your cost basis and eliminate future tax liability on those gains.
The strategy is most powerful during the golden window between retirement and the start of Social Security and RMDs. It requires coordination with Roth conversions (which compete for the same bracket space) and awareness of interactions with the Social Security torpedo, IRMAA, and the ACA subsidy cliff. Use the calculators on this site to model your specific numbers and find the optimal approach.
Sources & References
- [1]IRS Revenue Procedure 2025-25 — Inflation Adjusted Items for 2026 https://www.irs.gov/irb/2025-15_IRB#REV-PROC-2025-25
- [2]IRS Topic No. 409 — Capital Gains and Losses https://www.irs.gov/taxtopics/tc409
- [3]IRS Publication 550 — Investment Income and Expenses https://www.irs.gov/publications/p550
- [4]IRC Section 1(h) — Maximum Capital Gains Rate https://www.law.cornell.edu/uscode/text/26/1
- [5]IRS Publication 915 — Social Security and Equivalent Railroad Retirement Benefits https://www.irs.gov/publications/p915