Federal tax law does not offer a capital gains break tied to turning 65. The old age-based exclusion for home sales disappeared in 1997, replaced by a rule that works at any age. What retirement does give you is leverage: earned income drops, the standard deduction grows once you cross 65, and you have far more control over when to sell. Used together, the strategies below are how to avoid capital gains tax when you’re over 65, or at least push the bill down close to zero.
Use the Home Sale Exclusion
Selling a home is usually the biggest taxable event a retiree faces, and it comes with the most generous exemption in the code. Section 121 lets a single filer exclude up to $250,000 of gain on a primary residence, and a married couple filing jointly can exclude up to $500,000, provided at least one spouse owned the home and both lived in it as their primary residence for two of the five years before sale.1Office of the Law Revision Counsel. 26 USC 121 – Exclusion of Gain From Sale of Principal Residence The two years don’t have to run back-to-back.
Anything above the limit is taxed at long-term capital gains rates. A couple with $600,000 of gain excludes $500,000 and pays tax on $100,000. Keep records of the purchase price and every capital improvement you’ve made, because those additions raise your basis and shrink the taxable gain.
The Care Facility Rule
Here’s the piece most retirees don’t know about. If you become physically or mentally unable to care for yourself and move into a licensed nursing home or assisted living facility, the residency requirement drops from two years to one out of the previous five. Time spent in the care facility counts as time living in the home, as long as you still own it.2Office of the Law Revision Counsel. 26 US Code 121 – Exclusion of Gain From Sale of Principal Residence Families sometimes assume the exclusion is lost once a parent leaves the house, and they either rush the sale or accept a tax bill they didn’t need to pay.
Time Gains Into the 0% Bracket
Long-term capital gains are taxed at 0%, 15%, or 20% depending on taxable income. For 2026, the 0% rate covers taxable income up to $49,450 for single filers and $98,900 for joint filers. The 15% rate takes over from there, and the 20% rate doesn’t start until $545,500 (single) or $613,700 (joint).3Tax Foundation. 2026 Tax Brackets and Federal Income Tax Rates
Retirement makes the 0% bracket reachable. The 2026 standard deduction is $16,100 for single filers and $32,200 for joint filers, and taxpayers 65 or older get an additional standard deduction on top of that.4Internal Revenue Service. IRS Releases Tax Inflation Adjustments for Tax Year 2026 That extra deduction lowers taxable income further, leaving more room to realize long-term gains at zero.
Consider a married couple, both over 65, with $60,000 in Social Security (much of it potentially excluded), $20,000 in pension income, and nothing else. After deductions, their taxable income can be low enough to absorb tens of thousands in long-term gains at 0%. Run the numbers before you sell. Only the portion above the threshold pays 15%, not the whole gain,5Internal Revenue Service. Topic No. 409, Capital Gains and Losses so splitting a large sale across two tax years can keep each year’s gains inside the zero-percent zone.
Watch the Side Effects of a Big Gain
A capital gain that looks tax-free on the surface can still trigger costs elsewhere. Three of these hit retirees hardest.
Medicare Premium Surcharges
Medicare uses your modified adjusted gross income from two years earlier to set your premiums. Capital gains count. For 2026, single filers with MAGI above $109,000, and joint filers above $218,000, start paying the Income-Related Monthly Adjustment Amount (IRMAA) on Part B and Part D. Surcharges escalate through several tiers, with the top tier hitting $689.90 per month for Part B plus a $91.00 Part D add-on at MAGI of $500,000 for singles or $750,000 for joint filers.6Centers for Medicare & Medicaid Services. 2026 Medicare Parts A and B Premiums and Deductibles
Surcharges apply per person, so a couple on Medicare can pay twice. Selling an investment property in 2026 raises your 2028 premiums. Selling a business does not qualify as a “life-changing event” that would let you appeal. Spreading gains across years, or completing a large sale before Medicare enrollment at 65, avoids the jump.
The 3.8% Net Investment Income Tax
Higher-income taxpayers owe an extra 3.8% on net investment income when modified adjusted gross income exceeds $200,000 (single) or $250,000 (joint).7Internal Revenue Service. Topic No. 559, Net Investment Income Tax The surtax applies to the lesser of your net investment income or the amount by which income exceeds the threshold. Investment income includes capital gains, interest, dividends, rental income, and royalties.8Internal Revenue Service. Questions and Answers on the Net Investment Income Tax
Gain excluded under Section 121 does not count. So a $500,000 exclusion on a home sale stays out of both the regular capital gains calculation and the 3.8% surtax. Gain from a second home or investment property is fully exposed. The $200,000 and $250,000 thresholds have never been indexed for inflation, so more retirees cross them each year.
Taxable Social Security Benefits
Capital gains also feed the formula that pulls Social Security benefits into taxable income. The IRS combines half of your benefits with your other income, gains included. If that total exceeds $25,000 (single) or $32,000 (joint), part of your benefits becomes taxable. At higher levels, up to 85% of benefits can be taxed.9Internal Revenue Service. Social Security Benefits May Be Taxable These thresholds have been frozen since 1984. A single large sale can turn Social Security income that would have been tax-free into a taxable stream. Another reason to spread gains rather than take them all at once.
Donate Appreciated Assets Instead of Selling
Give appreciated investments directly to a qualified charity and you skip the capital gains tax entirely while claiming a charitable deduction. The asset has to have been held more than a year to count as long-term capital gain property.10Internal Revenue Service. Publication 526, Charitable Contributions Transfer the stock or mutual fund shares directly to the charity; neither side pays tax on the built-in gain, and your deduction equals the fair market value on the date of transfer.
The deduction for appreciated property is capped at 30% of adjusted gross income for the year, with a five-year carryforward for anything over the limit.10Internal Revenue Service. Publication 526, Charitable Contributions Any gift worth more than $250 needs a written acknowledgment from the charity. You can confirm a charity’s tax-exempt status through the IRS Tax Exempt Organization Search.11Internal Revenue Service. Tax Exempt Organization Search
Donor-Advised Funds
If you want the deduction this year but haven’t picked charities yet, a donor-advised fund fits. You move appreciated stock into the fund, take the deduction immediately, and pay no capital gains tax on the appreciation. Assets grow tax-free inside the fund, and you recommend grants over time. This works well when a one-time sale of a business or property creates a large gain you want to offset now while distributing the charitable dollars over several years.
Roll Investment Real Estate Into a Like-Kind Exchange
A Section 1031 exchange lets you sell investment real estate and defer the entire capital gains tax by reinvesting into another qualifying property. Since the Tax Cuts and Jobs Act, only real property qualifies. Stocks, bonds, and personal property do not.12Office of the Law Revision Counsel. 26 US Code 1031 – Exchange of Real Property Held for Productive Use or Investment
The deadlines are strict. After closing on the sale of your existing property, you have 45 days to identify potential replacements and 180 days to close on one.12Office of the Law Revision Counsel. 26 US Code 1031 – Exchange of Real Property Held for Productive Use or Investment The replacement must be held for business or investment use, not personal use like a vacation home.
A 1031 defers rather than eliminates the tax. Your basis carries over from the old property, and the gain stays built into the new one. But if you keep rolling exchanges through your lifetime and pass the property to heirs, the stepped-up basis at death can wipe out the accumulated deferred gains. That combination is one of the strongest long-term real estate strategies available.
Sell in Installments
When you sell an asset and take payments over multiple years instead of a lump sum, you can report the gain proportionally as each payment arrives.13Internal Revenue Service. Publication 537, Installment Sales For a retiree selling a business, land, or rental property, this can prevent the gain from bumping you into a higher capital gains bracket, triggering the 3.8% surtax, or inflating Medicare premiums.
Each payment breaks into three pieces: return of basis (not taxed), the gain portion (capital gains rates), and interest (ordinary income). Spread a gain over five or ten years and each year’s slice can stay inside the 0% or 15% bracket.
The method isn’t available for publicly traded stocks or securities, inventory, or property held mainly for resale.13Internal Revenue Service. Publication 537, Installment Sales Sales to related parties draw extra scrutiny and generally can’t use installment reporting. Pledging the installment note as loan collateral can cause the IRS to treat those loan proceeds as a taxable payment. Privately held real estate and business assets sold to unrelated buyers are the sweet spot.
Harvest Losses to Offset Gains
Selling investments that have dropped in value creates losses that offset gains dollar for dollar. If losses exceed gains, you can deduct up to $3,000 against ordinary income each year, or $1,500 if married filing separately, with unlimited carryforward for anything left over.5Internal Revenue Service. Topic No. 409, Capital Gains and Losses
The wash-sale rule is the main trap. Sell a security at a loss and buy the same or a substantially identical one within 30 days before or after, and the loss is disallowed.14Office of the Law Revision Counsel. 26 USC 1091 – Loss From Wash Sales of Stock or Securities The disallowed loss is added to the basis of the replacement, so it isn’t lost forever, only delayed. To stay exposed to the same sector, buy a different fund tracking a similar but not identical index.
For retirees drawing down a portfolio, loss harvesting pairs naturally with annual withdrawals. Sell the losing positions first for living expenses, generate losses, and use them against gains realized elsewhere. Done every year, it can trim taxes for a long time.
Hold the Most Appreciated Assets for the Stepped-Up Basis
If you don’t need to sell a heavily appreciated asset to live on, holding it until death delivers a large benefit to your heirs. Under Section 1014, inherited property gets a new basis equal to its fair market value on the date of death.15Office of the Law Revision Counsel. 26 US Code 1014 – Basis of Property Acquired From a Decedent All the appreciation that built up during your lifetime is erased for income tax purposes. Heirs who sell shortly after inheriting owe little or nothing.
This covers stocks, real estate, business interests, and most other capital assets. Publicly traded securities are typically valued at the closing price on the date of death; real estate and closely held businesses need a professional appraisal. Heirs should document the valuation carefully because it sets the basis for any future sale.
The math is simple. Stock bought decades ago at $10 that now trades at $200 carries a huge gain if you sell. Pass it at death and the basis resets to $200, wiping out the prior appreciation. For assets you don’t need to sell for living expenses, holding often beats selling, especially when combined with 1031 exchanges on the real estate side.