Long-term capital gains are taxed at 0%, 15%, or 20%, based on your total taxable income. Your gains stack on top of ordinary income, so wages, IRA withdrawals, and Social Security can push more of them into the 15% bracket.
That surprises many people when they sell. Shares held for decades can carry a large gain. In retirement, the sale often lands in the same year as RMDs, a pension, or Social Security. You control the timing, though, and spreading sales across years can keep more of each gain at the lower rates.
What Are the Capital Gains Tax Brackets for 2026 and 2027?
For 2026, the 0% rate covers taxable income up to $49,450 for single filers and $98,900 for joint filers. The 15% rate runs to $545,500 and $613,700, and 20% applies above that. The IRS applies these preferential rates to assets held more than a year. Short-term gains, on assets held a year or less, are taxed as ordinary income.
| Filing status | 0% rate | 15% rate | 20% rate |
|---|---|---|---|
| Single | Up to $49,450 | $49,451 to $545,500 | Over $545,500 |
| Married filing jointly | Up to $98,900 | $98,901 to $613,700 | Over $613,700 |
| Married filing separately | Up to $49,450 | $49,451 to $306,850 | Over $306,850 |
| Head of household | Up to $66,200 | $66,201 to $579,600 | Over $579,600 |
Source: IRS, Rev. Proc. 2025-32. Taxable income ranges for 2026.
The thresholds rise with inflation each year. For 2027, the IRS raised them about 3.2%:
| Filing status | 0% rate | 15% rate | 20% rate |
|---|---|---|---|
| Single | Up to $51,050 | $51,051 to $563,200 | Over $563,200 |
| Married filing jointly | Up to $102,100 | $102,101 to $633,600 | Over $633,600 |
| Married filing separately | Up to $51,050 | $51,051 to $316,800 | Over $316,800 |
| Head of household | Up to $68,350 | $68,351 to $598,400 | Over $598,400 |
Source: IRS, Rev. Proc. 2026-35. Taxable income ranges for 2027.
Say a married couple filing jointly has $80,000 of taxable income in 2026 before any gains. They have about $18,900 of room left in the 0% bracket before they pass $98,900. Long-term gains above that amount are taxed at 15%. That room shrinks fast when income comes from several sources.
A few kinds of long-term gains have higher top rates. Collectibles are taxed at up to 28%, and depreciation recapture on real estate at up to 25%.
How Do Capital Gains Push You Into a Higher Tax Bracket?
Long-term capital gains can’t raise the tax rate on your wages or IRA withdrawals. They stack on top of that income, so a large gain can push more of the gain itself into the 15% or 20% rate. A gain also raises your adjusted gross income. That can make more of your Social Security taxable, raise your Medicare premiums, and trigger the 3.8% net investment income tax.
Why Is Capital Gains Tax More Complicated in Retirement?
Retirement complicates capital gains taxes because many retirees take large gains for the first time. They sell positions that may have grown for decades to cover living expenses. At the same time, they’re often drawing income from multiple sources, such as Social Security, pensions, IRA withdrawals, and brokerage accounts. Those sources compete for the same bracket space and leave less room for gains to land tax-free.
Traditional IRA withdrawals are taxed as ordinary income, so they fill the lower brackets before capital gains are added. Keep that in mind if you’re drawing down a large IRA in the same year you sell appreciated investments.
Social Security adds another layer. Up to 85% of your benefit can be subject to income tax, depending on your combined income, and capital gains count toward that total. A large gain in a given year can make more of your Social Security benefits taxable, which compounds the cost of the gain.
Then there’s IRMAA, the income-related surcharge on Medicare Part B and Part D premiums. It’s recalculated each year from your income two years earlier. IRMAA uses your modified adjusted gross income (MAGI): your adjusted gross income plus tax-exempt interest. Capital gains count toward MAGI, so a large sale can raise your premiums two years later.
These effects interact, so timing matters. The order and timing of withdrawals across account types, called tax sequencing, is a core part of retirement planning.
How Do You Know If Capital Gains Will Cost You More in Taxes?
To see how your long-term gains will be taxed, compare your expected taxable ordinary income with the 0% bracket ceiling for your filing status. The room left over, or headroom, is where gains can be taxed at 0%.
Watch for three situations:
- Several income streams in one year: A pension, Social Security, RMDs, and taxable withdrawals in the same year fill the lower brackets fast.
- A single high-income year: IRMAA surcharges use income from two years earlier, so the cost shows up later.
- Required minimum distributions: RMDs start at 73, or 75 if you were born in 1960 or later, and raise your baseline income. Gains from a rebalance, a property sale, or a large fund distribution can then land in the 15% bracket.
Run the numbers before you sell. The Boldin Planner models your income from every source and shows your projected taxable income each year. Compare that with the bracket thresholds above.
How Does the Net Investment Income Tax Affect Capital Gains?
The net investment income tax (NIIT) adds 3.8% to capital gains once your MAGI passes $200,000, or $250,000 for joint filers. It applies to the smaller of your net investment income or the amount you’re over the line. Depending on your bracket, that brings the federal rate on long-term gains to 18.8% or 23.8%.
The NIIT threshold isn’t indexed for inflation, so more investors cross it over time. Retirees often cross it in years when required minimum distributions, Roth conversions, or large investment sales push up their income.
How Can You Reduce Capital Gains Tax Impact in Retirement?
The best way to reduce capital gains tax in retirement is to avoid stacking too much income into a single year. Plan when you take gains and which accounts you draw from.
Spread Gains Across Tax Years
Realizing large gains at once is a common way retirees land in a higher bracket. Selling across two or three years keeps your total income lower each year. That can hold you under the thresholds for the 15% bracket, Social Security taxation, and the NIIT.
Be Selective About Which Positions You Sell
Within a taxable account, each position carries a different tax cost. Selling the shares you bought at the highest price gives you the income you need with a smaller tax bill. To do that, choose those specific lots with your broker before the sale. You can hold low-basis positions longer, harvest them against losses, or donate them to charity.
Consider Tax-Loss Harvesting
In taxable brokerage accounts, you can sell underperforming positions to generate losses that offset realized gains. If losses exceed gains, up to $3,000 a year ($1,500 if married filing separately) can offset ordinary income, and the rest carries forward. The wash-sale rule defers the loss if you buy the same or a substantially identical investment. That window runs 30 days before and after the sale.
Do Roth Conversions in Lower-Income Years
The years between retirement and the start of Social Security and RMDs are often the best window for Roth conversions. Converting traditional IRA money to a Roth reduces your future ordinary income. That leaves more room for long-term gains to land at 0% once distributions start. During the conversion years, conversions use up room you could otherwise use to take gains at 0%, so plan the two together.
Withdraw Funds Strategically
The order you draw from taxable, tax-deferred, and tax-free accounts each year has consequences for your tax bill. The best order depends on your full income picture, Social Security timing, projected RMDs, and holdings.
How Do You Model Withdrawals Before Selling or Distributing?
Before you realize gains or take withdrawals, model a few versions. In the Boldin Planner, set your withdrawal order. Add manual withdrawals as transfers under My Plan > Money Flows. Then check Insights > Taxes to see how your projected tax liability shifts with the mix and timing of your income sources.
Add your Social Security projections. The Planner calculates your RMDs from your account balances. Then use the Roth Conversion Explorer to find years when careful sequencing can lower the taxes you owe.
Frequently Asked Questions on Capital Gains Tax
Does selling my home count toward capital gains tax?
Most people won’t owe capital gains tax on a home sale. The IRS excludes up to $250,000 of profit for single filers and $500,000 for joint filers. You must have lived in the home for two of the five years before the sale. Profit above that is taxed as a long-term capital gain on top of your other income.
What’s the difference between short-term and long-term capital gains?
Short-term capital gains come from assets you held for a year or less, and they’re taxed at your ordinary income rates. Long-term gains, on assets held more than a year, qualify for the preferential 0%, 15%, or 20% rates. Holding an appreciated asset past the one-year mark can cut the tax on the same gain.
Do qualified dividends stack the same way capital gains do?
Qualified dividends are taxed at the same preferential rates as long-term capital gains. They also sit on top of your ordinary income the same way. If your dividend income is large, it can use up the room you were counting on for your capital gains to land at 0%.
Can I avoid paying capital gains tax in retirement?
You can avoid capital gains tax in retirement by keeping taxable income, gains included, under the 0% bracket limits. Those are $49,450 for single filers and $98,900 for joint filers in 2026, rising to $51,050 and $102,100 in 2027. Roth conversions before Social Security and RMDs begin shrink the IRA withdrawals that would later crowd out the 0% bracket.
Are taxes on capital gains different by state?
Capital gains taxes differ by state. Most states with an income tax treat gains as ordinary income, while Florida, Texas, and Nevada have no state income tax. Washington has a separate tax on long-term gains: 7% above a yearly deduction, plus 2.9% on gains above $1 million. Check your state’s rules before a large sale or a move.