When retirees sell a long-held primary residence, the most important tax provision is the Section 121 capital gains exclusion, which lets a single filer exclude up to $250,000 of gain from the sale of their primary residence, and married couples filing jointly exclude up to $500,000. For most Philadelphia-area retirees, this exclusion covers all or most of the gain, even on a home that has appreciated substantially over decades. But for long-tenure homeowners in strong markets, the gain can exceed the exclusion, which makes understanding the cost basis and the rules genuinely worth the effort. This is the tax question that matters most when selling in retirement.
This guide explains how it works.
The Section 121 exclusion
Under Internal Revenue Code Section 121, you can exclude capital gain from the sale of your primary residence if you meet the ownership and use tests:
- Ownership test: You owned the home for at least two of the five years before the sale.
- Use test: You used the home as your primary residence for at least two of the five years before the sale.
If you meet both tests, you can exclude:
- Up to $250,000 of gain if you are a single filer
- Up to $500,000 of gain if you are married filing jointly (both spouses meet the use test and at least one meets the ownership test)
For most retirees who have lived in their home for many years, both tests are easily met, and the exclusion applies.
Why the cost basis matters for long-tenure homeowners
The taxable gain is the sale price minus your cost basis, and your cost basis is more than just what you paid for the home. This matters enormously for retirees who have owned a home for decades, because a higher basis means a smaller gain.
Your cost basis includes:
- The original purchase price
- The cost of capital improvements made over the years: a new roof, an addition, a renovated kitchen, a finished basement, a new HVAC system, replacement windows, a deck, landscaping improvements, and similar capital expenditures
- Certain costs of purchase and sale
A retiree who bought a home in 1988 for $140,000 and, over 38 years, added a $40,000 kitchen renovation, a $25,000 addition, a $15,000 roof, and $20,000 in other capital improvements has a cost basis of roughly $240,000, not $140,000. That $100,000 of improvements directly reduces the taxable gain.
The practical lesson: retirees selling a long-held home should reconstruct the record of capital improvements as thoroughly as possible. Decades of improvements add up, and each dollar of documented improvement is a dollar less of taxable gain. This is a conversation to have with the tax preparer, with records gathered in advance.
When the gain exceeds the exclusion
For long-tenure homeowners in strong Philadelphia-area markets, the gain can exceed the exclusion. Consider a couple who bought in 1985 for $120,000 and sell in 2026 for $850,000, with $80,000 of documented improvements:
- Sale price: $850,000
- Cost basis: $120,000 + $80,000 = $200,000
- Total gain: $650,000
- Section 121 exclusion (married filing jointly): $500,000
- Taxable gain: $150,000
The $150,000 above the exclusion is subject to federal long-term capital gains tax (0%, 15%, or 20% depending on income) and to state income tax in Pennsylvania or New Jersey.
This is precisely the situation where reconstructing the full cost basis matters most. Every documented improvement reduces that taxable amount. And it is why retirees with significant appreciation should plan the sale with their tax preparer rather than discovering the liability afterward.
How Pennsylvania and New Jersey treat the gain
Federal treatment is the same in both states. The Section 121 exclusion is federal and applies identically in Pennsylvania and New Jersey.
Pennsylvania state treatment: Pennsylvania conforms to the federal exclusion for the sale of a primary residence. Gain that is excluded federally under Section 121 is generally also excluded for Pennsylvania personal income tax purposes. Gain above the exclusion is taxed at Pennsylvania’s flat income tax rate.
New Jersey state treatment: New Jersey also recognizes the federal primary-residence exclusion. Gain above the exclusion is subject to New Jersey’s graduated income tax rates. New Jersey sellers should also be aware of the “exit tax,” which is not actually a separate tax but a withholding requirement on home sales by people moving out of state, an estimated prepayment of the tax that is reconciled when the state return is filed. Retirees relocating out of New Jersey should plan for this withholding at closing.
Other retirement-specific considerations
The home does not get a step-up in basis while you are alive. The step-up in basis that benefits heirs (covered in the guide to capital gains on an inherited home) applies at death. A retiree selling their own home during their lifetime uses their actual cost basis, not a stepped-up one. This is sometimes a factor in the decision about whether to sell during retirement or hold the home as part of the estate.
Capital gains can affect other retirement taxes. A large taxable gain in a single year can increase adjusted gross income enough to affect Medicare premium surcharges (IRMAA) and the taxability of Social Security benefits for that year. This is a timing consideration worth discussing with a tax advisor, particularly for a sale generating gain above the exclusion.
One sale every two years. The Section 121 exclusion can generally be used once every two years, which matters for retirees who may sell more than one residence in a short span.
This guide is general information, not tax advice. A tax preparer or accountant should confirm the treatment for any specific sale.
Working with Karen
Karen Langsfeld is a REALTOR® and Pricing Strategy Advisor (P.S.A.) with Berkshire Hathaway HomeServices Fox & Roach, licensed in both Pennsylvania and New Jersey. She works with retiring homeowners across Montgomery County, Bucks County, the Main Line, and South Jersey, providing the sale price analysis and net-proceeds estimates that let the tax preparer model the gain accurately, and reminding sellers early to gather the improvement records that reduce the taxable amount.
For the broader retirement decision, the guides to should I sell my house when I retire and using your home equity in retirement cover the financial picture. For a breakdown of the other costs of selling, the guide to the cost of selling a home in Pennsylvania covers transfer tax, commission, and net proceeds.
Contact Karen at (215) 495-2914 or through the contact page.