Capital gains tax in retirement works the same way it does at any age: profits on assets you’ve held longer than a year are taxed at 0%, 15%, or 20%, and profits on assets held a year or less are taxed as ordinary income.1Internal Revenue Service. Topic No. 409, Capital Gains and Losses What changes in retirement is the income mix around the gain. Required minimum distributions, pensions, and Social Security all count toward the taxable income figure that decides which rate your gain falls into, so the same sale can cost nothing or cost thousands depending on what else hits your return that year.
The 2026 Long-Term Rate Brackets
For 2026, long-term capital gains are taxed at:2Internal Revenue Service. IRS Releases Tax Inflation Adjustments for Tax Year 2026
- 0% on taxable income up to $49,450 single, $98,900 married filing jointly, $66,200 head of household.
- 15% from those thresholds up to $545,500 single, $613,700 joint, $579,600 head of household.
- 20% above the 15% ceiling.
Taxable income is total income minus deductions, not just the gain. The 2026 standard deduction is $16,100 single and $32,200 joint.2Internal Revenue Service. IRS Releases Tax Inflation Adjustments for Tax Year 2026 A married couple with $90,000 in gross income and the standard deduction has about $57,800 of taxable income, which means a good chunk of any long-term gain would still fit inside the 0% bracket before crossing into 15%.
Short-term gains, on assets you held a year or less, get no preferential rate. They’re taxed with the rest of your ordinary income, which for 2026 tops out at 37%.3Internal Revenue Service. Federal Income Tax Rates and Brackets Holding period matters more than almost any other single variable.
How Your Other Retirement Income Stacks the Gain
Capital gains sit on top of your ordinary income. Every dollar of pension, RMD, or taxable Social Security raises the platform your gain gets stacked on, and it’s the top of that stack that determines whether you land in the 0%, 15%, or 20% bracket.
Required minimum distributions are usually the biggest lever. Once you reach age 73, you have to withdraw a set amount each year from traditional IRAs, 401(k)s, and similar tax-deferred accounts, and those withdrawals are taxed as ordinary income. A retiree with $60,000 in pension and RMD income who sells stock for a $30,000 long-term gain will see most or all of the gain fall in the 15% bracket, not the 0% bracket, because the first $60,000 of the income tower is already built. Missing an RMD makes it worse: the penalty is 25% of the amount you should have taken, reduced to 10% if corrected within two years.4Internal Revenue Service. Retirement Plan and IRA Required Minimum Distributions FAQs
One way to shrink the RMD portion of that stack: a qualified charitable distribution. If you’re 70½ or older, you can send up to $111,000 per year directly from a traditional IRA to a qualified charity. The transfer counts toward your RMD but stays out of your taxable income, which keeps the taxable-income figure that governs your capital gains rate lower.
Selling Inside a Retirement Account vs. a Brokerage Account
Selling investments inside a traditional IRA, 401(k), or Roth account is not a capital gains event. You can rebalance freely without owing anything at the time of the trade. The tax happens when money leaves the account, and the rules depend on the account type.
Withdrawals from traditional IRAs and 401(k)s are taxed as ordinary income at your regular bracket, regardless of whether the growth inside came from dividends, interest, or selling appreciated stock.5Internal Revenue Service. Publication 590-B, Distributions From Individual Retirement Arrangements The lower long-term capital gains rates do not apply. That’s the tradeoff for the upfront deduction you took when contributing.
Qualified Roth distributions are entirely tax-free. To qualify, the Roth IRA must have been open at least five years and you must be at least 59½.6Internal Revenue Service. Roth IRAs Roth IRAs have no lifetime RMDs, and since 2024 Roth accounts inside employer plans are exempt from RMDs as well.
In a standard brokerage account, every sale is immediate. Your gain is the sale price minus your cost basis (typically what you paid plus commissions and any reinvested dividends). Assets held over a year get long-term rates; anything a year or less gets ordinary rates.1Internal Revenue Service. Topic No. 409, Capital Gains and Losses Sales get reported on Form 8949 and Schedule D. Cost basis on shares bought decades ago is one of the most common places retirees overpay by accident.
Selling the Family Home
A primary residence gets a large carve-out. You can exclude up to $250,000 of gain if you’re single or $500,000 if married filing jointly.7Office of the Law Revision Counsel. 26 USC 121 – Exclusion of Gain From Sale of Principal Residence For most retirees downsizing after decades in a home, the exclusion eliminates the entire federal tax bill.
To qualify, you must have owned and used the home as your primary residence for at least two of the five years before the sale. The two years don’t have to be consecutive.8Internal Revenue Service. Topic No. 701, Sale of Your Home For married couples, both spouses must meet the use test but only one has to meet the ownership test. You can use the exclusion once every two years.7Office of the Law Revision Counsel. 26 USC 121 – Exclusion of Gain From Sale of Principal Residence
If you move into a licensed care facility before selling, the residency requirement bends. Time as a patient in a state-licensed facility counts as time living in your home if you’re physically or mentally unable to care for yourself, and the actual ownership-and-use requirement drops to one year within the five-year window.9Internal Revenue Service. Publication 523, Selling Your Home
Gain above the exclusion is taxed at the usual 0%, 15%, or 20% long-term rate based on your total income. You have to report the sale if the gain exceeds the exclusion or if you receive a Form 1099-S at closing.8Internal Revenue Service. Topic No. 701, Sale of Your Home The exclusion does not apply to vacation homes or investment properties.
Inherited Assets and the Stepped-Up Basis
When you inherit investments or real estate in a taxable account, the cost basis resets to the fair market value on the date the previous owner died.10Office of the Law Revision Counsel. 26 USC 1014 – Basis of Property Acquired From a Decedent If a parent bought stock for $10,000 that was worth $200,000 at their death, your basis is $200,000. Only appreciation after the date of death is taxable when you sell.11Internal Revenue Service. Gifts and Inheritances
The step-up applies to assets in taxable accounts. It does not apply to inherited traditional IRAs or 401(k)s, which are taxed as ordinary income to the heir when withdrawn. Selling an inherited brokerage holding or house soon after the death often produces little or no gain, because the basis just reset.
The Costs a Gain Can Trigger Beyond the Gain Itself
The 3.8% Net Investment Income Tax
Higher-income retirees owe an extra 3.8% surtax on net investment income, including capital gains, once modified adjusted gross income passes $200,000 single or $250,000 joint.12Office of the Law Revision Counsel. 26 USC 1411 – Imposition of Tax The 3.8% applies to the smaller of your net investment income or the amount by which your MAGI exceeds the threshold. Those thresholds have not been indexed for inflation since 2013, so more retirees cross them each year. A joint filer with $180,000 in pension and Social Security who sells a rental for a $100,000 gain ends up with MAGI of $280,000, and the surtax hits $30,000 of the gain. Combined with the 15% or 20% capital gains rate, the effective federal rate on those dollars reaches 18.8% or 23.8%.
Medicare IRMAA Surcharges
A large gain in one year can raise Medicare Part B and Part D premiums two years later. The Income-Related Monthly Adjustment Amount is based on MAGI from two years prior, and for 2026 the surcharges start above $109,000 individual income or $218,000 joint income.13Centers for Medicare & Medicaid Services. 2026 Medicare Parts A and B Premiums and Deductibles The surcharge applies for the full 12 months of the affected year and steps up in tiers, reaching $487.00 per month at the top of the scale. A one-time gain from a home sale or a large liquidation in 2026 shows up in 2028 premiums. Some retirees split a planned sale across two tax years to keep MAGI under a tier line.
More of Your Social Security Becomes Taxable
Capital gains don’t reduce Social Security benefits, but they can make more of them taxable. The IRS uses a combined income formula (adjusted gross income plus nontaxable interest plus half your Social Security), and capital gains are included in it. Single filers with combined income between $25,000 and $34,000 pay tax on up to 50% of benefits, and above $34,000 on up to 85%. For joint filers, the ranges are $32,000–$44,000 for the 50% level and above $44,000 for 85%. These thresholds have not moved since 1984. A retiree sitting just below a threshold can find that one asset sale both triggers tax on the gain and pulls a much larger share of Social Security onto the return.14Internal Revenue Service. IRS Reminds Taxpayers Their Social Security Benefits May Be Taxable
Using Losses to Offset Gains
Losses on investments in a taxable account offset gains in the same year. A $20,000 gain on one stock and a $12,000 loss on another leaves $8,000 of net gain to tax. Short-term losses offset short-term gains first, long-term losses offset long-term gains first, and any leftover losses cross over to the other category.
If total losses exceed total gains, up to $3,000 of the excess deducts against ordinary income ($1,500 if married filing separately). Anything beyond that carries forward indefinitely.1Internal Revenue Service. Topic No. 409, Capital Gains and Losses Retirees rebalancing a portfolio often pair a winning sale with a losing one to keep net income under an IRMAA tier or the net investment income tax threshold.
Watch the wash sale rule. If you sell at a loss and buy the same or a substantially identical security within 30 days before or after the sale, the loss is disallowed for that year. It’s not lost permanently; it gets added to the basis of the replacement shares.
Paying the Tax on Time
Retirees whose income arrives without withholding, or who take a large gain in a single year, generally need to make quarterly estimated tax payments to avoid a penalty. The IRS wants at least 90% of the current year’s tax liability, or 100% of the prior year’s, paid through withholding or estimates during the year.15Internal Revenue Service. Pay As You Go, So You Won’t Owe
Estimated payments fall on April 15, June 15, September 15, and January 15 of the following year. A sale in August requires an estimated payment by September 15. Another option: raise the withholding on a pension or Social Security payment for the rest of the year. The IRS treats withholding as paid evenly across the year regardless of when it actually happens, so late-year withholding can cover a mid-year gain without triggering an underpayment penalty.15Internal Revenue Service. Pay As You Go, So You Won’t Owe