Skip to main content
fidser.
fidser.
Back

Educational content only — not financial advice. Consult a qualified professional before making decisions.

Insight · Home Sale Capital Gains Exclusion

Home Sale Capital Gains Exclusion: How It Works

If you bought your home decades ago, the equity you've built may be your largest financial asset. But when it comes time to sell, a surprising number of long-tenured homeowners discover they have more taxable gain than they expected. Understanding the home sale capital gains exclusion, and its limits, is one of the most valuable pieces of tax knowledge you can have before you list.
October 8, 202612 min read
Home Sale Capital Gains Exclusion: How It Works
Home Sale Capital Gains ExclusionSection 121 Exclusion+4

You've Lived in Your Home for 25 Years. The Tax Bill Could Still Surprise You.

For many Americans, the family home is both a deeply personal place and a significant financial asset. If you purchased your home in the 1990s or early 2000s, you may be sitting on hundreds of thousands of dollars in unrealized gains. The good news is that federal tax law provides a meaningful exclusion designed specifically for this situation. The less comfortable news is that the exclusion has limits, the rules have nuance, and the gains above the threshold do not disappear.

This guide walks through how the Section 121 exclusion actually works, what you need to qualify, how to think about gains that exceed the threshold, and several commonly overlooked details that can make a meaningful difference to your tax outcome.

Step 1: Understand What the Exclusion Covers

Under Internal Revenue Code Section 121, qualifying homeowners can exclude a portion of the capital gain from the sale of a primary residence from federal income tax. The exclusion amounts, as set by the IRS, are:

  • $250,000 for single filers
  • $500,000 for married couples filing jointly

To be clear, these figures refer to the gain on the sale, not the sale price itself. Your gain is calculated as the difference between your adjusted sale price (after selling costs) and your adjusted cost basis in the property. We will come back to why that distinction matters considerably.

It is also worth noting that this exclusion applies to federal income tax only. Some states have their own rules regarding the taxation of home sale gains, so the state-level picture may look different depending on where you live.

Illustration for Selling the Family Home: How the Capital Gains Exclusion Actually Works

Step 2: Confirm You Meet the Ownership and Use Tests

Qualifying for the exclusion is not automatic. The IRS requires that you satisfy two distinct tests during the five-year period ending on the date of the sale. Both tests must be met.

The Ownership Test
You must have owned the home for at least 24 months (two years) out of the five years before the sale. The two years do not need to be consecutive. Periods of ownership can be added together as long as they fall within the five-year window.

The Use Test
You must have used the home as your primary residence for at least 24 months out of the same five-year window. Again, this does not need to be a continuous stretch. Short absences, such as a temporary job relocation or a stay in a care facility for less than two years, may not break the use test, though the IRS rules in this area have specific conditions.

For a married couple filing jointly, both the ownership and use tests apply somewhat differently. Only one spouse needs to satisfy the ownership test, but both spouses must independently satisfy the use test to access the full $500,000 exclusion. If only one spouse meets the use test, the couple's combined exclusion is limited to $250,000.

One important practical note: the exclusion can generally only be used once every two years. If you sold another home and claimed the exclusion within the prior two years, you may not be eligible to claim it again on a new sale.

Step 3: Calculate Your Adjusted Cost Basis (This Is Where Most People Leave Money on the Table)

Your taxable gain is not simply the difference between what you paid and what you sell for. It is the difference between your adjusted sale proceeds and your adjusted cost basis. That distinction is significant, and many long-tenured homeowners unknowingly overpay tax by failing to account for it correctly.

Your adjusted cost basis starts with what you originally paid for the home. From there, it can be increased by:

  • Capital improvements you made over the years, such as a kitchen remodel, a room addition, a new roof, or a finished basement. The IRS distinguishes these from ordinary repairs and maintenance, which do not add to basis.
  • Certain settlement costs from your original purchase, such as title fees, legal fees, and recording fees.
  • Assessments paid for local improvements like sidewalks or sewer connections.

To illustrate with a hypothetical example: consider a couple who purchased their home in 1998 for $200,000. Over the years, they spent $80,000 on a kitchen renovation, a bathroom addition, and a new HVAC system. Their adjusted cost basis is therefore $280,000, not $200,000. If they sell for $900,000, their gain is $620,000, not $700,000. With the $500,000 married filing jointly exclusion, their taxable gain drops to $120,000 rather than $200,000. That difference in record-keeping translates directly into lower taxes.

The challenge is documentation. Receipts, contractor invoices, and permits from projects completed decades ago are not always easy to locate. A common starting point is to gather whatever records are available and work with a tax professional to reconstruct the basis as accurately as possible before the sale, not after.

Step 4: Know What Happens to Gains Above the Exclusion

If your gain exceeds the applicable exclusion threshold, the portion above the limit is subject to federal capital gains tax. For most homeowners who have lived in their property for more than a year, this qualifies as a long-term capital gain, which is generally taxed at more favorable rates than ordinary income.

As of 2024, the federal long-term capital gains tax rates are:

  • 0% for taxpayers with taxable income up to $47,025 (single) or $94,050 (married filing jointly)
  • 15% for most taxpayers in the middle income range
  • 20% for those with taxable income above $518,900 (single) or $583,750 (married filing jointly)

There is one additional layer to be aware of. Higher-income taxpayers may also owe the Net Investment Income Tax (NIIT), which is an additional 3.8% on net investment income for individuals with modified adjusted gross income above $200,000 (single) or $250,000 (married filing jointly). A large home sale gain can push some sellers into NIIT territory even if they would not ordinarily be subject to it. The IRS provides details on the NIIT at irs.gov.

For homeowners with gains well above the exclusion threshold, the year of the sale is worth careful planning. A large taxable gain in a single year can interact with other elements of your modified adjusted gross income, potentially affecting Medicare premiums, ACA subsidy eligibility, and other income-tested benefits. Discussing the timing and structure of a sale with a tax professional ahead of listing is a consideration many advisers highlight for long-tenured owners.

Step 5: Understand the Partial Exclusion for Certain Qualifying Moves

What if you need to sell before meeting the two-year ownership or use requirements? In certain circumstances, the IRS allows a partial exclusion rather than requiring you to forfeit the benefit entirely.

A partial exclusion may be available if the primary reason for the sale falls into one of three qualifying categories:

  • A change in place of employment that requires a move of at least 50 miles
  • Health reasons, including a move to obtain, provide, or facilitate medical care for yourself or a family member
  • Unforeseen circumstances, a category the IRS defines more narrowly, but which can include events such as divorce, natural disasters, or the death of a co-owner

When a partial exclusion applies, the amount you can exclude is proportional to how much of the two-year requirement you actually met. For example, if a single filer sells after living in the home for 12 months instead of 24, and qualifies under the employment change rule, they may be eligible to exclude up to $125,000 (half of the $250,000 maximum, reflecting 12 of the required 24 months). These rules have specific conditions and the IRS guidance in Publication 523 covers them in detail.

A Special Consideration for Surviving Spouses

For married homeowners, the interaction between the Section 121 exclusion and the death of a spouse deserves specific attention. Under current tax law, a surviving spouse may be eligible for the full $500,000 exclusion on a home sale, rather than the $250,000 single-filer amount, provided that:

  • The sale occurs within two years of the date of the spouse's death
  • Neither spouse used the exclusion in the two years prior to the sale
  • The surviving spouse has not remarried as of the sale date

This two-year window is meaningful. A surviving spouse who waits longer than two years to sell will generally be limited to the $250,000 single-filer exclusion, which could result in a substantially higher tax bill on the same transaction. This is one reason why estate and financial planning conversations often include a discussion of the home, not just investment accounts.

It is also worth noting that a surviving spouse often receives a stepped-up cost basis on the deceased spouse's share of the property at the time of death, which can reduce the gain significantly. The rules around stepped-up basis depend on how the property was titled and which state you live in, making this an area where working with both a tax adviser and an estate attorney is particularly valuable. For broader estate and beneficiary planning considerations, our post on beneficiary designations is a useful companion read.

Common Misconceptions Worth Addressing

A few widespread misunderstandings tend to surface when long-tenured homeowners begin researching this topic.

Misconception 1: The exclusion applies to the sale price, not the gain.
The $250,000 and $500,000 figures refer to the gain, not the total proceeds. A homeowner selling for $900,000 is not exempt from tax simply because the exclusion sounds large. What matters is the difference between the adjusted sale proceeds and the adjusted cost basis.

Misconception 2: Ordinary repairs count toward basis.
Only capital improvements, those that add value, extend the home's useful life, or adapt it to a new use, can be added to your cost basis. Painting, fixing a broken appliance, or replacing a worn carpet are generally considered maintenance and do not increase your basis. The IRS addresses this distinction in Publication 523.

Misconception 3: The exclusion is automatic.
You must actively claim the exclusion on your tax return (or choose not to, if it is more advantageous to do so in some unusual circumstance). You report the sale on IRS Form 8949 and Schedule D. If your gain is fully excluded and you receive a Form 1099-S, you still need to report the transaction.

Misconception 4: Moving in temporarily before the sale qualifies you.
The use test requires genuine, primary-residence occupancy. A temporary move-in designed primarily to access the exclusion is unlikely to satisfy the IRS's standards and could attract scrutiny.

For homeowners also considering whether equity should factor into a broader retirement income plan, it may be useful to explore how reverse mortgages work as a separate, though quite different, option for accessing home equity.

Frequently Asked Questions

Can I use the Section 121 exclusion more than once?
Generally, yes, but not more frequently than once every two years. If you sold a previous home and claimed the exclusion, you typically cannot claim it again on a new sale until two years have passed from the date of the prior sale. There is no lifetime limit on the number of times you can use the exclusion, as long as the two-year cooling-off period and the ownership and use tests are satisfied each time.
What if I rented out part of my home while I lived in it?
If a portion of your home was used for business or rental purposes, the tax treatment becomes more complex. The exclusion generally applies only to the portion of the gain attributable to your personal-use space. Additionally, any depreciation you claimed on the rental portion may be subject to depreciation recapture tax, which is taxed at a maximum rate of 25% rather than the standard long-term capital gains rates. IRS Publication 523 and a qualified tax professional can help you work through the specific allocation.
Does the exclusion apply to a vacation home or second property?
No. The Section 121 exclusion applies only to a property that qualifies as your primary residence. A vacation home, investment property, or second home does not qualify, even if you spend considerable time there. The key is that the property must have been your principal place of residence for at least two of the five years before the sale. If you have converted a vacation home to a primary residence and later sell it, the gain attributable to periods when it was not your primary residence may not be fully excludable.

Selling the family home is rarely just a financial transaction. For most long-tenured homeowners, it comes layered with personal significance and meaningful financial consequences. The Section 121 exclusion is one of the more generous provisions in the tax code, but it rewards preparation. Knowing your adjusted cost basis, keeping documentation of improvements, and understanding how your filing status and timing interact with the rules can all affect the outcome in ways that are worth planning for well in advance of a sale.

This article is intended as general educational information only and does not constitute personalised tax or financial advice. Tax rules are complex and individual circumstances vary. Readers are strongly encouraged to consult a qualified tax professional or financial adviser before making decisions related to the sale of a home or any other significant financial transaction.

See How a Home Sale Fits Into Your Retirement Picture

Use fidser's free retirement planning tools to explore how proceeds from a home sale could support your income in retirement.

Get Started Free
fidser.By fidser.
Published October 8, 2026

Related articles