Understanding Capital Gains in Retirement

·

·

Capital gains in retirement

Capital gains tax in retirement works differently from tax on IRA or 401(k) withdrawals, and for many retirees it is the most flexible lever they have. If you hold investments in a taxable brokerage account, the way you sell them can decide whether you pay 0%, 15% or 20% on the gain, and whether that sale pushes up the tax on your Social Security or your Medicare premiums.

This guide explains how capital gains are taxed, the 2026 thresholds, and the practical moves retirees use to keep the bill low.

Key takeaways

  • Only the gain is taxed, not the whole sale. Your cost basis comes back to you tax-free.
  • Investments held more than one year qualify for long-term rates of 0%, 15% or 20%. Gains on assets held a year or less are taxed as ordinary income.
  • In 2026, married couples filing jointly pay 0% on long-term gains while their taxable income stays at or below $98,900 ($49,450 for single filers).
  • Gains still count toward the income that decides how much of your Social Security is taxed and whether you pay Medicare IRMAA surcharges.

How capital gains are taxed

When you sell an investment in a taxable account, your gain is the sale price minus your cost basis, which is generally what you paid plus reinvested dividends. If you bought a fund for $40,000 and sell it for $60,000, only $20,000 is a gain. The other $40,000 is your own money coming back.

This is the big difference from a traditional IRA or 401(k), where every dollar you withdraw is taxed as ordinary income. A retiree who needs $60,000 might create $60,000 of taxable income from an IRA, or only $20,000 of gain from a brokerage account.

Capital gains rules do not apply inside IRAs, 401(k)s or Roth accounts. Buying and selling within those accounts creates no tax at the time.

2026 long-term capital gains brackets

Long-term gains and qualified dividends sit on top of your other taxable income. The rate depends on where your total taxable income lands.

RateSingleMarried filing jointly
0%Up to $49,450Up to $98,900
15%$49,451 to $545,500$98,901 to $613,700
20%Over $545,500Over $613,700

These are taxable income figures, after deductions. In 2026 the standard deduction is $32,200 for married couples and $16,100 for single filers, with an additional amount for those 65 and over. That means a married couple over 65 can have well over $130,000 of gross income and still pay 0% on part or all of their long-term gains.

Higher-income households may also owe the 3.8% net investment income tax once modified adjusted gross income passes $250,000 (married) or $200,000 (single).

Tax-gain harvesting: using the 0% bracket

If your taxable income in a given year sits below the 0% ceiling, you can sell appreciated investments, realise gains up to that ceiling tax-free, and buy the same or similar investments straight back. Unlike losses, there is no wash-sale rule for gains. The result is a higher cost basis, so future sales create smaller gains.

This works especially well in the “gap years” between retiring and starting Social Security or required minimum distributions, when income is often lowest. Our guide to tax planning for early retirees covers those years in more detail.

Tax-loss harvesting

When an investment is worth less than you paid, selling it locks in a capital loss. Losses first offset gains, then up to $3,000 a year of ordinary income, and any remainder carries forward indefinitely. If you rebuy the same security within 30 days, the wash-sale rule disallows the loss, so most people switch to a similar but not identical fund.

Watch the knock-on effects

A capital gain taxed at 0% can still cost you money indirectly:

  • Social Security taxation. Gains count in the “provisional income” formula, so a large sale can make more of your benefit taxable. See Social Security and taxes.
  • Medicare IRMAA. Gains raise your modified adjusted gross income, which sets Medicare Part B and D premiums two years later. See how to avoid IRMAA surcharges.
  • ACA subsidies. If you retire before 65 and buy coverage through the marketplace, gains reduce your premium credits.

Other rules worth knowing

  • Selling your home. You can exclude up to $250,000 of gain ($500,000 for married couples) if you owned and lived in the home for two of the last five years.
  • Step-up in basis. Investments left to heirs generally get a new basis equal to their value at death, wiping out the built-in gain. Holding highly appreciated assets for life can be worth more than selling them.
  • Giving appreciated shares. Donating shares held over a year to charity lets you deduct their full value (if you itemize) without ever paying tax on the gain.
  • Choosing lots. Ask your broker to sell specific lots with the highest basis rather than using first-in, first-out.

Where gains fit in your withdrawal plan

Most retirees draw from three buckets: taxable accounts, tax-deferred accounts and Roth accounts. Spending from a brokerage account in low-income years, while filling lower brackets with IRA withdrawals or Roth conversions, can reduce lifetime tax. Our guide to tax-efficient withdrawal strategies shows how to put the order together.

Frequently asked questions

Do retirees pay capital gains tax?

Yes, on gains in taxable accounts. Being retired does not change the rates, but lower income often means more of your gains fall into the 0% bracket.

Is there a capital gains exemption for people over 65?

No. The age-based exemption on home sales ended in 1997. Today everyone uses the same $250,000 / $500,000 home-sale exclusion, and the larger standard deduction for those 65 and over simply leaves more room in the 0% bracket.

Do capital gains count as income for Medicare premiums?

Yes. Realised gains are part of the modified adjusted gross income Medicare uses for IRMAA, even if they were taxed at 0%.

The bottom line

Capital gains give retirees control: you choose when to sell, which lots to sell and how much gain to realise. Map your income for the year first, then decide how much room you have before the next threshold.

Want the full playbook? The Essential Retirement Tax Strategy Guide walks through withdrawal order, capital gains, Roth conversions and Medicare thresholds in plain English, with worked examples.

2026 figures are from IRS inflation adjustments. This article is for education only and is not tax or financial advice. Review major decisions with a qualified professional.


Last updated:

Published by Essential Retirement Guide under the pen name Susan Delaney. Drafted with AI assistance, then edited and fact-checked by a human editor against the sources named in the article. General information only, not personal financial advice. Spotted an error? Tell us.