Skip to main content
Mega Backdoor Roth and Power Moves

Tax-Gain Harvesting: Optimizing Retirement Withdrawals

Pomegra Learn

How can I harvest capital gains to optimize my retirement tax brackets?

Tax-gain harvesting is an advanced withdrawal strategy where a retiree deliberately realizes capital gains in low-income years (often early retirement or between major income events) to "fill" the available room within a favorable tax bracket, then simultaneously harvest capital losses to offset those gains. The technique acknowledges that the long-term capital gains tax rate (0%, 15%, or 20% in 2024–2025, depending on income) is dramatically lower than ordinary income tax rates. By strategically selling appreciated assets in low-income years—when your total income would otherwise push you into a higher bracket—you can realize gains at a discounted rate, gradually repositioning your portfolio toward higher-basis assets and freeing money for future spending. For a retiree with $100,000 annual expenses and $300,000 in unrealized gains across their taxable portfolio, tax-gain harvesting can systematically convert pre-tax gains into mostly tax-free withdrawals over retirement.

Quick definition: Tax-gain harvesting is selling appreciated securities in low-income years to realize gains at favorable capital gains rates, filling available tax-bracket space before higher income arrives.

Key takeaways

  • The three long-term capital gains tax brackets (0%, 15%, 20%) are much lower than ordinary income rates (10%–37%); using these favorable brackets during low-income years is key.
  • Tax-loss harvesting (selling losers to offset gains) pairs perfectly with gain harvesting; they're complementary tactics, not separate strategies.
  • Retirees in the 0% capital gains bracket can earn $93,750 (married filing jointly, 2024–2025) with zero federal tax on gains; using this space strategically is like getting a free money boost.
  • The strategy requires detailed tax planning to account for Medicare premiums (IRMAA), Social Security taxation, and other income-dependent benefits that may be disrupted by realized gains.
  • Timing matters: harvest gains in years with lower ordinary income (sabbaticals, part-time work, early retirement before major distributions).
  • Coordinating gain harvesting with Roth conversions, Required Minimum Distributions (RMDs), and charitable giving amplifies tax efficiency.

The three long-term capital gains brackets

For 2024–2025, long-term capital gains (investments held >1 year) are taxed at preferential rates based on taxable income:

0% bracket: For single filers, the 0% bracket runs from $0 to $47,025 of taxable income. For married filing jointly, it extends to $94,050. Gains realized within this space are taxed at 0%—fully tax-free.

15% bracket: Single filers pay 15% on gains from $47,025 to $518,900 of taxable income; married filers, $94,050 to $583,750. This is still far lower than the ordinary income rate at similar income levels (22%–24%).

20% bracket: Any gains above the 15% threshold are taxed at 20%, plus the 3.8% Net Investment Income Tax (NIIT) may apply for high-income earners, bringing the effective rate to 23.8%.

The power of tax-gain harvesting is filling the 0% bracket. If you're a married retiree with $30,000 annual spending, your taxable income might be only $10,000 (after standard deduction). You have $84,000 of unused space in the 0% bracket. By selling appreciated assets and realizing $84,000 in gains, you fill that bracket and owe zero federal tax—a massive advantage over the alternative (realizing those gains in later years when you're in the 15% or higher bracket).

When to harvest gains: low-income years

Tax-gain harvesting is most valuable during years when your ordinary income is unusually low:

Early Retirement Phase (Ages 50–62): Before Social Security or Required Minimum Distributions, a retiree's income might be only investment distributions or part-time work. This is prime time for harvesting gains. A 55-year-old retiring early with no pension and no Social Security can structure $40,000 in annual spending from gains while staying in the 0% bracket, then withdraw principal or more gains later at minimal tax.

Sabbatical Years: A self-employed consultant or employee on unpaid leave has zero or minimal ordinary income. Realize capital gains strategically during the sabbatical; the low year masks the tax impact.

Bridge Years Before RMDs: At age 72, Required Minimum Distributions begin, forcing you to withdraw pre-tax retirement account funds. The RMD is added to ordinary income, potentially pushing you into higher brackets. Harvesting gains from ages 59½–72 (when you control your income) is wise; once RMDs arrive, you lose control.

Years with Roth Conversions: A retiree planning annual Roth conversions will spike ordinary income that year. Gains realized that year will be taxed at high marginal rates. Instead, harvest gains in non-conversion years when ordinary income is lower.

The decision tree: when to harvest

Real-world examples

Example 1: Early Retiree Using the 0% Bracket Sarah, age 56, retired early with a $500,000 taxable portfolio (mostly index funds purchased over 20 years, now worth $1.2 million). Unrealized gains: $700,000. Her annual spending is $50,000, funded by dividends and selective withdrawals. Her taxable income: ~$8,000 (after standard deduction and modest dividends). She has $86,000 of unused 0% bracket space (married filing jointly). She sells $86,000 worth of her most-appreciated index fund shares, realizing $60,000 in gains and $26,000 in principal. Total income that year: $8,000 (dividends) + $60,000 (realized gains) = $68,000 taxable income. She owes $0 in federal tax on the gains. Her cost basis in the portfolio just increased, so future realized gains will be lower. She repeats this strategy annually for 12 years until age 68, harvesting a cumulative $600,000+ in gains at 0% rate—effectively converting low-basis assets to high-basis assets in a tax-free manner.

Example 2: Sabbatical Year Gain Harvesting James, a 48-year-old surgeon, took a two-year sabbatical with zero income. His wife continued working ($90,000 salary). Filing separately, James's taxable income was ~$15,000 (standard deduction only). His 0% bracket had $32,000 of space. He harvested $32,000 in long-term gains from his personal investment account. The gains were taxed at 0%, and he converted low-basis holdings to high-basis. Meanwhile, his wife filed separately (suboptimal due to marriage penalties, but it isolated her higher income from his gain harvesting). When he returned to work, he had fewer unrealized gains to contend with in high-income years.

Example 3: Coordination with Roth Conversion Lisa, age 60, planned a $150,000 Roth conversion (taxable event). She knew that year's ordinary income would spike to $200,000+, placing her in the 24%+ bracket. She deferred gain harvesting that year. Instead, she harvested $100,000 in long-term gains the previous year when her ordinary income was only $40,000. That year, her taxable income was $140,000—high enough to partly exceed the 0% bracket but low enough that the marginal rate on the gains was only 15%. She avoided the 24% rate entirely. The next year, she executed the Roth conversion without compounding her tax burden via gain harvesting.

Tax-loss harvesting: the complement

Tax-loss harvesting pairs naturally with gain harvesting. In the same low-income year, if your portfolio has any underwater positions (losses), sell them to realize capital losses. These losses directly offset the gains you're harvesting, potentially turning a $86,000 gain harvest into a $40,000 net gain (if you harvest $50,000 in losses).

Wash-sale rule caveat: If you sell a security at a loss, you cannot repurchase it (or a substantially identical security) within 30 days before or after the sale. Many retirees solve this by buying a different index fund temporarily. For example, sell Vanguard Total Stock Market ETF (VTI) at a loss, buy iShares Total US Stock ETF (ITOT) immediately, then swap back 31 days later. This "loss harvesting" preserves the tax loss while maintaining market exposure.

Managing Medicare premiums (IRMAA)

The biggest hidden risk in gain harvesting is the Medicare Income-Related Monthly Adjustment Amount (IRMAA). Retirees aged 65+ pay higher Medicare premiums if their modified adjusted gross income (MAGI) exceeds certain thresholds. For 2024, the IRMAA threshold for married couples is $194,000; above that, premiums increase by $70–$560/month per person.

If you harvest $86,000 in gains and your ordinary income is $40,000, your MAGI becomes $126,000—safely below the IRMAA threshold. However, if your ordinary income is already $150,000 (from pensions, Social Security, RMDs), harvesting gains pushes MAGI to $236,000, triggering IRMAA surcharges of up to $1,120/month ($13,440/year for a couple). The benefit of a 15% capital gains rate (vs. 20%+) is erased by the Medicare premium increase. Solution: Model IRMAA carefully before harvesting; sometimes deferring gain harvesting to preserve IRMAA thresholds is smarter.

Coordination with charitable giving

Retirees over 72 with Required Minimum Distributions can use Qualified Charitable Distributions (QCDs) to satisfy RMD obligations tax-free. If you're also harvesting gains, coordinate them: QCDs reduce adjusted gross income, potentially preserving more room in favorable capital gains brackets.

Example: A retiree has a $50,000 RMD. Instead of taking it as income (raising MAGI), use a $50,000 QCD to a charity (doesn't count toward income). Now harvest $80,000 in gains in the 0% bracket that were previously blocked by the RMD. The QCD created additional bracket space.

Common mistakes

Mistake 1: Harvesting without checking the wash-sale rule. A retiree sells 100 shares of Apple at a loss to harvest the loss, then immediately buys 100 shares again, thinking the strategy is complete. The IRS disallows the loss due to the 30-day wash-sale rule, negating the tax benefit. Solution: Sell the security at a loss, wait 31+ days before repurchasing identical or substantially identical securities, or buy a different security temporarily. Use a tax professional to track wash-sale windows, especially across December year-end.

Mistake 2: Realizing too many gains in a single year and triggering higher bracket + IRMAA. A retiree harvests $200,000 in gains in an already-high-income year (pension + RMDs), jumping from 22% ordinary bracket to 24%, and triggering IRMAA. The net tax rate on those gains is 24%+3.8% (NIIT)+$15,000 (IRMAA impact) = effectively 30%+. The harvest was counterproductive. Solution: Spread harvests over multiple years. Better to harvest $50,000/year over four years than $200,000 in one year.

Mistake 3: Forgetting to rebalance after harvesting. A retiree harvests all their appreciated large-cap stock to fill a 0% bracket, leaving the portfolio too heavily weighted in bonds. The portfolio drifts from its target allocation. Solution: After harvesting, reinvest proceeds in the underweighted asset class (e.g., if you sold stocks, buy more stocks). You just reorganized basis; rebalance to restore asset allocation.

Mistake 4: Harvesting gains in the wrong account. Tax-gain harvesting is only relevant in taxable accounts. Harvesting inside an IRA or 401(k) has no tax benefit (it's already tax-deferred or tax-free). Many retirees confuse the two. Solution: Clearly separate taxable and tax-deferred accounts. Harvest gains only from taxable accounts; leave tax-deferred accounts alone except for required distributions.

Mistake 5: Ignoring state income tax. Federal capital gains rates are 0%, 15%, 20%, but state income tax applies in most states. California taxes long-term gains as ordinary income (up to 13.3% state rate). New York adds ~6.85% state tax on gains. Harvesting gains in high-tax states is less advantageous. Solution: Relocate to a low-tax state before retired (or model the strategy with state taxes included).

FAQ

Can I harvest gains indefinitely?

Theoretically, yes, if your income remains low enough to stay in the 0% bracket. A retiree aged 60–70 with no RMDs and modest ordinary income can harvest gains annually. However, once RMDs begin at 72, they spike your income, reducing harvesting opportunities. Also, if you're moving toward eventual high-income years (pension increases, Social Security, large bonuses), the opportunity window is finite.

Is tax-gain harvesting the same as tax-loss harvesting?

No, they're complementary. Tax-loss harvesting sells losers to create losses that offset gains (or $3,000/year of ordinary income). Tax-gain harvesting sells winners to fill low-bracket space. Doing both in the same year maximizes tax efficiency: harvest losses to offset gains, net minimal tax impact, but reposition the portfolio toward higher-basis assets.

What if my portfolio is all winners and has no losses to harvest?

You can still harvest gains in the 0% bracket with no offset. You'll owe $0 in federal tax on those gains. This is perfectly valid and often the strongest application of the strategy. The lack of losses doesn't negate the benefit of realizing gains at 0%.

How do I decide which securities to sell?

Sell the highest-basis securities first (securities with the smallest unrealized gains). This minimizes the realized gain for each dollar of proceeds. If you have $200,000 in an S&P 500 index fund with an $80,000 unrealized gain and $150,000 in a small-cap fund with a $150,000 unrealized gain, sell the index fund first. Alternatively, sell the lowest-basis securities if your goal is to reposition the portfolio; either approach is valid depending on your situation.

Can I harvest gains in a Roth conversion year?

Yes, but plan carefully. Gains realized that year bump your MAGI, potentially affecting the conversion calculation or triggering IRMAA. Some retirees separate conversion years and gain-harvesting years: convert in years with low ordinary income but no capital gains, and harvest gains in other low-income years. Others combine both if the math works (low ordinary income + moderate gains = still-favorable rate).

What if I harvest gains and then the market crashes?

The gains are realized and taxable regardless of later market performance. You can harvest losses in the subsequent down year to offset. This is a risk: harvest gains in a year, market drops, you have no corresponding losses to offset (only future gains realized at even lower prices). Accept this risk as part of the strategy; it's still usually wise.

How do I track basis after years of harvesting?

Use a cost-basis tracking spreadsheet or your broker's cost-basis reports. Many brokers (Fidelity, Schwab, Vanguard) provide detailed basis reports. After each harvest, update the spreadsheet with the new cost basis and realized gains. This is essential for Form 8949 (Sales of Capital Assets) on your tax return.

Summary

Tax-gain harvesting leverages the favorable long-term capital gains tax rates (0%, 15%, 20%) by deliberately realizing gains in low-income years, effectively converting low-basis assets to high-basis assets at minimal or zero tax cost. The strategy is most powerful during early retirement (before RMDs and Social Security), sabbatical years, and bridge years before major income events. Pairing gain harvesting with loss harvesting and coordinating with RMDs, Roth conversions, and Medicare premiums multiplies the benefit. A retiree with $500,000+ in taxable assets and $100,000+ in unrealized gains can systematically harvest this appreciation at rates far below their ordinary income rate, creating a tax-efficient drawdown path. Readers should model their complete income picture with a tax professional, track cost basis meticulously, and plan harvesting around IRMAA thresholds to realize the strategy's full advantage.

Next

Asset Location Power Move