When Should You Realize Capital Gains Before Social Security or RMDs Begin?

Ross Marino |

Work income has ended, but Social Security and required minimum distributions have not yet filled the tax return. Meanwhile, appreciated investments in a taxable account may no longer fit the portfolio as well as they once did. This interval can make a useful sale less costly—but the open tax space is not, by itself, a reason to create a gain.

The stronger question is not “How much gain can we fit at 0%?” It is “Which portfolio change already has a purpose, and does this year make that change easier to carry out?” That order protects the retirement plan from becoming subordinate to a tax bracket.

Why can the years before Social Security and RMDs be different?

Most net long-term capital gains are taxed through separate federal rate bands that depend partly on taxable income and filing status. Ordinary income generally occupies the return first, so lower ordinary income can leave more room before gains enter a higher federal band.[1] The applicable tax year matters; project rates, deductions, and thresholds rather than assume them.

That room can narrow later. Social Security may add income, and RMDs from traditional retirement accounts are generally taxed as ordinary income, subject to basis and other exceptions.[2] The interval after wages decline but before those sources begin may therefore change the cost of a sale the portfolio already needs.

Which portfolio purpose should lead the decision?

Begin with the investment job. A sale may reduce an outsized position, restore the intended allocation, raise cash for several years of planned spending, simplify an account, or establish a higher basis for assets likely to be sold later. Selling is not the same as permanently leaving the market; you can reinvest proceeds according to the investment plan.

Then inspect the actual lots. Adjusted basis, holding period, and the identification method can change the gain recognized from the same dollar sale.[3] A position with several purchase lots may allow a measured reduction rather than an all-or-nothing exit.

Purpose before bracket

1. Name the portfolio job

Diversify, rebalance, create liquidity, simplify, or prepare for a likely later sale.

2. Choose the lots

Confirm basis and holding period before deciding how much appreciation to recognize.

3. Place the sale in the window

Compare this year with later years after Social Security, RMDs, or other income begins.

4. Set the boundary: the useful gain ends when the next dollar no longer advances the job at an acceptable total cost.

Dovetail Principle: Timing Can Change Which Options Remain

Timing does not create a portfolio purpose, but it can preserve choices. Acting during a lower-income interval may allow a concentrated position to be reduced gradually, liquidity to be built before it is urgent, or future sales to begin with a different basis. Waiting may leave fewer favorable years—but acting without a purpose simply converts optionality into taxable income.

Why is a 0% federal rate not the same as no tax consequence?

A gain can increase adjusted gross income even when part of it falls in the 0% federal long-term capital-gain band. Once Social Security begins, additional income can cause more benefits to be included in taxable income.[4] For a Medicare beneficiary, the gain may also affect income-related Part B and Part D amounts determined from an earlier tax return.[5]

Larger gains may also contribute to exposure to the 3.8% net investment income tax.[6] State treatment varies, and many states tax capital gains through their individual income-tax systems.[7] These effects do not make the sale wrong. They mean “0% federal” is one line in the projection, not the conclusion.

How should the gain amount and year be selected?

Build the tax projection before the trade. Include expected interest, dividends, pensions, retirement-account withdrawals, deductions, realized losses, charitable gifts, and other optional income. Add known or estimated mutual-fund capital-gain distributions because a taxable distribution can arrive even when you did not sell fund shares yourself.[8]

Model several sale amounts across the remaining pre-income years. For each, compare the portfolio improvement with federal and state tax, Social Security taxation if benefits begin, possible Medicare effects, and any NIIT. Also compare the gain with other uses of the same tax capacity, such as a Roth conversion. Tax capacity can support more than one good strategy, but it cannot be assigned twice.

If proceeds are reinvested, coordinate security selection and market exposure rather than treating the transaction as a retreat to cash. The wash-sale rules described for losses do not make a realized gain disappear when the same investment is repurchased; basis and transaction records still matter.[3]

The landing may be a bounded gain-realization range, a sale spread across several years, or no sale. Realize gains during the lower-income window only when the transaction advances diversification, liquidity, basis management, or another defined objective and the complete tax interaction remains acceptable. The advisor, tax professional, and custodian should coordinate the projection, lot selection, and implementation.

Related Reading: When Does Capital-Gain Harvesting Help a Retiree? explores the narrower question of deliberately raising basis after the portfolio purpose is established.

About the author

Ross Marino, CFP®, CeFT®, is the Founder & CEO of Dovetail Financial and creator of Human-First Financial Guidance®. He helps people nearing or living in retirement connect their lives and wealth so that financial decisions become clearer, more personal, and easier to navigate.

Search another retirement question

Describe the question or enter a few topic words. You do not need to know the exact article title.

 

Notes

  1. Internal Revenue Service, Topic no. 409, Capital gains and losses.
  2. Charles Schwab, IRA Withdrawals: Required Minimum Distributions.
  3. Internal Revenue Service, Publication 550 (2025), Investment Income and Expenses.
  4. AARP, Taxes on Social Security Are Based on Your Income.
  5. Centers for Medicare & Medicaid Services, 2026 Medicare Parts A & B Premiums and Deductibles.
  6. Fidelity Investments, What is net investment income tax (NIIT)?.
  7. Tax Foundation, State Tax Rates on Long-Term Capital Gains, 2024.
  8. Vanguard, Understanding capital gains.

Disclosure

This content is provided by Dovetail Financial Group LLC (“Dovetail Financial”) for informational and educational purposes only. It is not intended as, and should not be construed as, individualized investment, tax, legal, or accounting advice; a recommendation to buy or sell any security; or a recommendation to adopt any investment strategy. Because each person’s situation is unique, readers should consult their own financial, tax, and legal professionals before taking action based on this content. Information contained herein is believed to be reliable, but its accuracy or completeness is not guaranteed. Any opinions expressed are current as of the date of publication and are subject to change without notice. All investing involves risk, including the possible loss of principal. Asset allocation and diversification do not guarantee profits or protect against losses in declining markets. Past performance is not a guarantee of future results. Dovetail Financial Group LLC is a registered investment adviser. Registration does not imply a certain level of skill or training. Additional information about Dovetail Financial Group LLC, including Form ADV Part 2A and Form CRS, is available at adviserinfo.sec.gov. © 2026 Dovetail Financial Group LLC. All rights reserved.