Selling investments in retirement is not automatically a bad thing. In fact, carefully realizing capital gains can be one of the most useful tools for turning a portfolio into dependable retirement income.

The challenge is timing.

A large stock sale in the wrong year can interact with IRA withdrawals, Social Security, required minimum distributions, and Medicare premiums.

Meanwhile, avoiding gains completely can leave retirees with an increasingly concentrated portfolio or cause them to miss opportunities to realize gains at relatively low tax rates.

Understanding how to coordinate capital gains with retirement withdrawals can help solve this problem. Rather than treating brokerage accounts, traditional IRAs, and Roth accounts separately, retirees can manage them as one income system.

The goal is not simply to minimize this year’s capital-gains tax. It is to create sustainable after-tax cash flow while keeping future taxes, portfolio risk, and withdrawal flexibility under control.

Understand How Capital Gains Are Actually Taxed

Capital gains are generally created when an investment is sold for more than its cost basis.

If you bought shares for $50,000 and later sold them for $80,000, your gain would generally be $30,000 before considering adjustments to basis and other tax rules.

How long you owned the investment matters.

Short-term gains from assets held for one year or less are generally taxed as ordinary income. Long-term gains usually receive preferential federal rates of 0%, 15%, or 20%, depending on taxable income and filing status.

For 2026, the 0% long-term capital-gains threshold is $49,450 for most single filers and $98,900 for married couples filing jointly. The top of the 15% range is $545,500 for single filers and $613,700 for married couples filing jointly.

That makes taxable income – not simply the size of the investment gain – critical to retirement planning.

Coordinate Ordinary Income Before Selling Investments

Capital-gains brackets do not exist in isolation.

Traditional IRA distributions, pensions, taxable interest, wages, and other ordinary income generally fill the lower portions of your taxable-income stack first. Capital gains sit on top of that income when the applicable rate is calculated.

Consider a retired couple with relatively modest taxable ordinary income.

They may have room to realize long-term investment gains while remaining within the 0% capital-gains range. But if they first take a very large traditional IRA withdrawal, some of that available space could disappear.

Fidelity specifically notes that ordinary income from tax-deferred withdrawals affects the rate applied to long-term capital gains.

That means the sequence matters.

Before selling a large appreciated position, estimate your pension income, Social Security taxation, IRA withdrawals, interest, dividends, and deductions for the year. Only then can you see how much capital-gain capacity may actually remain.

See also  Advanced Guardrail Strategies for Flexible Retirement Spending

Use Low-Income Retirement Years for Gain Harvesting

The years shortly after retirement can create an unusually valuable tax-planning window.

Employment income may disappear while Social Security and required minimum distributions have not yet reached their full impact. Fidelity describes this period as a retirement “income valley,” where retirees may have opportunities to manage taxable withdrawals and investment gains more strategically.

Suppose you own shares worth $100,000 with a $70,000 cost basis.

Selling them creates a $30,000 long-term capital gain.

If your taxable income is low enough, some or all of that gain could potentially fall into the 0% long-term capital-gains bracket. You could then reinvest the proceeds into a more diversified portfolio while effectively resetting your cost basis higher.

This technique is commonly called capital-gain harvesting.

The strategy can be particularly useful for reducing concentrated stock positions accumulated during your working years.

Just remember that realizing additional gains can affect other income-sensitive calculations, so the entire tax picture needs to be reviewed first.

Match Brokerage Sales With Retirement Spending Needs

A taxable brokerage account can serve two purposes at once: generating retirement cash and controlling investment risk.

Suppose you need $50,000 from your portfolio this year.

Instead of withdrawing the entire amount from a traditional IRA, you might sell $30,000 of taxable investments and take the remaining $20,000 from another account.

Importantly, the entire $30,000 brokerage withdrawal is not necessarily taxable income.

If the investment originally cost $24,000, only the $6,000 realized gain generally represents capital gain. This difference between proceeds and taxable gain can make brokerage accounts especially useful for retirement cash-flow planning.

Fidelity notes that withdrawals from taxable accounts may generate gains or losses, while traditional retirement-account withdrawals are generally taxed as ordinary income.

Understanding cost basis therefore gives retirees much more control than simply comparing account balances.

Choose Tax Lots Instead of Selling Blindly

Investors often purchase the same stock or fund at different times and prices.

Those purchases create separate tax lots.

Imagine you own three lots of the same investment:

One was purchased for $40 per share, another for $70, and another for $95. If the current price is $100, selling the oldest shares creates a much larger taxable gain than selling the newest shares.

Choosing specific lots can help manage annual capital gains.

During a low-tax year, you might intentionally sell highly appreciated shares. During a higher-income year, selling higher-basis lots may produce less taxable gain.

This approach can also help retirees gradually reduce concentrated holdings without creating one enormous tax event.

Tax-lot management sounds technical, but the concept is simple: do not sell investments without knowing which shares you are actually selling.

See also  How Tax Brackets Influence Retirement Withdrawal Decisions

A little cost-basis planning can provide significantly more flexiblity over a 20- or 30-year retirement.

Pair Capital Gains With Tax-Loss Harvesting

Markets do not always move upward, and declining investments can occasionally create tax opportunities.

Capital losses can generally offset capital gains. If losses exceed gains, the IRS currently allows individuals to deduct up to $3,000 of excess net capital losses against other income, with remaining losses generally carried forward to later years.

Suppose you realize $20,000 of gains from a successful investment but also own another position with a $12,000 unrealized loss.

Selling the weaker investment could potentially offset part of the taxable gain, assuming the transaction follows relevant tax rules.

You might then reinvest in a different security that maintains similar market exposure.

This strategy is known as tax-loss harvesting.

Be careful with wash-sale rules when repurchasing substantially identical securities. Tax-loss harvesting should also support good portfolio construction rather than being done merely to create a tax deduction.

Tax savings are useful, but they should never turn a bad investment decision into a supposedly good one.

Balance Capital Gains Against Roth and IRA Withdrawals

Retirement accounts give you additional levers.

Traditional IRA withdrawals generally increase ordinary taxable income, while qualified Roth IRA withdrawals can generally provide tax-free retirement cash flow.

That creates useful flexibility.

Suppose selling enough appreciated stock to cover a major home renovation would generate more capital gains than you want to recognize this year.

You could potentially fund part of the expense from Roth assets instead.

In another year, your taxable income might be unusually low, making capital-gain realization more attractive.

Fidelity’s research suggests that proportional withdrawals across taxable, tax-deferred, and tax-free accounts can sometimes smooth taxable income and improve lifetime after-tax results compared with rigidly draining one account at a time.

The best withdrawal mix can therefore change from year to year.

Think of each account type as a different tax tool rather than assigning one fixed withdrawal order forever.

Plan Ahead for Required Minimum Distributions

Capital-gain planning often becomes more difficult after substantial required minimum distributions begin.

Traditional IRA owners generally must begin annual RMDs at age 73 under current rules, while Roth IRAs and designated Roth workplace accounts do not require lifetime RMDs for the original owner.

Those mandatory distributions add ordinary taxable income.

Imagine spending your early retirement years realizing almost no gains and taking very little from traditional retirement accounts.

Later, large RMDs arrive.

You may now have substantially less room to realize capital gains at lower rates because mandatory income is already filling part of your taxable-income range.

That is why coordinated planning should start before RMD age.

See also  Advanced Tax-Efficient Strategies for Retirement Income Planning

Sometimes recognizing capital gains or taking additional IRA income earlier can produce a more consistant tax profile across retirement rather than creating low-tax years followed by expensive ones.

Watch Medicare IRMAA Before Realizing Large Gains

A capital gain can affect more than your income-tax bill.

Medicare beneficiaries with higher modified adjusted gross income may owe additional Part B and Part D premiums through the Income-Related Monthly Adjustment Amount, commonly called IRMAA.

For 2026, the standard Medicare Part B premium applies when modified adjusted gross income is no more than $109,000 for individual filers or $218,000 for joint filers. Higher-income tiers face additional premiums.

A large realized gain can potentially push income across one of those thresholds.

Suppose you sell a highly appreciated property or stock position during one year. The capital-gains tax itself might look reasonable, but the additional income could have Medicare consequences as well.

That does not automatically mean you should avoid the sale.

Diversification, cash needs, or long-term tax savings may still make it worthwhile.

The important point is calculating the total cost, not just the headline capital-gains rate.

Review Capital Gains Before Year-End

Capital-gains planning works best when you do it proactively.

By late in the year, you should have a reasonable estimate of Social Security, pensions, RMDs, IRA withdrawals, interest, dividends, realized gains, and deductible expenses.

That gives you a clearer picture of remaining tax-bracket capacity.

You can then decide whether to harvest additional gains, recognize losses, postpone a sale, use Roth assets, or take additional tax-deferred withdrawals.

Do not forget portfolio strategy.

If one stock has grown into an excessive share of your retirement savings, avoiding taxes indefinitely may create more financial risk than the tax bill you are trying to prevent.

A good plan balances investment risk and taxes rather than optimizing one while ignoring the other.

A yearly review also prevents small tax opportunities from being lost simply because no one checked the numbers before December 31.

Coordinating capital gains with retirement withdrawals can give retirees far more control over both taxes and cash flow.

The key is viewing brokerage sales, traditional IRA withdrawals, Roth distributions, RMDs, and other income sources as one connected system. Low-income years may offer opportunities for gain harvesting, while tax-lot selection and loss harvesting can provide additional flexibility.

Just remember that the lowest capital-gains bill this year is not always the best lifetime strategy.

Estimate taxable income before making major sales, understand your cost basis, and consider how additional gains could affect future taxes and Medicare premiums.

Review the plan annually and, for complex portfolios or large appreciated positions, consider working with a qualified tax or financial professional before making irreversible decisions.