12.3 Capital Gains Harvesting, Basis Step-Up & Medicare IRMAA Coordination

Key Takeaways

  • Under federal tax stacking rules, ordinary income occupies the bottom tax brackets first, and long-term capital gains and qualified dividends stack on top to determine their preferential rate.
  • The 0% federal long-term capital gains bracket allows retirees to harvest substantial investment gains tax-free, but realized gains still elevate Adjusted Gross Income (AGI).
  • IRC §1014 provides a step-up in basis to fair market value at death, establishing a powerful estate planning rule: spend high-basis taxable lots during life and hold highly appreciated, low-basis lots until death.
  • Tax-loss harvesting in retirement permits offsetting unlimited capital gains plus up to $3,000 of ordinary income annually, with indefinite carryover under IRC §1212.
  • True tax efficiency requires multi-system coordination to ensure that harvesting gains or taking withdrawals does not trigger stealth surtaxes: the 3.8% Net Investment Income Tax (NIIT), Medicare IRMAA cliffs, or excessive Social Security taxation.
Last updated: September 2026

Capital Gains Harvesting, Basis Step-Up & Medicare IRMAA Coordination

Core Principle: Decumulation requires managing cost basis, capital gain brackets, and the IRC §1014 basis step-up at death inside taxable accounts, while coordinating with stealth surtaxes including Medicare IRMAA and the 3.8% Net Investment Income Tax.

The 0% Long-Term Capital Gains Bracket and Stacking Rules

Long-term capital gains (assets held >1 year) and qualified dividends receive preferential rates of 0%, 15%, or 20%. For early retirees, the statutory 0% capital gains bracket offers an opportunity to harvest gains with zero federal income tax.

The IRS "Stacking Rule"

Under federal tax law, capital gains are not evaluated in isolation. The IRS enforces strict stacking rules:

  1. Ordinary Income Sits at the Bottom: Ordinary income (pensions, IRA withdrawals, taxable Social Security) fills the lowest tax brackets first, absorbing the standard deduction.
  2. Capital Gains Stack on Top: Long-term capital gains and qualified dividends are placed on top of ordinary income to determine their tax bracket.
  3. Headroom Determines Rate: Only long-term gains that fall within the 0% range (taxable income up to $98,900 MFJ / $49,450 single in 2026) are taxed at 0%. Any excess is taxed at 15% (or 20%).

Capital Gains Harvesting (Basis Bumping)

Retirees within the 0% capital gains threshold can sell appreciated securities and immediately repurchase them. This capital gains harvesting resets cost basis higher at zero tax liability. Importantly, the wash-sale rule (IRC §1091) applies only to losses, never to gains.

Tax-Loss Harvesting and Carryover Rules in Decumulation

During market downturns, retirees should execute disciplined tax-loss harvesting in taxable accounts:

  • Capital Gain Offsetting: Realized capital losses offset realized capital gains dollar-for-dollar.
  • Ordinary Income Deduction: Under IRC §1211, net capital losses exceeding capital gains offset up to $3,000 of ordinary income per year ($1,500 if married filing separately).
  • Indefinite Carryforward: Under IRC §1212, unused net losses carry forward indefinitely to shelter future gains or offset $3,000 of ordinary income annually.
  • Wash-Sale Rule: Repurchasing substantially identical securities within 30 days before or after the sale date disallows the loss. Advisors must use compliant substitutes (e.g., swapping an S&P 500 ETF for a Total Stock Market ETF).

IRC §1014 Step-Up in Basis at Death: Strategic Lot Sequencing

IRC §1014 provides that property acquired from a decedent receives a cost basis equal to the fair market value (FMV) at the date of death (or alternate valuation date under IRC §2032). Decades of accumulated, unrealized capital gains are permanently erased for heirs.

Strategic Tax-Lot Liquidation Protocol

Advisors must implement a clear liquidation hierarchy:

  1. Spend High-Basis Lots First: Liquidating high-basis lots generates cash with minimal taxable capital gains.
  2. Hold Low-Basis Lots Until Death: Assets with large embedded gains should be retained until death. The §1014 step-up extinguishes the embedded gain entirely, delivering maximum after-tax wealth to beneficiaries.
  3. Community Property Advantage: In common law states, joint property receives a basis step-up on only the decedent's 50% share. Under IRC §1014(b)(6), married couples in community property states receive a 100% full "double" step-up in basis on the entire asset upon the first spouse's death.

Multi-System Coordination: The Triple Stealth Tax Threat

Advisors must coordinate distributions across three interrelated systems that penalize elevated Adjusted Gross Income (AGI):

  1. Medicare IRMAA Surcharges: Modified Adjusted Gross Income (MAGI) includes all taxable income plus tax-exempt municipal interest. Realized capital gains (even at 0%) increase AGI and can trigger cliff-edge Medicare Part B and Part D surcharges under the two-year lookback rule.
  2. Net Investment Income Tax (NIIT - IRC §1411): A 3.8% surtax applies to the lesser of net investment income or Modified AGI exceeding statutory, unindexed thresholds: $250,000 MFJ or $200,000 Single.
  3. Social Security Tax Torpedo: Realized capital gains increase provisional income, potentially pushing up to 85% of Social Security benefits into ordinary taxable income.

Comparative Framework: Tax-Lot Treatment and Liquidation Strategy

Tax Lot TypeDecumulation StrategyLifetime Tax ImpactEstate & Beneficiary Impact
High Basis / Low GainLiquidate first for spendingMinimal realized capital gainStep-up provides minimal added value
Unrealized LossesHarvest immediatelyOffsets gains + shelters $3k ordinary incomeLosses vanish at death; harvest during life
Low Basis / High GainPreserve until deathAvoids LTCG, NIIT, and IRMAAFull IRC §1014 Step-Up: 100% gain erased
0% LTCG Window GainsHarvest selectively0% federal tax (verify IRMAA headroom)Resets basis higher for future flexibility

Advisor-Client Case Scenario: The Costly "Free" Capital Gain

Robert and Linda (both 68, filing jointly) have $45,000 of pension income and $35,000 of combined Social Security. Believing gains under the 0% threshold ($98,900 of taxable income for joint filers in 2026) are completely free, Robert sells stock with a $40,000 long-term capital gain (basis $10,000, proceeds $50,000).

  • Multi-System Fallout: The gain itself is taxed at 0% because their taxable income, including the gain, stays under $98,900. But the gain raises provisional income from $62,500 to $102,500. Taxable Social Security jumps from $21,725 to the $29,750 maximum (85% of benefits), an increase of $8,025 of ordinary income. After their $35,500 standard deduction and $12,000 senior deduction, that added income is taxed at 10% and 12%, producing about $850 of unexpected federal tax.
  • IRMAA check: Their MAGI of about $114,750 is far below the $218,000 joint IRMAA threshold, so there is no Medicare surcharge in this case. A household already near a threshold, however, could see the same gain trigger IRMAA two years later.
  • Solution: Splitting the gain across tax years, pairing it with harvested losses, or realizing it before Social Security starts would have reduced or avoided the extra tax.

Practical Calculation: IRC §1014 Step-Up vs. Lifetime Liquidation

Evelyn (age 82, single) owns stock worth $500,000 with a $50,000 basis ($450,000 embedded gain). Her pension and taxable Social Security total $40,000, and her benefits are already 85% taxable. She compares selling now with leaving the shares to her daughter (2026 rules, 6% state tax):

  • Alternative A (Sell During Life):
    • Federal capital gains tax: After her $18,150 standard deduction, $21,850 of ordinary income fills the bottom of the brackets. The first $27,600 of gain fills the rest of the 0% range (up to $49,450), and the remaining $422,400 is taxed at 15%: about $63,360.
    • 3.8% NIIT: On the lesser of the $450,000 gain or MAGI above $200,000 ($290,000): about $11,020.
    • State income tax: 6% × $450,000 = $27,000.
    • Medicare IRMAA (two years later): MAGI of about $490,000 lands in the single-filer tier between $205,000 and $500,000 ($446.30 Part B plus $83.30 Part D surcharges a month at 2026 rates): about $6,355 for that year.
    • Total cost: roughly $107,700, leaving about $392,300 of after-tax value (ignoring any spending of the proceeds).
  • Alternative B (Hold Until Death, IRC §1014):
    • Her daughter receives a stepped-up basis of about $500,000 (fair market value at death).
    • An immediate sale produces little or no taxable gain: about $500,000 to her daughter.

Holding the shares preserves about $107,700 more for the family (about 21.5% of the position), provided Evelyn does not need the money and the position's concentration risk is acceptable.

Exam Tip

  • Stacking Rule: Ordinary income sits at the bottom; LTCG and qualified dividends stack on top.
  • Wash-Sale Rule (IRC §1091): Applies to losses only (30 days before/after sale). Does not apply to gains.
  • Capital Loss Offset: Net losses offset ordinary income up to $3,000/year ($1,500 MFS); excess carries forward indefinitely.
  • IRC §1014 Step-Up: FMV basis at death eliminates pre-death gains. Community property receives a 100% double step-up (§1014(b)(6)).
  • Multi-System Limits: NIIT 3.8% surtax triggers at unindexed thresholds ($250k MFJ / $200k Single). Capital gains inflate AGI, affecting IRMAA and Social Security.
Loading diagram...
Taxable Lot Sequencing, Basis Step-Up, and Multi-System Tax Coordination
Test Your Knowledge

How does the federal tax code's 'stacking rule' govern the taxation of long-term capital gains and qualified dividends relative to ordinary income?

A
B
C
D
Test Your Knowledge

Under IRC §1014, how does the step-up in basis at death influence the optimal liquidation sequence of taxable brokerage lots for an elderly retiree whose heirs will inherit the portfolio?

A
B
C
D
Test Your Knowledge

An advisor conducts tax-loss harvesting in a retiree's taxable brokerage account, generating $18,000 in net realized capital losses during a market correction. The client has no realized capital gains this year. How are these losses utilized under federal tax law?

A
B
C
D