Tax-Loss Harvesting in Retirement: When It Works, When It Doesn't, and Tax-Gain Harvesting Too

April 14, 2026 10 min read
SL

Sema Legacy Editorial Team

Retirement Tax Planning Specialists

The Forgotten Strategy: Most retirees think tax-loss harvesting is for active investors during working years. But retirement is when TLH becomes powerful. Why? Because you often have lower income, which means you can realize capital losses AND offset them with capital gains—all at favorable rates. Even more: tax-GAIN harvesting (the opposite move) can reset appreciated positions at zero federal tax cost. Few retirees ever discover this.

What Is Tax-Loss Harvesting?

Tax-loss harvesting (TLH) is the practice of selling an investment at a loss in a taxable account to offset capital gains or ordinary income (up to $3,000/year) for tax purposes (per IRS Topic 409: Capital Gains and Losses).

How it works:

  1. You own Stock A, purchased for $10,000, now worth $8,000 (a $2,000 loss)
  2. You own Stock B, purchased for $5,000, now worth $7,000 (a $2,000 gain)
  3. You sell Stock A at $8,000 (realizing the $2,000 loss)
  4. You sell Stock B at $7,000 (realizing the $2,000 gain)
  5. Net result: $0 taxable capital gain, but you've repositioned your portfolio

The benefit: losses offset gains. If losses exceed gains, you can deduct up to $3,000 of losses against ordinary income (wages, pension, RMD, etc.) per year. Unused losses carry forward indefinitely.

Why Retirement Is the BEST Time for Tax-Loss Harvesting

During working years, you're usually in a higher tax bracket. A $10,000 loss at a 24% rate saves you $2,400.

In retirement, your income is often lower. But that's the advantage:

  • Lower income = potentially 12% or 22% bracket
  • But more importantly: lower income means you can use losses more effectively
  • You have capital gain capacity—space under the 0% capital gains bracket that you can fill

Example: Sandra, 72, retired

  • Pension: $30,000
  • Social Security: $25,000
  • Investment income: $15,000 (dividends, interest)
  • Total ordinary income: $70,000
  • Standard deduction: $30,000
  • Taxable income before gains/losses: $40,000

As a married person filing jointly, she has capacity to realize $96,700 in long-term capital gains before hitting the 15% bracket. She's currently at $40,000, so she has $56,700 of room.

Her taxable brokerage account has:

  • $20,000 in unrealized losses (stocks that underperformed)
  • $40,000 in unrealized gains (stocks that appreciated)

Tax-loss harvesting + gain realization strategy:

  1. Sell the $20,000 loss positions (realizes $20,000 loss)
  2. Sell $40,000 of the appreciated positions (realizes $40,000 gain)
  3. Net capital gain: $40,000 − $20,000 = $20,000
  4. Tax on $20,000 long-term gain at 0% rate: $0
  5. Cost basis reset on both positions
  6. Still maintains $36,700 of unused 0% bracket capacity for future years

Sandra just reset $40,000 of cost basis (reducing future capital gains tax burden) and paid zero tax. Try doing that in a 24% or 32% bracket during working years.

The Wash-Sale Rule: The Critical Constraint

Here's the constraint: the wash-sale rule prevents you from immediately repurchasing the same security.

Wash-sale rule (IRC §1091): If you sell a security at a loss, you cannot buy the same (or "substantially identical") security within 30 days before or after the sale (per IRS Pub. 550). If you violate this rule, the loss is disallowed and added back to your cost basis. Importantly, per IRS Revenue Ruling 2008-5, repurchasing in an IRA (even though the IRA itself has no tax impact) also triggers the wash-sale rule—the loss is still disallowed.

Example: Don buys Apple stock for $5,000, now worth $4,000.

If Don sells at $4,000 loss, he cannot buy Apple stock again for 30 days after the sale (the "wash-sale window"). If he buys Apple stock on day 20, the loss is disallowed.

However: Don CAN buy a substantially similar security immediately. For example:

  • Sell Apple (at a loss)
  • Immediately buy Nasdaq tech ETF or a different tech fund
  • Maintain similar exposure without triggering wash-sale
  • After 30 days (from the sale date), can switch back to Apple or a similar tech position

The key: "substantially identical" is defined by the IRS as the same security. Switching from Apple stock to a tech ETF or different tech fund is generally acceptable (different securities, different structures). But buying the same Apple stock again is not. The IRS has not published a bright-line test for ETF swaps, so different index providers tracking the same index (e.g., Vanguard S&P 500 vs. Fidelity S&P 500) are likely acceptable, but there is risk. When in doubt, use a materially different asset (e.g., switch from U.S. large-cap to international, then back after 30 days).

Fund Swaps to Maintain Exposure

S&P 500 index funds: Vanguard S&P 500 ETF (VOO) and Fidelity S&P 500 ETF (FXAIX) are substantially similar—but different enough that swapping one for the other avoids wash-sale. Same sector, slightly different holdings due to fund structure.

International funds: VXUS (Vanguard total international) and IEMG (iShares emerging markets) are different enough to swap without wash-sale concerns.

Bond funds: Switching from BND (total bond) to VBTLX (bond index) or similar is generally safe.

Tax-Gain Harvesting: The Overlooked Sibling

Tax-loss harvesting gets all the attention. But in retirement, the mirror strategy—tax-GAIN harvesting—is equally powerful.

What is it? In years where your ordinary income is low, you intentionally realize long-term capital gains at the 0% federal rate (per IRS Topic 409) to reset your cost basis without paying tax.

Why it matters: Appreciated assets in taxable accounts create embedded capital gains tax liability. If you can "harvest" those gains at 0% in low-income years (e.g., age 65-70 before RMDs start), you reset cost basis to current market value. Future appreciation above that new basis is only taxed when eventually sold. Heirs step up basis at death, so you've potentially erased the tax on decades of prior appreciation.

Example: Tax-Gain Harvesting in Action

Facts: Ellen, 70, retired

  • Pension: $25,000
  • Social Security: $20,000 (combined income under threshold, so not heavily taxed)
  • IRA withdrawal: $10,000 (to fund spending)
  • Total ordinary income: $55,000
  • Standard deduction: $30,000 (MFJ, assuming she's married)
  • Taxable income: $25,000

Ellen's 0% long-term capital gains bracket extends from $0 to $96,700 (MFJ). She's at $25,000 taxable income, so she has $71,700 of headroom in the 0% bracket.

Her taxable brokerage has $50,000 in unrealized gains (mutual funds, individual stocks she's held for 20+ years).

Tax-gain harvesting strategy:

  1. Sell $50,000 of appreciated positions (realizes $50,000 long-term gain)
  2. Taxable income now: $25,000 (ordinary) + $50,000 (capital gain) = $75,000
  3. After standard deduction: $45,000 taxable income, still below 15% bracket threshold
  4. Federal tax on $50,000 gain: $0 (all within 0% bracket)
  5. Cost basis is now reset to current market value
  6. If those positions appreciate another $50,000 over next decade, that growth is new and will only be taxed when eventually sold (not backfilled with older gains)

Lifetime value: Ellen has effectively "laundered" $50,000 of gains without paying tax. If those positions appreciate another $50,000 over 10 years, she's avoiding 15%+ tax on both layers of gains. That's $15,000+ in lifetime tax savings (or more if state and Medicare IRMAA impacts are included).

The 5-Year Tax-Gain Harvesting Strategy

Some high-net-worth retirees use a systematic approach:

  • Years 1–5 in retirement: Each year, realizeup to $50,000–$100,000 in long-term gains (fitting within the 0% bracket)
  • Over 5 years: harvest $250,000–$500,000 in appreciation, all at 0% tax
  • Result: significantly reduced unrealized gains in the portfolio, lower future tax burden, and cleaner cost basis for heirs

For a couple with $2M in appreciated assets ($500k in embedded gains), a 5-year tax-gain harvesting plan can reduce lifetime capital gains tax by 30%–50%.

When NOT to Do Tax-Loss Harvesting

Situations Where TLH Loses Its Power

  • You have significant losses but no gains and low income. A $50,000 loss can only offset $3,000/year of ordinary income. Excess carries forward indefinitely, but if you die before using them, they're lost entirely (losses don't transfer to heirs). Better to harvest smaller amounts or pair losses with gain realizations in low-income years.
  • Your tax bracket is already very low (10%). If you're in the 10% bracket, a $10,000 loss saves you $1,000. The benefit exists, but transaction costs and complexity may not justify it.
  • You're in a high-IRMAA year. Harvesting losses reduces AGI, which can lower MAGI and potentially avoid IRMAA surcharge tiers. This is actually beneficial, not a reason to avoid harvesting.
  • You only have losses in tax-deferred accounts. Losses in IRAs, 401(k)s, and Roths are never harvestable. Only losses in taxable accounts create tax benefits.

Asset Location for Harvesting Strategy

Remember: TLH only works in taxable accounts.

Losses and gains in traditional IRAs and 401(k)s are not harvestable. The IRA grows tax-deferred regardless, so harvesting does nothing (you can't carry forward losses from inside the IRA).

Only losses in taxable brokerage accounts can be harvested and used to offset capital gains or ordinary income.

Implication: By retirement, you want meaningful assets in your taxable account—not just what spills over from maxed-out IRAs. A $500k taxable brokerage account is a harvesting goldmine. A $50k taxable account has limited harvesting opportunities.

Real-World Example: The Smiths' Harvesting Plan

Facts: Robert and Lisa, both 68, retired in 2024

  • Traditional IRA: $800,000
  • Roth IRA: $150,000
  • Taxable brokerage: $400,000 (accumulated over 30 years)
  • Embedded gains in taxable brokerage: $180,000
  • Unrealized losses in taxable brokerage: $30,000
  • 2026 ordinary income: $60,000 (pension + RMD)

5-Year Harvesting Plan (2026–2030):

Year 1 (2026):

  • Ordinary income: $60,000
  • Tax-loss harvest: Sell $30,000 of losing positions, offset with gains from some appreciation
  • Realize $25,000 long-term gains (within 0% bracket)
  • Net capital gain: $25,000 − $30,000 = −$5,000 (loss)
  • Tax benefit: $5,000 loss against ordinary income = $5,000 × 12% = $600 tax savings
  • Bonus: cost basis reset on $55,000 of positions

Years 2–5: Repeat process, harvesting $20,000–$30,000 of appreciation each year at 0% rate, while maintaining portfolio diversification.

5-year result:

  • $100,000–$120,000 of embedded gains eliminated at 0% tax
  • Gross embedded gains reduced from $180,000 to $60,000–$80,000
  • Lifetime capital gains tax liability reduced by ~$18,000–$27,000 (at 15%–20% rates in later years)
  • Heirs receive a higher cost basis (lower step-up basis needed), reducing estate tax

Tax-Loss Harvesting Rules and Gotchas

Rule What You Need to Know
Wash Sale (IRC §1091) Cannot repurchase same/substantially identical security within 30 days before or after sale. Applies even if repurchased in an IRA (per IRS Rev. Rul. 2008-5).
Losses in Tax-Deferred Accounts Not harvestable. Losses inside IRAs, 401(k)s, Roth IRAs are never deductible. The entire account is tax-deferred, so internal gains/losses are invisible to the IRS.
Long-Term vs. Short-Term Long-term losses (>1 yr hold per IRC §1222) offset long-term gains first. Short-term losses offset short-term gains first. Then cross-offset if one category has excess.
Unlimited Carryforward Unused losses carry forward indefinitely to future tax years, but do not transfer to heirs at death. Plan strategically to use losses in your lifetime.
$3,000 Ordinary Income Deduction Limit Can deduct max $3,000 of losses against ordinary income per year (per IRC §1211(b)). Excess carries forward. No time limit on carryforward.
Married Filing Separately Each spouse has their own $3,000 limit if filing separately. Filing jointly: one combined $3,000 limit.

Critical: Tax-Loss Harvesting Does NOT Work in Retirement Accounts

The most common mistake: assuming you can tax-loss harvest inside your IRA, 401(k), or Roth IRA. You cannot. These accounts are tax-deferred wrappers. Internal gains and losses are completely invisible to the IRS—you cannot claim a loss deduction for anything sold inside an IRA, regardless of whether you sell at a loss. The IRA's tax benefit applies to the entire account balance, not individual securities within it.

Additionally, if you sell at a loss in a taxable account and buy the same security in an IRA within 30 days, the wash-sale rule still applies—your loss in the taxable account is disallowed (per IRS Rev. Rul. 2008-5). The IRA purchase triggers the wash-sale violation even though the IRA transaction itself has no tax consequence.

Tax-loss harvesting only works in taxable brokerage accounts. Build meaningful assets in taxable accounts (not just IRAs) if you want to use harvesting strategies.

The Bottom Line: It's A Powerful Lever

Tax-loss harvesting in retirement is not flashy, but it's systematic and powerful. A couple with $500k in appreciated taxable assets can harvest $100k–$150k in appreciation over 5 years at favorable or zero tax rates—saving $15,000–$30,000 in lifetime taxes.

The keys:

  1. Maintain meaningful assets in taxable accounts (not everything in IRAs)
  2. Monitor for positions with losses and corresponding gains
  3. Understand the wash-sale rule and use fund swaps to maintain exposure
  4. Use low-income years (early retirement, before RMDs) to harvest gains at 0%
  5. Don't let tax tail wag the investment dog—harvesting is a tax optimization tool, not an investment strategy

Want to build a harvesting plan? Sema Legacy identifies harvesting opportunities in your portfolio and coordinates them with your retirement income strategy year by year.

Get Started Free