Capital gains do affect Social Security benefits, but not in the way most people fear: they never reduce the monthly check you’re entitled to. What they can do is raise the tax you owe on that check, push your Medicare premiums higher, and, for Supplemental Security Income recipients, put eligibility itself at risk. The Social Security Administration ignores investment profits when it decides whether to withhold benefits, but the IRS counts them when it decides how much of your benefit to tax.
The Earnings Test Ignores Capital Gains
If you claim retirement benefits before full retirement age and keep working, the Social Security Administration applies an earnings test that temporarily withholds part of your benefit once your earnings pass a set threshold. That test only counts wages from a job and net self-employment income.1eCFR. 20 CFR 404.429 – Earnings; Defined Profits from selling stocks, real estate, or other investments are not earnings for this purpose.
For 2026, the thresholds are:
- Under full retirement age all year: $1 in benefits withheld for every $2 you earn above $24,480.
- Reaching full retirement age during 2026: $1 withheld for every $3 earned above $65,160, counting only earnings in the months before you reach full retirement age.2Social Security Administration. Exempt Amounts Under the Earnings Test
Because capital gains fall outside the definition of earnings, you could sell a house, liquidate a brokerage account, or cash out a large position without any withholding from your monthly benefit. Once you reach full retirement age, the earnings test stops applying to wages too, and any benefits previously withheld are added back into higher future payments.
How Capital Gains Raise the Tax on Your Benefits
The benefit amount is safe. The tax on it is not. The IRS uses a figure called combined income, sometimes called provisional income, to decide how much of your Social Security is taxable. Combined income equals your adjusted gross income, plus any tax-exempt interest, plus half of your Social Security benefits.3Internal Revenue Service. Social Security Income FAQs Capital gains are part of adjusted gross income, so a profitable sale feeds directly into that number.
Federal law then sets two tiers:
- Up to 50 percent of your benefits taxable: combined income between $25,000 and $34,000 for single filers, or between $32,000 and $44,000 for joint filers.
- Up to 85 percent taxable: combined income above $34,000 for single filers, or above $44,000 for joint filers.4Office of the Law Revision Counsel. 26 USC 86 – Social Security and Tier 1 Railroad Retirement Benefits
These thresholds are not indexed for inflation and have not moved since they were set in the 1980s and 1990s, so more retirees cross them every year. Consider a couple filing jointly with $30,000 in Social Security and $20,000 in pension income. Their combined income is $35,000 — the pension plus half the benefit — and only a portion of their Social Security is taxable. Sell stock for a $50,000 gain in the same year and combined income jumps to $85,000, well past the $44,000 second-tier threshold, and up to 85 percent of the benefits become subject to federal income tax.4Office of the Law Revision Counsel. 26 USC 86 – Social Security and Tier 1 Railroad Retirement Benefits
Selling a Primary Home
Selling your primary residence is the exception most retirees encounter. You can exclude up to $250,000 of profit as a single filer, or up to $500,000 as a joint filer, if you owned and lived in the home for at least two of the five years before the sale.5Office of the Law Revision Counsel. 26 USC 121 – Exclusion of Gain From Sale of Principal Residence Excluded gain never enters adjusted gross income, so it doesn’t push up combined income and doesn’t increase the taxable share of your Social Security. Only profit above the exclusion counts.
Medicare Premium Surcharges Shrink Your Deposit
Capital gains can shrink the Social Security deposit that lands in your bank account, but they do it indirectly, through Medicare. The Social Security Administration uses your modified adjusted gross income from two years earlier to set an Income-Related Monthly Adjustment Amount, or IRMAA, on top of standard Part B and Part D premiums.6Social Security Administration. Medicare Annual Verification Notices – Frequently Asked Questions A large gain reported on your 2026 return will show up in your 2028 premiums.
The standard 2026 Part B premium is $202.90 per month. For single filers, the surcharge tiers are:7CMS. 2026 Medicare Parts A and B Premiums and Deductibles
- $109,000 or less: no surcharge, $202.90 per month.
- $109,001 to $137,000: $81.20 surcharge, $284.10 per month.
- $137,001 to $171,000: $202.90 surcharge, $405.80 per month.
- $171,001 to $205,000: $324.60 surcharge, $527.50 per month.
- $205,001 to $499,999: $446.30 surcharge, $649.20 per month.
- $500,000 or more: $487.00 surcharge, $689.90 per month.
Joint-filer thresholds are roughly double, with no surcharge at $218,000 or less and the top bracket starting at $750,000.7CMS. 2026 Medicare Parts A and B Premiums and Deductibles Because Medicare premiums are typically pulled directly from your Social Security payment, the surcharge shows up as a smaller monthly deposit rather than a separate bill. A single retiree moved from the no-surcharge tier into the second tier by one year’s capital gain would pay about $973 more in premiums over the year that follows.
One boundary worth knowing: a one-time capital gain by itself is not a life-changing event for IRMAA appeal purposes. The Social Security Administration allows reconsideration for events like marriage, divorce, death of a spouse, stopping or reducing work, or loss of a pension.8Social Security Administration. Request to Lower an Income-Related Monthly Adjustment Amount If your gain happened in the same year as one of those qualifying events, filing Form SSA-44 may bring the surcharge down.
Supplemental Security Income Is Different
Supplemental Security Income is the one place a capital gain can end benefits outright. SSI is needs-based and applies strict income and resource limits. Income is defined broadly as anything received in cash or in kind that can be used for food or shelter.9eCFR. 20 CFR 416.1102 – What Is Income?10eCFR. 20 CFR 416.1205 – Limitation on Resources If sale proceeds sit in your account and push your total resources past the SSI limit, eligibility ends the following month.
The home you live in is excluded while you live in it. If you sell it, the proceeds stay excluded from countable resources for three months, but only if you intend to buy another home and actually do so within that window.11Social Security Administration. 20 CFR 416.1212 – Exclusion of the Home Anything not reinvested in a replacement home after three months becomes countable.
SSI recipients also have to report changes in income and resources by the tenth of the month after the change.12Social Security Administration. Report Changes to Your Situation While on SSI Retirement beneficiaries generally don’t have this problem: the Social Security Administration only asks about wages and self-employment for the earnings test, and it gets your investment income from IRS data for the Medicare calculation.13Social Security Administration. 20 CFR 404.452 – Reports to Social Security Administration of Earnings
Ways to Blunt the Impact
You can’t remove every tax consequence, but you can keep a single sale from doing outsized damage.
- Spread the gain across years. An installment sale recognizes profit gradually, letting you include only part of the gain each year. Staying below the $34,000 or $44,000 combined-income line keeps you out of the 85 percent tier.14Internal Revenue Service. Topic No. 705 – Installment Sales
- Harvest losses. Selling investments that have declined offsets gains dollar for dollar, lowering adjusted gross income and, with it, the taxable share of benefits and the odds of hitting an IRMAA tier.
- Use the full home sale exclusion. Confirm you meet the two-out-of-five-year ownership and use tests before you sell, so the $250,000 or $500,000 stays out of combined income.5Office of the Law Revision Counsel. 26 USC 121 – Exclusion of Gain From Sale of Principal Residence
- Do Roth conversions before claiming. Conversions trigger tax in the year you make them, but later Roth withdrawals are tax-free and don’t count toward combined income. Lower-income years before Social Security starts are usually the best time.
- Time large sales around retirement milestones. A year with less other income absorbs a gain more easily, and bunching deductions into the same year can offset the income spike.
Each of these moves involves tradeoffs that depend on your tax bracket, other income, and how long you plan to hold the asset. Running the numbers with a tax professional before you sell is usually cheaper than fixing the return afterward.