Skip to content

Capital Gains Tax in Retirement: What You Need to Know

Long-term capital gains rates, the 0% bracket, and how retirement income affects your capital gains tax. A practical guide for retirees.

Tax Planning8 min read

Key Takeaways

  • Long-term capital gains are taxed at 0%, 15%, or 20% depending on your taxable income, which is significantly lower than ordinary income rates.
  • Married couples can realize up to roughly $94,050 in taxable income (2024) and pay 0% on long-term capital gains and qualified dividends.
  • Other retirement income like Social Security, pensions, and IRA withdrawals stacks underneath capital gains and can push you out of the 0% bracket.
  • Tax-loss harvesting in retirement can offset gains and reduce your taxable income, but wash sale rules still apply.
  • Inherited assets receive a step-up in cost basis at death, potentially eliminating capital gains tax on decades of appreciation.

Want to model this in your own plan?

See how these strategies affect your retirement projections.

Try it yourself →

Long-Term vs. Short-Term Rates

The federal tax code draws a sharp line between short-term and long-term capital gains.

  • Short-term (held one year or less): taxed at ordinary income rates, ranging from 10% to 37%
  • Long-term (held more than one year): taxed at preferential rates of 0%, 15%, or 20%

Why This Matters for Retirees

For retirees, this distinction matters because most portfolio sales involve assets held for many years. Nearly all of your realized gains will likely be long-term, meaning you benefit from these lower rates.

The challenge is keeping your total income low enough to take advantage of the most favorable brackets.

The 0% Capital Gains Bracket

The 0% rate on long-term capital gains is one of the most valuable tax benefits available to retirees. For 2024, it applies to taxable income up to:

  • $47,025 for single filers
  • $94,050 for married couples filing jointly

How the Bracket Works

Capital gains stack on top of your ordinary income for purposes of determining the rate. Your ordinary income (wages, Social Security, pension, IRA withdrawals) fills the brackets first.

Then your long-term gains and qualified dividends sit on top. The portion of gains that falls within the 0% threshold is tax-free; the portion above is taxed at 15% or 20%.

Example

A married couple has $40,000 in taxable Social Security income and $30,000 in long-term capital gains. After the standard deduction of roughly $30,000, their ordinary taxable income is about $10,000. Capital gains stack on top, bringing total taxable income to $40,000. Since $40,000 is well below the $94,050 threshold, all of their capital gains are taxed at 0%.

How One Withdrawal Can Change Everything

Now consider the same couple also taking a $60,000 IRA withdrawal. Their ordinary income jumps to $70,000 after the deduction, and adding the $30,000 in gains pushes total taxable income to $100,000.

The first $24,050 of gains (up to the $94,050 threshold) is at 0%, but the remaining $5,950 is taxed at 15%. A single IRA withdrawal created a capital gains tax bill that otherwise would not have existed.

How Retirement Income Affects Your Rate

Because gains stack on top of ordinary income, every dollar of retirement income pushes your capital gains higher in the bracket structure. Several common income sources can erode your 0% bracket.

Social Security

Up to 85% of your Social Security benefits are includable in taxable income. The exact amount depends on your combined income.

For many retirees, Social Security alone can consume a significant portion of the 0% gains bracket.

IRA and 401(k) Distributions

Every dollar withdrawn from a traditional IRA or 401(k) is taxed as ordinary income and directly reduces the room available for 0% capital gains.

This is one reason why Roth conversions during low-income years are so valuable: they move future income from the ordinary income stack to the tax-free Roth stack, preserving 0% gains space.

Pension Income

Pension payments are taxed as ordinary income and fill your brackets before capital gains. Retirees with significant pension income often find that their 0% bracket is fully consumed before any investment gains are considered.

Tax-Loss Harvesting in Retirement

Tax-loss harvesting means selling investments at a loss to offset gains realized elsewhere in your portfolio. It works the same in retirement as during your working years, but the stakes can be different.

How It Works

Example

If you sell one investment for a $20,000 gain and another for a $15,000 loss, you net the two and report only $5,000 in capital gains. If your losses exceed your gains, you can deduct up to $3,000 of the excess against ordinary income per year and carry the rest forward.

Wash Sale Rule

The IRS disallows a loss if you buy a substantially identical investment within 30 days before or after the sale.

In practice, you can sell an S&P 500 index fund at a loss and immediately buy a total market fund to stay invested while harvesting the loss.

Gain Harvesting

Interestingly, the opposite strategy also works. If you are in the 0% bracket, you can sell appreciated investments, pay zero tax on the gain, and immediately repurchase them.

This resets your cost basis higher and reduces your future tax liability. Unlike loss harvesting, there is no wash sale rule for gains.

Tip

If you are in the 0% capital gains bracket, consider selling and immediately rebuying appreciated investments each year. You lock in tax-free gains and reset your cost basis higher — reducing future tax liability at no current cost.

Qualified Dividends

Qualified dividends receive the same preferential tax treatment as long-term capital gains. Most dividends paid by U.S. corporations and many foreign companies are qualified, provided you hold the stock for at least 60 days during the 121-day period surrounding the ex-dividend date.

Why This Matters for Retirees

For retirees living off dividend income, this is significant. If your total taxable income stays within the 0% bracket, your qualified dividends are tax-free.

This makes dividend-paying stocks and funds particularly tax-efficient in a taxable brokerage account during retirement.

Step-Up in Basis at Death

One of the most powerful tax provisions for retirees is the step-up in cost basis at death. When you pass away, your heirs inherit your investments at their fair market value on the date of death — not at your original purchase price.

What This Means

Example

If you bought stock for $50,000 and it is worth $200,000 when you die, your heirs receive a cost basis of $200,000. If they sell immediately, they owe zero capital gains tax. The $150,000 in appreciation during your lifetime is never taxed.

Implications for Withdrawal Strategy

This creates a strong argument for spending from tax-deferred accounts (which do not get a step-up) and preserving highly appreciated taxable investments for your heirs.

When building your withdrawal strategy, consider which assets will benefit most from a step-up and factor that into your spending order.

Community Property States

The step-up also affects couples planning together. In community property states, both halves of jointly held assets receive a full step-up when one spouse dies, which can eliminate large embedded gains entirely.

In common law states, only the deceased spouse's share gets a step-up.

Practical Strategies for Retirees

Managing capital gains in retirement comes down to controlling your total taxable income. Here are the most effective approaches:

  • Be intentional about which accounts you draw from — pull from Roth accounts or spend cash in taxable accounts when you want to keep your income low enough for the 0% bracket
  • Harvest gains in the 0% bracket — sell and repurchase appreciated assets to reset your cost basis higher
  • Harvest losses in down markets — offset future gains and reduce taxable income
  • Coordinate with other retirement income — the timing of Social Security, Roth conversions, and IRA withdrawals all affect where your capital gains land in the bracket structure

Important

Modeling these interactions together — rather than in isolation — is the key to minimizing your lifetime tax bill. A small change in one area (like an IRA withdrawal) can ripple through your capital gains rate, ACA subsidies, and IRMAA thresholds.

Disclaimer: This article is for informational purposes only and does not constitute financial, investment, tax, or legal advice. Consult a qualified professional before making financial decisions.

Frequently Asked Questions

Can I really pay 0% tax on capital gains in retirement?

Yes. For 2024, single filers with taxable income up to about $47,025 and married couples up to about $94,050 pay 0% on long-term capital gains and qualified dividends. Many retirees with modest Social Security income and no large IRA withdrawals can stay within this range.

Do capital gains count toward my income for ACA subsidy purposes?

Yes. Capital gains are included in your modified adjusted gross income, which determines ACA premium subsidy eligibility. A large realized gain in a single year could reduce or eliminate your subsidies.

Should I harvest gains in the 0% bracket?

Yes, this is a smart strategy. If you are in the 0% bracket, you can sell appreciated investments and immediately repurchase them to reset your cost basis higher. There is no wash sale rule for gains, only for losses. This locks in the 0% rate and reduces future taxable gains.

What happens to my spouse's cost basis if I die?

In community property states, both halves of jointly held assets receive a full step-up in basis. In common law states, only the deceased spouse's share gets a step-up. The surviving spouse's half retains the original cost basis.

Are capital gains from selling my home taxed?

You can exclude up to $250,000 of gain ($500,000 for married couples) on the sale of your primary residence if you have lived in it for at least two of the last five years. Gains above the exclusion are taxed at long-term capital gains rates.

See your retirement numbers

Use our free planner to model your retirement with real numbers — Social Security, taxes, healthcare, and more.

Use Am I On Track To Retire to model this for your specific situation.