What the section 121 exclusion covers, the ownership and use tests behind it, and what actually applies to the part of the gain it does not reach.
The capital gains tax primary residence exclusion lets you exclude up to $250,000 of gain on the sale of your main home from federal income, or up to $500,000 if you file jointly with a spouse. It's often called the section 121 exclusion. You qualify through how long you owned the home and how long you lived in it, and there's no cap on how often you can use it across a lifetime.
Most explanations of it end roughly there. That's fine if your gain is smaller than the exclusion. If it isn't, the part that's been left out is the only part you needed.
Two tests, both measured over the five years ending on the date of sale. The ownership test needs you to have owned the home for at least 24 months of those five years. The use test needs you to have lived in it as a residence for at least 24 months of those five years. They don't have to be the same 24 months. You're generally disqualified if you excluded gain on another home sale in the two years before this one.
Those are the IRS Topic 701 rules, and reading them in the IRS's own words is worth the two minutes.
The two clocks run independently, which is the detail that decides more cases than any other part of the rule.
Because ownership and use are tested separately over the same five year window, you can satisfy them in different periods. Somebody who rented a house, later bought it, and lived in it throughout can meet both. Somebody who bought a home, lived in it for two years, then moved out and rented it to tenants for nearly three more can still meet both, because the 24 months of use sit inside the five year window looking back from the sale.
For a couple filing jointly, the tests apply differently to each spouse. Either spouse meeting the ownership test is enough, while both have to meet the use test individually to reach the $500,000 figure. A remarriage, or a sale shortly after one, is the situation where that distinction most often costs somebody half the exclusion without anyone noticing in advance.
Publication 523 is where the exceptions live, and there are real ones, including partial exclusions for moves forced by work, health or unforeseen circumstances. If your situation is close to a line, that's the document to read rather than a summary of it.
It's worth up to $250,000 or $500,000 of gain, and it applies to gain rather than to the price on the contract.
That distinction is where people miscalculate. Gain is the sale price less selling costs less your adjusted basis, and basis includes what you paid plus qualifying improvements over the years. A home that sold for one point four million and was bought for four hundred thousand does not carry a million dollar gain if a hundred and fifty thousand of genuine capital improvements went into it along the way. Reconstructing that record before you sell is ordinary work that changes the number, and almost nobody does it early enough.
The other thing it is not is indexed. The $250,000 and $500,000 figures are fixed amounts, which is why sellers in long held homes in appreciated markets increasingly find the exclusion covers a smaller share of their gain than it covered their neighbors a decade ago. That's also why bills to raise it keep appearing in Congress, none of which is law.
The excess is taxable capital gain, reported in the year of the sale, and it's taxed at long term rates if you held the home more than a year.
Two things make it larger than sellers expect. Depreciation claimed during any period the home was rented is generally recaptured and isn't sheltered by the exclusion, so a house that spent years as a rental carries an amount the section 121 rule never reaches. And the taxable gain itself counts toward the income that decides your capital gains bracket, so a big excess can move you into a higher rate band in the year you sell.
The depreciation point deserves its own moment because it surprises people who did nothing unusual. Anyone who rented out a home, took a home office deduction over several years, or moved out and let the property before selling has claimed depreciation whether or not they thought of it that way. That amount is handled separately from the exclusion, so a seller can be well inside the $250,000 or $500,000 figure on the appreciation and still owe on the depreciation portion.
Records decide how large the taxable piece turns out to be. Receipts for a roof, a kitchen, an addition or a new heating system raise your basis and therefore shrink the gain, and they're worth far more found now than remembered later. Bank records, permits and contractor invoices are all acceptable evidence, and the time to assemble them is before a listing rather than during a return.
One sentence on a question that comes up here and belongs elsewhere. A 1031 exchange applies to property held for investment rather than to a main home, so it isn't a route for a straightforward primary residence sale, and the interaction between the two is its own topic rather than a paragraph in this one.
Once you know the excess, the question becomes what structure it goes into, and the honest answer is that it depends on what the property has been and what you want afterwards.
Our client's homeowner tax deferral options page publishes the two it uses most often. A rental conversion changes what the property is before it's sold, which takes time and has to be genuine rather than nominal. A downsizing approach works the sale and the purchase together rather than treating them as separate events.
Beyond those, the routes get more specific to the asset and the seller. A deferred sales trust and a qualified opportunity zone are both written up in full elsewhere on this site, each with its own qualifying conditions and its own trade-offs.
Where the sale is part of a larger picture rather than a standalone event, trust and estate structuring is the conversation that should come first, because it changes which of the other routes are even worth pricing.
What every one of them shares is a deadline you can miss. Each has to be arranged before the sale rather than after it, which means the useful moment to look at this is when you start thinking about selling, not when you're under contract. If your gain is going to clear the exclusion, talk it through with Carl Worden or book a complimentary consultation while the options are all still open.
A note on what this is. We're tax strategists rather than preparers, and nothing above is individual tax advice. Every rule cited links to the IRS page it comes from, figures and thresholds change, and your own numbers depend on records only you have.
How do I avoid capital gains tax when I sell my primary residence?
For most sellers the exclusion does it on its own. Meet the ownership and use tests and up to $250,000 of gain, or $500,000 jointly, is excluded outright. Above that the word changes from avoid to defer or reduce, and the routes involve structuring the sale rather than claiming an exemption. Getting your basis right, including every qualifying improvement, is the free step almost everyone skips.
What are the requirements to qualify for the main residence exemption for capital gains tax?
Ownership for at least 24 months out of the five years ending on the sale date, use as your residence for at least 24 months of that same five year window, and no other home sale exclusion claimed in the previous two years. The ownership and use periods don't have to overlap. Filing jointly, either spouse can satisfy ownership but both must satisfy use to reach the higher figure.
At what age can a homeowner sell a residence without paying capital gains?
There's no such age. The exclusion has no age condition, and the older one time rule people remember was replaced by the current section 121 exclusion long ago. A seller of 70 and a seller of 35 who each owned and occupied a home for the same period get the same treatment.
What are the two rules of exclusion on capital gains for homeowners?
They're the ownership test and the use test. Own the home for at least two of the five years before the sale, and live in it as your residence for at least two of those same five years. A third condition is easy to miss and catches people who move often, which is that you generally can't use the exclusion if you already used it on another home sale within the previous two years.