FinTalks · Investing & Tax

The $500,000 Exclusion Has Fine Print

The internet has one fact about selling your home: the profit is tax-free up to $250,000, or $500,000 if you file jointly. That fact is true. It is also the least useful sentence in the tax code on its own, because everything that decides whether it applies to you sits in the tests built around it — and most sellers never check those tests until the gain is already locked in.

Ask most sellers what happens to the money when a home sells and they will describe the exclusion correctly: up to $250,000 of gain is tax-free for a single filer, up to $500,000 for a married couple filing jointly. What they usually cannot describe is why the IRS calls it an exclusion rather than an exemption, or what has to be true about their own ownership before that number applies to them at all.

The rule, stated the way the IRS actually states it

Section 121 of the tax code lets you exclude gain from the sale of your main home if you pass two separate tests during the five years ending on the date of sale. The ownership test: you owned the home for at least 24 months (they do not have to be consecutive) within that five-year window. The use test: you lived in it as your main home for at least 24 months within the same window — also not required to be consecutive, and not required to be the same 24 months as the ownership period. Meet both and a single filer excludes up to $250,000 of gain; a couple filing jointly excludes up to $500,000. There is one more condition that catches people who sell often: you cannot have excluded gain on another home sale within the two years before this one.

Married filing jointly is not automatic

The $500,000 number gets treated as a couple's number. It is not quite. To claim the full $500,000, both spouses must independently meet the use test — each must have lived in the home for 24 of the last 60 months. Only one spouse needs to meet the ownership test. So a couple where one spouse bought the home eight years ago and the other moved in fourteen months ago, then got married and sold, does not get $500,000. One spouse fails the use test, and the couple is capped at $250,000 — even filing a joint return.

There is a specific carve-out for divorce that runs the other direction. If a divorce or separation instrument grants your former spouse the right to live in the home, you are treated as using the home during the period your former spouse actually lives there, even though you moved out. It is a narrow provision, and it is the reason a spouse who left the house years before the sale can still qualify.

“Gain” is not the sale price minus what you paid

The exclusion applies to gain, and gain is not intuitive arithmetic. Your adjusted basis is what you paid for the home, plus qualifying capital improvements over the years you owned it (a new roof, an addition, a kitchen remodel — not routine repairs or maintenance), minus any depreciation you have claimed against the property. Your gain is the price you sold for, minus selling costs, minus that adjusted basis.

ItemAmount
Purchase price (2016)$300,000
+ Qualifying capital improvements$40,000
= Adjusted basis$340,000
Sale price (2026)$950,000
− Selling costs (commission, transfer tax, title)$50,000
= Net sale proceeds$900,000
Gain (net proceeds − adjusted basis)$560,000

That $560,000 gain is the number the exclusion actually gets applied to — and it is where filing status stops being a formality and starts being real money.

Bar chart showing a $560,000 home sale gain split into excluded and taxed portions for a single filer versus a married couple filing jointly
Same $560,000 gain, same house, same closing table. A single filer excludes $250,000 and pays capital gains tax on $310,000. A married couple filing jointly excludes $500,000 and pays tax on $60,000 — if both spouses clear the use test.

The depreciation you forgot you took

If you ever claimed a home-office deduction, or rented the property out before moving back in, you likely claimed depreciation against it. The exclusion does not cover that portion of the gain. Any depreciation allowed or allowable after May 6, 1997 has to be recaptured — it becomes unrecaptured Section 1250 gain, taxed at a maximum federal rate of 25%, instead of the 0%, 15%, or 20% long-term capital gains rates that apply to the rest. A homeowner who deducted a home office for six years, then sold, cannot exclude the depreciation deductions they took — only the remaining gain qualifies.

A related trap sits in what the IRS calls non-qualified use: periods after 2008 when the home was a rental or second home rather than your main residence, occurring before the final stretch you lived in it, can prorate your exclusion downward even if you otherwise pass both tests. It rewards people who convert a rental into a primary residence and then sell quickly, and penalizes people who do the reverse.

When you don't clear the two years — partial exclusion

If you sell before meeting the ownership or use test, you are not automatically stuck paying full tax on the gain. A partial exclusion is available if the primary reason for the sale was a change in place of employment (your new job is at least 50 miles farther from the home than your old one was), health (moving to obtain or provide medical care), or an unforeseen circumstance — death, divorce or legal separation, multiple births from the same pregnancy, a casualty or natural disaster affecting the home, or an inability to pay basic living expenses.

The partial exclusion is prorated: take the shorter of the time you owned the home, used it, or the time since your last exclusion, in days, divide by 730, and multiply by the full exclusion amount. A single filer who lived in a home for 14 months before an employer-mandated transfer 220 miles away can exclude roughly 14/24 of $250,000 — about $145,833. Gain above that is taxable.

Why the fine print doesn't surface until closing

None of this is hidden. It is all in Publication 523. It stays invisible in practice because the headline number is so clean that it discourages the follow-up questions: nobody tracks a decade of capital-improvement receipts expecting to need them, a two-year rental stretch a while back gets forgotten by the time the home sells, and a new spouse's move-in date feels irrelevant until it determines whether the exclusion is $250,000 or $500,000. The rule rewards sellers who reconstruct their own basis and occupancy history before they sign a listing agreement, not after the wire hits their account.

The two-year reset that resets nothing. Passing the ownership-and-use test does not create a standing exemption. Every sale is evaluated on its own, and using the exclusion on one home locks you out of using it again on a different home for two years — a real constraint for anyone selling an investment property and a residence in close succession.

Run your own numbers before you list

Put your own purchase price, improvements, and sale numbers in and see exactly how much of your gain is excluded versus taxed.

Home Sale Capital Gains Seller Net Proceeds Capital Gains Tax Rent vs. Buy Browse all 50 calculators

Common questions

Do I have to buy another home to avoid paying tax on the gain?

No. The old rule that let you defer tax by rolling proceeds into a new home (Section 1034) was repealed in 1997 and replaced by this exclusion. What you do with the proceeds afterward has no bearing on whether the exclusion applies.

What happens if I don't meet the 2-out-of-5-year test and don't qualify for a partial exclusion either?

The full gain is taxable as a capital gain — long-term if you owned the home more than a year, short-term if less — with no exclusion applied at all.

Does the exclusion cover a second home or a rental property I never lived in?

No. It only applies to a home that passes the ownership-and-use test as your main residence. A vacation home or a rental you never occupied as your primary residence does not qualify, no matter how long you owned it.

Not financial advice. This article is general educational information and nothing in it is financial, investment, tax, legal, accounting or insurance advice, a recommendation of any product, lender, plan, adviser or provider, or an offer of any kind. It does not take your circumstances into account, and reading it creates no advisory or fiduciary relationship. Every figure here comes from stated assumptions and published rules that change; results in your own case will differ. Confirm anything you intend to act on with an appropriately qualified professional — a CPA or enrolled agent for tax matters, an attorney for legal matters, a licensed adviser for investments, and your lender, servicer or plan administrator for anything governed by your own contract.

See the full Financial Disclaimer and Terms of Use.

SmartFinClub Editorial · Published 17 September 2026 · SmartFinClub, Glen Allen, Virginia. Comments or questions are welcome — send them to Info@smartfinclub.com and we will read every one. If you spot an error or would particularly like to hear about it, corrections get made and credited.

← All FinTalks articles