Capital gains in retirement: the 0% rate and the catch

Selling investments in retirement raises a question that working people rarely think about: how much tax will the gain cost, and what else will it change? Long-term capital gains get their own lower tax rates, including a 0% rate for people with modest taxable income, and many retirees fall in it. But a gain also counts in the income that decides how much of your Social Security is taxable and what you pay for Medicare.

This guide explains the capital gains rates and thresholds for 2026 and 2027 from the IRS, then works through what a gain does to a retired couple's return, including the knock-on effects.

Long-term versus short-term

The lower rates are only for long-term gains. The IRS says that generally, if you hold an asset for more than one year before selling it, the gain is long-term; if you hold it one year or less, it is short-term. You count from the day after you bought it through the day you sold it. Short-term gains are taxed as ordinary income at the regular tax bracket rates.

The three rates and where they start

Net long-term capital gains are taxed at 0%, 15% or 20%, depending on your taxable income. The IRS thresholds:

Filing status0% up to (2026)0% up to (2027)15% up to (2027)
Single$49,450$51,050$563,200
Married filing jointly$98,900$102,100$633,600
Head of household$66,200$68,350$598,400
IRS Rev. Proc. 2025-32 and Rev. Proc. 2026-35. Above the 15% threshold, the IRS says the 20% rate applies to the extent taxable income exceeds it.

Some gains have higher maximum rates: collectibles such as coins or art at 28%, the taxable part of qualified small business stock at 28%, and unrecaptured section 1250 gain on real property at 25%. The capital gains rates page has 2025 too.

How the thresholds have moved

The IRS raises the thresholds every year for inflation. For a married couple filing jointly, the top of the 0% band was $96,700 in 2025, $98,900 in 2026 and $102,100 in 2027. For a single filer it went from $48,350 to $49,450 to $51,050. The 15% band's upper edge for joint filers rose from $600,050 to $613,700 to $633,600. So the same gain, on the same other income, is slightly more likely to fall in a lower band in 2027 than it was in 2025.

Why retirees often land in the 0% band

The thresholds are measured against taxable income, which is what is left after deductions. Retirees have larger deductions than most people: for 2027 a married couple who are both 65 or older have a standard deduction of $33,200 plus $1,700 each for age, and, through 2028, the $12,000 senior deduction if their income is under the limit. That is $48,600 before any tax applies.

A worked example, and the catch

A married couple, both over 65, have $40,000 of Social Security and take $30,000 from a traditional IRA in 2027. They are deciding whether to sell stock with a $40,000 long-term gain. Using the IRS worksheet for Social Security and the 2027 deductions:

Without the saleWith the $40,000 gain
Taxable part of Social Security$11,100$34,000
Adjusted gross income$41,100$104,000
Deductions$48,600$48,600
Taxable income$0$55,400
Our arithmetic, following IRS Publication 915 Worksheet 1 and the 2027 standard deduction, age amount and senior deduction.

With the sale, their taxable income is $55,400, under the $102,100 limit for the 0% rate, so by the IRS rule the gain itself is taxed at 0%. But look at the first line. The gain pulled $22,900 more of their Social Security into taxable income, because IRS Publication 915 counts capital gains in the income test. Without the sale they had no taxable income at all; with it, they have $55,400 of taxable income, including the newly taxable Social Security.

So a gain taxed at 0% can still raise the tax bill. The taxable Social Security calculator shows the effect for your own numbers, and the guide to how benefits are taxed explains the worksheet.

Other things a gain can change

  • Medicare premiums, two years later. IRMAA is based on modified adjusted gross income from two years earlier, and a gain is part of it. For 2026 the extra premiums start above $109,000 on an individual return or $218,000 on a joint return. See the IRMAA guide.
  • The senior deduction. It phases out once modified adjusted gross income passes $75,000 ($150,000 joint), losing 6% of the excess. A large gain can shrink it; see the senior deduction guide.
  • Net investment income tax. The IRS notes that people with significant investment income may also owe this tax (its Topic no. 559).
  • Estimated tax. A taxable gain can mean you need to make estimated tax payments.

Losses help

If your capital losses are more than your gains, you can deduct the lesser of $3,000 ($1,500 if married filing separately) or your net loss each year, and carry the rest forward. Losses on personal-use property, such as your home or car, are not deductible.

Before you sell

  1. Check whether the gain is long-term (held more than one year).
  2. Estimate your taxable income for the year with the gain included, and compare it with the 0% and 15% thresholds.
  3. Run the Social Security worksheet with and without the gain.
  4. Check the IRMAA thresholds for the year two years later, and the senior deduction phase-out.
  5. Remember that state income tax may apply too.

Check our work

Every figure on this page was read from these official documents. Follow the links and compare.