If you’re over 65 and selling your house, the capital gains tax on a home sale works the same way it does for everyone else. There’s no senior discount and no age-based exemption. What tips the math in your favor is a set of general rules that happen to help long-term owners the most: a principal residence exclusion of up to $250,000 for single filers or $500,000 for married couples, a basis reset when a spouse dies, an enhanced standard deduction for people 65 and older, and income brackets that put many retirees at a 0% federal capital gains rate.
Getting the number right starts with the gain itself, then the exclusion, then the rate. After that come the ripple effects on Medicare and Social Security, which surprise a lot of sellers.
Figuring the Gain on Your Home
Your taxable gain is not the sale price minus what you paid decades ago. It’s the net sale price minus your adjusted basis. Every dollar you can legitimately add to basis is a dollar you don’t pay tax on.
Start with the original purchase price and the closing costs you paid when you bought, such as title insurance and legal fees. Then add capital improvements made over the years. Improvements are projects that add value, extend the home’s useful life, or adapt it to a new purpose: a room addition, a new roof, central air, a deck, a kitchen remodel, new flooring, a security system.1Internal Revenue Service. Publication 523, Selling Your Home Routine repairs generally don’t count, though repair work rolled into a larger remodel can be included. If you ever rented the home out and claimed depreciation, subtract that depreciation from basis.
From the sale side, take the gross price and subtract commissions, transfer taxes, and other selling costs. Net sale price minus adjusted basis is your gross gain before any exclusion.
For someone who bought 25 or 30 years ago, the adjusted basis is often startlingly low compared with today’s price. Digging out old contractor invoices, permits, and canceled checks can be tedious, but it’s usually where the biggest untapped savings sit.
The $250,000 and $500,000 Principal Residence Exclusion
The main tax break for anyone selling a primary home comes from Section 121. Single filers can exclude up to $250,000 of gain from income. Married couples filing jointly can exclude up to $500,000.2Office of the Law Revision Counsel. 26 USC 121 – Exclusion of Gain From Sale of Principal Residence For seniors who bought long ago in an appreciating market, this exclusion often wipes out the entire taxable gain.
Two tests qualify you for the full amount. The ownership test: you owned the home for at least two of the five years before the sale. The use test: you lived in it as your main home for at least two of those same five years. The two-year periods don’t have to overlap. You also can’t have used the exclusion on another home sale within the prior two years.3Internal Revenue Service. Topic No. 701, Sale of Your Home For a joint $500,000 exclusion, either spouse can meet the ownership test, but both must independently meet the use test.2Office of the Law Revision Counsel. 26 USC 121 – Exclusion of Gain From Sale of Principal Residence Any gain above the exclusion is taxed at long-term capital gains rates.
Partial Exclusion for a Health-Related Sale
If a health issue forces a sale before you meet the full two years, you may still qualify for a partial exclusion. This covers moves for medical treatment, moves to provide care for a sick family member, and situations where a doctor recommends a change of residence for health reasons.1Internal Revenue Service. Publication 523, Selling Your Home
To calculate the partial exclusion, take the shorter of your ownership period, your use period, or the time since you last claimed the exclusion, and divide by 24 months. Multiply the result by $250,000 (or $500,000 for a joint return). Lived in the home 15 months before a health-forced sale? Your limit is 15/24 × $250,000 = $156,250.1Internal Revenue Service. Publication 523, Selling Your Home
The Care Facility Rule
Time in a licensed care facility counts toward the two-year use test, provided you lived in the home as your main residence for at least one year during the five-year period before the sale. If you became physically or mentally unable to care for yourself and moved into a nursing home or assisted living facility, the IRS treats that time as continued use of the home.1Internal Revenue Service. Publication 523, Selling Your Home The rule exists for exactly the pattern many families face: a move into care followed by a home sale a year or two later.
Surviving Spouse: The Two-Year Window
If your spouse recently died, you can still claim the full $500,000 exclusion rather than the $250,000 single-filer amount, but only if you sell within two years of the death and the couple met the joint-return requirements immediately before it.4Office of the Law Revision Counsel. 26 USC 121 – Exclusion of Gain From Sale of Principal Residence After that window closes, the exclusion drops to $250,000. This is one of the sharpest deadlines in the code for a widowed seller.
Stepped-Up Basis When a Spouse Dies
Section 1014 resets the basis of inherited property to its fair market value on the date of the owner’s death.5Office of the Law Revision Counsel. 26 USC 1014 – Basis of Property Acquired From a Decedent For a home a couple bought 40 years ago, that can erase decades of accumulated gain.
For a surviving spouse, the step-up applies to the deceased spouse’s share. In the nine community property states, both halves of community property step up to fair market value at the first spouse’s death, not just the decedent’s half.6Internal Revenue Service. Publication 555, Community Property The double step-up in those states can save a survivor tens of thousands compared with the same sale in a common-law state.
Between the surviving-spouse $500,000 exclusion window and a stepped-up basis, a widowed seller who moves within two years of losing a spouse often owes no capital gains tax at all.
Federal Capital Gains Rates for 2026
Gain that remains after the exclusion is taxed at long-term capital gains rates: 0%, 15%, or 20%. The rate depends on your total taxable income for the year, including the gain.
For the 2026 tax year, the thresholds are:7Internal Revenue Service. Revenue Procedure 2025-32
- 0% rate: taxable income up to $49,450 single, $98,900 married filing jointly, $66,200 head of household.
- 15% rate: $49,451 to $545,500 single, $98,901 to $613,700 joint, $66,201 to $579,600 head of household.
- 20% rate: income above $545,500 single, $613,700 joint, $579,600 head of household.
Many retirees whose income is mostly Social Security and modest pension or investment income fit inside the 0% bracket. A married couple with $60,000 of other taxable income and a $30,000 post-exclusion gain has $90,000 of taxable income, which stays under $98,900 and produces no federal capital gains tax.
The Enhanced Deduction for Seniors
Taxable income is calculated after the standard deduction, and seniors get a larger one. For 2025 through 2028, individuals 65 and older can claim an additional $6,000 deduction on top of the existing senior standard deduction ($12,000 for a couple where both spouses qualify).8Internal Revenue Service. Check Your Eligibility for the New Enhanced Deduction for Seniors That extra deduction can be what keeps a gain in the 0% or 15% bracket instead of the next tier up.
Net Investment Income Tax
Higher-income sellers face an additional 3.8% surtax on investment income, including capital gains. The Net Investment Income Tax applies when modified adjusted gross income exceeds $200,000 for single filers or $250,000 for married couples filing jointly.9Internal Revenue Service. Net Investment Income Tax Those thresholds are set by statute and not indexed for inflation. A big home sale can push you over the line even in a year your ordinary income wouldn’t.
The Ripple Effects: Medicare Premiums and Social Security
A capital gain doesn’t stop at the capital gains line. It flows into two other calculations that hit a retiree’s monthly budget.
Medicare Premium Surcharges
Medicare Part B and Part D premiums are income-adjusted. If your modified adjusted gross income exceeds certain thresholds, you pay a surcharge (IRMAA) on top of the standard premium. For 2026, the first surcharge bracket starts above $109,000 for individuals and $218,000 for joint filers, with surcharges rising through several tiers up to income of $500,000 individual or $750,000 joint.10Centers for Medicare & Medicaid Services. 2026 Medicare Parts A and B Premiums and Deductibles
Capital gains count toward the MAGI IRMAA uses, and IRMAA looks at your tax return from two years earlier. A large home sale in 2026 raises your Medicare premiums in 2028. The surcharge hits Part B and Part D together, so the monthly cost compounds. A couple whose income normally sits at $150,000 but spikes to $300,000 in the sale year can end up paying hundreds more per month in premiums two years out.
Social Security Benefit Taxation
Capital gains also feed the formula that decides how much of your Social Security benefits become taxable. Add half your annual benefits to all other income, including capital gains. If the total exceeds $25,000 single or $32,000 joint, up to 50% of benefits become taxable. Above $34,000 single or $44,000 joint, up to 85% becomes taxable.11Office of the Law Revision Counsel. 26 USC 86 – Social Security and Tier 1 Railroad Retirement Benefits These thresholds have never been indexed for inflation, so essentially any meaningful capital gain pushes a retiree into the 85% tier for the year of sale.
Spreading a Big Gain With an Installment Sale
When the Section 121 exclusion doesn’t cover everything, an installment sale can soften the tax and the ripple effects. Instead of collecting the full price at closing, you take payments over multiple years and recognize the gain proportionally as payments arrive.12Office of the Law Revision Counsel. 26 USC 453 – Installment Method
The math runs through a gross profit ratio: divide total gain by contract price, and that percentage of each annual payment is taxable gain. The rest is a tax-free return of basis. Spreading the income can keep each year inside the 0% or 15% bracket rather than punching into a higher tier all at once.13Internal Revenue Service. Publication 537, Installment Sales It also spreads the MAGI hit across several years, softening the IRMAA and Social Security effects described above. The buyer pays interest on the outstanding balance, which you report along with the gain each year. Installment sales are reported on Form 6252.
One boundary to keep in mind: the Section 121 exclusion applies to a primary residence. A vacation home or rental property gets no exclusion, and the full gain is taxable. Investment properties also trigger depreciation recapture at a maximum 25% federal rate on the portion of gain equal to depreciation previously claimed, and a Section 1031 like-kind exchange (with strict 45-day and 180-day deadlines) is available only for investment property, not for your home.14Internal Revenue Service. Like-Kind Exchanges Under IRC Section 1031
Reporting the Sale
Every real estate sale is reported on your federal return, even when the entire gain is excluded under Section 121. The transaction details go on Form 8949 and flow to Schedule D of your Form 1040.15Internal Revenue Service. 2025 Instructions for Form 8949 – Sales and Other Dispositions of Capital Assets Installment sales use Form 6252.
Hold on to the original purchase paperwork, closing statements, and every capital improvement receipt you can find. For anyone who has owned a home for decades, rebuilding the improvement history is the single hardest step and the one that usually returns the most tax.
State Capital Gains Taxes
Federal is only half the picture. Most states tax capital gains as ordinary income, with rates ranging from 0% to over 14%. Nine states have no income tax at all, meaning no state-level capital gains tax either. A few offer senior-specific exclusions or property tax deferral programs, with eligibility and benefits that vary widely. If you plan to sell and relocate, the sequence and timing of the move relative to the sale can determine which state gets to tax the gain.