Capital Gains and the Primary-Residence Exclusion

A plain-language overview of how home-sale profit is taxed, how the Section 121 exclusion generally works, and which records to keep — not tax advice.

6 min read · Updated June 2026

Somewhere between accepting an offer and depositing your proceeds, most sellers have the same quiet thought: wait — do I owe taxes on this?

For a large share of people selling the home they live in, the answer turns out to be no, thanks to a generous federal provision known as the primary-residence exclusion (Section 121 of the tax code). But “usually no” is not “always no,” and the details matter.

Read this first: this guide is general education about how the rules have commonly worked — it is not tax advice. Tax law changes, thresholds and rules can be revised, states have their own rules, and your personal facts (rentals, home offices, prior sales, partial years) can change the outcome entirely. Before you rely on anything here, confirm the current rules with the IRS’s official guidance or, better, a qualified tax professional who can look at your situation.

The basic concept: you’re taxed on gain, not on proceeds

A common misconception is that taxes apply to the sale price, or to the cash you walk away with. Neither is right. Capital-gains tax applies to your gain — roughly, what you sold for minus what the home cost you.

The skeleton of the calculation:

  1. Amount realized: the sale price minus selling expenses (commissions, many closing costs, and similar costs of sale).
  2. Adjusted basis: what you originally paid, plus certain buying costs, plus the cost of capital improvements over the years, minus items like depreciation you claimed (relevant if you ever rented the home or took home-office deductions).
  3. Gain: amount realized minus adjusted basis.

Note what’s not in the formula: your mortgage payoff. Paying off a $210,000 loan doesn’t reduce your gain — the loan was never part of the tax math.

What counts as a capital improvement?

Improvements add to basis; repairs generally don’t. A new roof, an addition, a remodeled kitchen, a new HVAC system, landscaping projects — these have generally counted as improvements. Fixing a leak or repainting a room has generally been treated as maintenance, not basis. The line can be blurry, which is one of many reasons receipts and a tax professional both earn their keep.

The Section 121 exclusion, in general terms

Here’s the provision that spares most primary-residence sellers. Under the rules as they’ve long stood, a taxpayer who qualifies has been able to exclude up to $250,000 of gain from income — up to $500,000 for married couples filing jointly. Excluded gain simply isn’t taxed federally.

To qualify, the general tests have been:

  • Ownership test: you owned the home for at least 2 of the 5 years before the sale.
  • Use test: you lived in it as your main home for at least 2 of those 5 years. The two years don’t need to be continuous, and the ownership and use years don’t have to be the same years.
  • Frequency limit: you generally can’t have used the exclusion on another home sale within the prior 2 years.

For the full $500,000 on a joint return, the usual pattern has been: at least one spouse meets the ownership test, both meet the use test, and neither used the exclusion in the prior two years.

An illustrative example

Say a married couple bought a home years ago for $250,000, spent $40,000 on documented improvements, and now sells for $600,000 with $36,000 in selling costs. Amount realized: $564,000. Adjusted basis: $290,000. Gain: $274,000 — well under the $500,000 joint exclusion, so under the general rules, none of it would be federally taxed, and (when the full gain is excluded and no 1099-S issues apply) it often hasn’t even needed to be reported. Again: illustrative numbers, general rules, and your facts may differ.

Common complications

This is where “usually simple” becomes “talk to a professional”:

  • Gain above the exclusion. Gain beyond $250,000/$500,000 has generally been taxed as a capital gain — typically at long-term rates for homes held over a year, with an additional net investment income tax possibly applying at higher incomes. Long-time owners in appreciated markets hit this more often than they expect, which makes basis records valuable.
  • Rental use and depreciation. If you rented the home out, two issues arise: depreciation you claimed (or could have claimed) generally must be “recaptured” and taxed even if the rest of the gain is excluded, and periods of “nonqualified use” can reduce the exclusion.
  • Home offices that were depreciated raise similar recapture questions.
  • Partial exclusions. Sellers who fail the 2-year tests because of a work relocation, health reasons, or certain unforeseeable events have often qualified for a partial exclusion, prorated by time. If you’re selling early for one of these reasons, this is worth a professional’s attention — it can be worth a lot.
  • Divorce, death of a spouse, inherited homes. Special rules exist for each — including, historically, a stepped-up basis for inherited property and a window for surviving spouses to use the joint exclusion amount. These are exactly the situations where personalized advice matters most.
  • Second homes and investment property. The exclusion is for your main home. Vacation homes and pure rentals don’t qualify (though other strategies exist for investment property — a topic for a tax adviser, not this guide).
  • State taxes. States have their own rules. Many broadly follow the federal exclusion; some differ, and a few tax nothing at all. Where you live — and where the property is — both matter.
  • Losses. If you sell your personal residence for less than your basis, the loss generally hasn’t been deductible.

Paperwork: what to keep and what to expect

  • Keep your closing documents from both purchase and sale — the settlement statements are the backbone of the gain calculation. (Our documents checklist covers what to gather.)
  • Keep improvement receipts for as long as you own the home plus several years after selling. Decades of receipts can convert directly into reduced taxable gain.
  • Form 1099-S. The closing agent may report your sale to the IRS on this form. At closing you may be asked to certify facts about residence and gain; answer accurately. If a 1099-S is issued, the sale generally needs to be reported on your return even when the gain is fully excluded.
  • Estimated taxes. If you’ll owe tax on gain above the exclusion, you may need to make an estimated payment rather than waiting for April — a timing question for your tax preparer.

The bottom line

For most people selling a long-occupied primary residence with a gain under the exclusion thresholds, the federal tax outcome has historically been simple and pleasant. But thresholds, tests, and rates are set by law and can change; exceptions are numerous; and errors are expensive. Treat this guide as a map of the terrain, verify current rules with the IRS or a professional before filing, and when your situation includes rental periods, big gains, or life events — get real advice.

Taxes are also just one line in your overall outcome. To see the whole financial picture of your sale, start with estimating your net proceeds and the costs of selling.