For millions of older Americans, selling a home in retirement frees up decades of home equity, eliminates steep property tax and maintenance bills, and funds the transition to a single-story residence or continuing care community. Yet because the federal capital gains exclusion caps have remained frozen at $250,000 for single filers and $500,000 for married couples filing jointly since 1997, long-time homeowners in Tax Year 2026 (returns filed in 2027) frequently face surprise six-figure taxable gains.
Navigating the section 121 exclusion requires more than just counting how many years you owned the house. Whether you are downsizing, moving a loved one into an assisted living facility under the 1-year out-of-residence rule, or selling a family home after losing a spouse, every 2026 tax threshold, cost-basis adjustment, and Medicare surcharge rule below is verified against IRS Publication 523, Revenue Procedure 2025-32, and the One Big Beautiful Bill Act (OBBBA, P.L. 119-21).
⚡ Executive Summary: Key 2026 Tax Rules at a Glance
- 2026 Section 121 Exclusion Caps (Filed by April 15, 2027): Under IRC Section 121(b), qualifying sellers exclude up to $250,000 of capital gain (Single) or $500,000 (Married Filing Jointly) if they owned and lived in the home as their principal residence for at least 24 months (730 days) out of the 5 years before the sale date.
- IRC §121(d)(7) Nursing-Home Exception: If a homeowner becomes physically or mentally incapable of self-care and moves into a state-licensed nursing home or assisted living facility, the physical residence requirement drops from 2 years to 1 year (12 months) out of the 5-year window, and time spent in the facility counts as residence time in the home.
- Surviving Spouse $500,000 Window & Step-Up in Basis: Under IRC Section 121(b)(4), an unmarried widow or widower retains the full $500,000 joint exclusion if the home is sold within 2 years (730 days) of the spouse’s date of death—stacked on top of a 50% step-up in cost basis (or a 100% full step-up in community property states) under IRC Section 1014.
- 2026 Senior Bonus & Medicare IRMAA Domino Effect: Any taxable home sale gain above your exclusion increases your 2026 Line 11 AGI (reported on Form 8949 and Schedule D), which can phase out your $6,000 / $12,000 OBBBA Schedule 1-A senior deduction (between $75k–$175k Single or $150k–$250k Joint MAGI) and trigger 2028 Medicare IRMAA surcharges.
Table of Contents
- ⚡ Executive Summary: Key 2026 Tax Rules at a Glance
- How IRS Exclusion Rules Work When Selling a Home in Retirement in 2026
- How to Calculate Adjusted Cost Basis and 2026 Capital Gains Tax Above the Cap
- The Nursing-Home Exception (IRC Section 121(d)(7)): The 1-Out-of-5-Year Rule
- Surviving Spouse Benefits: The 2-Year $500,000 Window and Step-Up in Basis
- Partial Exclusion Rules When Health Forces an Early Move Under 2 Years
- 4 Hidden 2026 Tax Traps When Selling a Home in Retirement (IRMAA, $6,000 Senior Bonus & Social Security)
- Medicaid Trusts, Downsizing to a Rental, and Depreciation Recapture Traps
- 4 Real-World Hypothetical Scenarios With Step-by-Step 2026 Tax Math
- Step-by-Step Guide: How to Report a 2026 Retirement Home Sale on Form 8949 & Schedule D
- Federal vs. State Rules: Community Property Step-Up, Prop 19 & Senior Transfer Taxes
- Frequently Asked Questions About Selling a Home in Retirement in 2026
- Final Pre-Listing Tax Checklist for Retirees and Families
How IRS Exclusion Rules Work When Selling a Home in Retirement in 2026
Under Internal Revenue Code (IRC) Section 121, IRS exclusion rules allow qualifying homeowners to exclude up to $250,000 of profit from federal capital gains tax if filing as Single (or up to $500,000 if Married Filing Jointly) when selling their principal residence in 2026.
Contrary to a common myth among older homeowners, this tax break is not a once-in-a-lifetime exemption, nor does it require rolling your sale proceeds into a more expensive replacement house (that old pre-1997 “rollover replacement rule” under former IRC Section 1034 was repealed nearly three decades ago). You can downsize into a smaller condo, move into a rental apartment, or put the cash straight into Treasury bills and still claim the full section 121 exclusion—as long as you satisfy the three statutory tests in IRS Publication 523 (Selling Your Home) during the five-year window ending on your closing date:
- 1. The 2-Year Ownership Test (IRC Section 121(a)): You must have owned the home for at least 24 full months (or 730 days) during the 5 years immediately preceding the date of sale. For married couples filing a joint return, only one spouse needs to meet the 24-month ownership requirement under IRC Section 121(b)(2)(A)(i).
- 2. The 2-Year Residence / Use Test (IRC Section 121(a)): You must have lived in the property as your principal residence (main home) for at least 24 full months (or 730 days) during that same 5-year window. The 24 months of occupancy do not need to be one continuous block, and short temporary absences for vacations or seasonal travel still count as time lived at home. However, for a married couple to claim the full $500,000 exclusion on a joint return, both spouses must individually satisfy the 24-month residence test! (If a newly married spouse moved into the home only 14 months before closing, the couple is limited to a single $250,000 exclusion unless a health exception applies).
- 3. The 2-Year Look-Back Frequency Test (IRC Section 121(b)(3)): Neither you nor your spouse can have excluded the gain from the sale of another principal residence during the 2-year period ending on the date of the current home sale.

How to Calculate Adjusted Cost Basis and 2026 Capital Gains Tax Above the Cap
Your taxable capital gain is never your sale price minus your original purchase price. Under IRC Section 1001 and Section 1016, you first subtract selling expenses and your adjusted cost basis—including decades of capital improvements—before applying your $250,000 or $500,000 exclusion.
When selling a home in retirement after 25 or 30 years of ownership, rebuilding your adjusted cost basis is the single highest-ROI exercise you can perform. Every $10,000 of documented capital improvements or closing costs you uncover trims $10,000 directly off your taxable gain—saving up to $2,380 in federal tax plus state income tax!
The 3-Step IRS Publication 523 Gain Formula
- Step 1: Calculate “Amount Realized” = Gross Sale Price − Selling Expenses. Start with the gross contract sale price and subtract all selling expenses paid by the seller: real estate agent commissions (typically 4% to 6%), title/escrow closing fees, legal fees, transfer/stamp taxes, seller-paid points, and staging or inspection fees directly tied to the sale.
- Step 2: Calculate “Adjusted Cost Basis” = Original Purchase Price + Acquisition Costs + Capital Improvements + Step-Up in Basis − Depreciation. Add your original purchase price, qualifying buyer closing costs from when you bought the house (owner’s title insurance, survey fees, recording fees, transfer taxes), and all lifetime capital improvements (new roofs, room additions, kitchen/bath remodels, decks, finished basements, driveways, central HVAC systems, windows, and landscaping—see our guide on how to write off home improvements and track cost basis). If a spouse passed away during ownership, incorporate the IRC Section 1014 step-up in basis. Finally, subtract any post-May 6, 1997 depreciation claimed or allowable for a home office or rental period.
- Step 3: Subtract Your Section 121 Exclusion ($250,000 or $500,000) From Total Gain. Subtract your Adjusted Cost Basis (Step 2) from your Amount Realized (Step 1) to find your Total Realized Gain. Then subtract up to $250,000 (Single) or $500,000 (Married Filing Jointly / Qualifying Surviving Spouse within 2 years). If the result is $0 or negative, you owe $0 federal capital gains tax (note that a net loss on the sale of a personal residence is never deductible).
What If Your Gain Exceeds $250,000 / $500,000? (2026 Long-Term Capital Gains Brackets + 3.8% NIIT)
Any remaining gain above your Section 121 exclusion on a home owned for more than one year is taxed as a long-term capital gain on Schedule D (Form 1040). Per IRS Revenue Procedure 2025-32, your taxable gain stacks on top of your other 2026 taxable income across these exact 2026 rate tiers (plus the 3.8% Net Investment Income Tax on Form 8960 once Modified Adjusted Gross Income exceeds $200,000 Single or $250,000 Married Filing Jointly—note that the excluded $250k/$500k portion is 100% exempt from the 3.8% NIIT!):
| 2026 Long-Term Capital Gains Rate | Single Filers (2026 Taxable Income) | Married Filing Jointly & Surviving Spouses | Head of Household (2026 Taxable Income) | 3.8% NIIT Surtax Applies When MAGI Exceeds: |
|---|---|---|---|---|
| 0% Capital Gains Rate | $0 to $49,450 | $0 to $98,900 | $0 to $66,200 | Exempt (Below NIIT threshold) |
| 15% Capital Gains Rate | $49,451 to $545,500 | $98,901 to $613,700 | $66,201 to $579,600 | $200,000 (Single/HOH) / $250,000 (MFJ/QSS) -> Effective 18.8% rate |
| 20% Capital Gains Rate | Over $545,500 | Over $613,700 | Over $579,600 | Effective 23.8% top federal rate (20% LTCG + 3.8% NIIT) |
To see how your pension, IRA distributions, and capital gains interact across every income tier, check our 2026 federal tax brackets and capital gains rates guide.
The Nursing-Home Exception (IRC Section 121(d)(7)): The 1-Out-of-5-Year Rule
Under IRC Section 121(d)(7), the nursing-home exception reduces the physical residence requirement from 24 months down to 12 months (1 year) out of the 5 years before the sale if the homeowner becomes physically or mentally incapable of self-care and resides in a state-licensed care facility.
Without this statutory carve-out, a senior who lived in their home for 30 years, moved into a memory care or skilled nursing facility in early 2022, and waited until late 2026 (more than 3 years after moving out) to sell the vacant house would fail the standard 2-out-of-5-year residence test—losing the entire $250,000 (or $500,000) exclusion right when the money is needed most to pay $10,000+ monthly care bills!
Congress enacted IRC Section 121(d)(7) (“Determination of use during periods of out-of-residence care”) so incapacitated seniors are treated as continuing to live in their home while residing in a licensed facility. To qualify for the nursing-home exception on a 2026 home sale, you must satisfy four strict statutory criteria:
- 1. Physical or Mental Incapacity for Self-Care (IRC Section 121(d)(7)(A)): The taxpayer (or spouse) must become physically or mentally incapable of caring for themselves—such as requiring assistance with Activities of Daily Living (bathing, dressing, mobility, feeding, toileting, or medication management) or requiring supervision due to Alzheimer’s disease, dementia, stroke, or Parkinson’s disease.
- 2. At Least 1 Year (12 Months / 365 Days) of Actual Residence in the Home (IRC Section 121(d)(7)(B)): The taxpayer must have owned and actually lived in the property as their principal residence for periods aggregating at least 1 year (12 months) during the 5-year window ending on the date of sale. (For example, if you lived in the home for 13 months between October 2021 and November 2022, and spent the next 47 months in a nursing home before selling in October 2026, you pass!).
- 3. Residence in a State-Licensed Care Facility: During the remainder of the required 24-month use period inside the 5-year lookback window, the taxpayer must reside in a facility—including a skilled nursing home, memory care unit, or assisted living facility—that is licensed by a state or political subdivision to care for individuals in the taxpayer’s condition.
- Critical Audit Trap: Moving in with an adult son or daughter, hiring unlicensed private caregivers in a relative’s house, or moving into an unlicensed independent senior apartment complex does not qualify under IRC Section 121(d)(7) because it is not a licensed care facility!
- 4. Continuous Ownership During the Facility Stay: You must continue to own the home during the time you are counting the licensed facility stay toward your 24-month use requirement.
Audit-Proofing the Nursing-Home Exception: You do not attach medical records when e-filing Form 1040, but you must keep two documents in your permanent tax file in case of an IRS examination: (1) a signed letter from an attending physician certifying that the homeowner became physically or mentally incapable of self-care, and (2) a copy of the care facility’s state license number and admission/residency dates.

Surviving Spouse Benefits: The 2-Year $500,000 Window and Step-Up in Basis
When a spouse passes away, surviving spouse benefits under the federal tax code provide a double shield: the widow or widower keeps the full $500,000 married exclusion if the home sells within 2 years of the date of death (IRC §121(b)(4)) AND receives a date-of-death step-up in cost basis (IRC §1014).
Financial planners often tell grieving widows and widowers not to make any major decisions for a year, and that is sound emotional advice—provided you mark two non-negotiable IRS tax clocks on your calendar immediately:
Benefit 1: The 2-Year Window to Keep the $500,000 Exclusion (IRC Section 121(b)(4))
Normally, a widow or widower only gets to file Married Filing Jointly in the calendar year their spouse died; starting the following year, they file as Single (or Qualifying Surviving Spouse if caring for a dependent child). Without a special rule, selling the family home in the year after the spouse’s death would slash their Section 121 exclusion in half from $500,000 down to $250,000.
Under IRC Section 121(b)(4) and IRS Publication 523, an unmarried surviving spouse can still claim the full $500,000 exclusion—even when filing as Single—if all four conditions are met:
- Sold Within Exactly 2 Years (730 Days) of the Date of Death: The closing date of the sale must occur no later than 2 years from the exact date of your spouse’s death (not two tax years!). If your spouse passed away on May 10, 2025, you must close on the sale on or before May 10, 2027, to get the $500,000 exclusion. Closing on May 12, 2027, drops your exclusion to $250,000—potentially costing you $47,000+ in avoidable capital gains tax!
- Unmarried on the Date of Sale: You must not have remarried before the date the home is sold.
- Tacking Deceased Spouse’s Ownership and Residence Time (IRC Section 121(d)(2)): Either you or your late spouse met the 2-year ownership test, and both you and your late spouse met the 2-year residence test immediately before the date of death. Furthermore, under IRC Section 121(d)(2), an unmarried surviving spouse gets to count any period their deceased spouse owned and used the property before death as their own ownership and use!
- 2-Year Look-Back Satisfied: Neither you nor your late spouse used the Section 121 exclusion on another home sale within the 2 years preceding the current sale.
Benefit 2: The IRC Section 1014 Step-Up in Cost Basis (50% vs. 100% Community Property)
Even if a surviving spouse waits longer than 2 years to sell (dropping their Section 121 exclusion to $250,000), a second powerful provision—the **step-up in cost basis under IRC Section 1014**—resets the home’s tax basis as of the date of the first spouse’s death! How much of the basis steps up to Fair Market Value (FMV) depends on where you live and how the deed is titled:
- In the 41 Common-Law (Separate Property) States — 50% Half Step-Up (IRC Section 1014(a)): When a married couple owns their home jointly (as tenants by the entirety or joint tenants with right of survivorship) in a common-law state (such as Florida, New York, New Jersey, Ohio, Pennsylvania, Virginia, or Massachusetts), each spouse is deemed to own 50%. Upon the first spouse’s death, the deceased spouse’s 50% half is stepped up to 50% of the home’s Fair Market Value on the date of death, while the surviving spouse’s 50% half keeps its original basis (50% of original purchase price + 50% of prior capital improvements).
- Quick Math: Bought in 1995 for $200,000 ($100,000 basis each). When Spouse A dies in 2025, the home’s appraised FMV is $1,000,000. Spouse A’s half steps up to $500,000 ($1M × 50%), while Spouse B’s half stays at $100,000. The surviving spouse’s new combined basis is $600,000—wiping out $400,000 of built-up capital gain overnight, even before applying the $500,000 (or $250,000) Section 121 exclusion!
- In the 9 Community Property States — 100% Double Step-Up (IRC Section 1014(b)(6)): If the home is held as community property (or in a joint revocable living trust preserving community property status) in one of the nine community property states—Arizona, California, Idaho, Louisiana, Nevada, New Mexico, Texas, Washington, or Wisconsin (plus elective community property trusts in Alaska, South Dakota, Tennessee, Kentucky, or Florida where valid)—IRC Section 1014(b)(6) steps up **100% of the entire property’s basis** to its full Fair Market Value on the date of the first spouse’s death!
- Quick Math: In that same example ($200,000 original cost; $1,000,000 FMV at Spouse A’s death in California or Texas), the surviving spouse’s new basis steps up to the full $1,000,000! If the surviving spouse sells the house in 2026 for $1,050,000, the total gain is only $50,000 (easily covered by even the $250,000 single exclusion!).
Crucial Step for Every Surviving Spouse: Even if you have no plans to sell the house in the first year or two after your spouse passes away, hire a licensed residential real estate appraiser (or obtain a detailed comparative market analysis supported by comparable sales) to document the home’s exact Fair Market Value as of your spouse’s date of death.
When you (or your heirs) sell the house 5 or 10 years later, that date-of-death appraisal is your legal proof for the IRC Section 1014 step-up in basis!
| State & Timing Scenario (Original Cost: $200k | FMV at Spouse’s Death: $1.2M | Sold for $1.25M) | New Stepped-Up Cost Basis (IRC §1014) | Remaining Gain Before Sec. 121 ($1.25M − Basis) | Allowed Section 121 Exclusion | Final Taxable Capital Gain |
|---|---|---|---|---|
| Common-Law State (e.g., FL/NY) — Sold Within 2 Years of Death | $700,000 ($100k survivor + $600k decedent half) | $550,000 | $500,000 (2-Yr Widow Rule) | $50,000 (Minus selling costs = ~$0!) |
| Common-Law State (e.g., FL/NY) — Sold 3 Years After Death | $700,000 ($100k survivor + $600k decedent half) | $550,000 | $250,000 (Single Filer Cap) | $300,000 (Subject to LTCG tax) |
| Community Property State (e.g., CA/TX/WA) — Sold Within 2 Years | $1,200,000 (100% Double Step-Up) | $50,000 | $500,000 (2-Yr Widow Rule) | $0 (100% Tax-Free) |
| Community Property State (e.g., CA/TX/WA) — Sold 3 Years After Death | $1,200,000 (100% Double Step-Up) | $50,000 | $250,000 (Single Filer Cap) | $0 (100% Tax-Free) |

Partial Exclusion Rules When Health Forces an Early Move Under 2 Years
What if you downsize into a new retirement home and, only 10 or 15 months later, a sudden heart attack, stroke, mobility decline, or loss of a spouse forces you to sell before reaching the 24-month mark? Under IRC Section 121(c) and Treasury Regulation Section 1.121-3, you qualify for a prorated Partial Exclusion.
The IRS grants a Partial Exclusion whenever the primary reason for selling before completing the 2-year ownership/residence requirement (or selling within 2 years of a prior Section 121 sale) is a Health-Related Move, a **Work-Related Move**, or an **Unforeseen Circumstance**:
- Health-Related Safe Harbor (Treas. Reg. §1.121-3(d)): You automatically qualify if a physician recommends a change of residence to obtain, provide, or facilitate the diagnosis, cure, mitigation, or treatment of disease, illness, or injury for you, your spouse, a co-owner, or a family member living in the home.
- Unforeseen Circumstances Safe Harbors (Treas. Reg. §1.121-3(e)): Includes the death of the taxpayer, spouse, co-owner, or family member living in the house; divorce or legal separation; involuntary conversion/natural disaster; or loss of employment/change in employment status that leaves the taxpayer unable to pay basic housing and living expenses.
- How the Partial Exclusion Math Works: You divide the number of months (or days) you actually lived in the home (or the time since your prior excluded sale, if shorter) by 24 months (730 days), and multiply that fraction by $250,000 (Single) or $500,000 (Married Filing Jointly).
- Crucial Insight: The fraction multiplies your maximum exclusion cap ($250k / $500k)—NOT your gain! So if a married couple sells a retirement condo after living in it for 12 months due to a doctor’s recommendation to move into single-level living, their Partial Exclusion is 12 ÷ 24 × $500,000 = $250,000. If their profit on the condo after only one year of ownership is $60,000, that entire $60,000 gain is **100% tax-free** because it is under their $250,000 prorated ceiling!
4 Hidden 2026 Tax Traps When Selling a Home in Retirement (IRMAA, $6,000 Senior Bonus & Social Security)
When selling a home in retirement generates a taxable capital gain above the $250,000 or $500,000 Section 121 limit, that taxable gain is added to your 2026 Adjusted Gross Income on Line 11—triggering four hidden secondary tax penalties across your return and Medicare premiums.
Note an important distinction first: any gain that is excluded under IRC Section 121 ($250k Single / $500k Joint) never enters your Form 1040 AGI and has zero impact on your Social Security taxes, your $6,000 senior deduction, or your Medicare premiums. However, every dollar of taxable gain above the exclusion (or from selling a vacation home or rental property that gets $0 Section 121 exclusion) triggers this 2026 chain reaction:
- Trap 1: Wiping Out the $6,000 / $12,000 OBBBA Schedule 1-A Senior Bonus Deduction (IRC Section 151(d)(5)(C)). For tax years 2025 through 2028, seniors age 65+ (born on or before January 1, 1962) receive a special $6,000 per-person deduction ($12,000 if both spouses on a joint return are 65+) on Schedule 1-A (Form 1040, Line 13b), stacked on top of the 2026 senior standard deduction of $18,150 (Single) or $35,500 (Married both 65+). However, that $6,000 / $12,000 bonus phases out at 6% of MAGI between $75,000 and $175,000 (Single) and $150,000 and $250,000 (Married Filing Jointly). A $100,000 taxable home sale gain in 2026 can completely wipe out your $6,000 or $12,000 senior deduction! See our 2026 standard deduction for seniors over 65 guide for the complete phase-out chart.
- Trap 2: The Medicare Part B & Part D IRMAA Two-Year Lookback Bomb (2026 Sale Spikes 2028 Premiums). Medicare calculates your Income-Related Monthly Adjustment Amount (IRMAA) surcharges using your tax return from two years prior (meaning your 2026 Form 1040 Line 11 AGI + tax-exempt interest determines your 2028 monthly Medicare Part B and Part D premiums!). Once MAGI crosses the IRMAA cliff ($109,000 Single / $218,000 Married Filing Jointly in 2026, indexed for 2028), a single dollar over the tier boundary can add $1,000 to $5,100+ per person per year in extra Medicare premiums!
- The Form SSA-44 Trap: Many retirees assume they can file Form SSA-44 (Medicare Income-Related Monthly Adjustment Amount — Life-Changing Event) to ask Social Security to waive the IRMAA surcharge caused by a one-time home sale. You cannot! Social Security only recognizes 8 specific life-changing events (Marriage, Divorce, Death of a Spouse, Work Stoppage/Retirement, Work Reduction, Involuntary Loss of Income-Producing Property from a disaster/theft, Loss of Pension, or Employer Bankruptcy Settlement). A voluntary sale of your home or rental property is explicitly rejected as a standalone life-changing event unless accompanied by one of those 8 events (such as retiring or losing a spouse)!
- Trap 3: Pushing Up to 85% of Your Social Security Benefits Into Taxable Income (IRC Section 86). Taxable capital gains are included dollar-for-dollar in your Social Security “Provisional Income” (non-Social Security AGI + tax-exempt interest + 50% of Social Security benefits). Once Provisional Income exceeds $34,000 (Single) or $44,000 (Married Filing Jointly), up to 85% of you