When you sell a home for more than you paid, the profit is a capital gain, which can be taxable. But a long-standing federal rule — the primary-residence exclusion under IRC §121 — lets many homeowners exclude a large chunk of that gain from taxation. A qualifying single filer can exclude up to $250,000 of gain, and a married couple filing jointly can exclude up to $500,000. For most primary-residence sellers, this means little or no capital gains tax. This is educational information, not tax advice — confirm your specifics with a tax professional or IRS Publication 523.
Two calculations matter: your gain, and whether you qualify.
Gain = amount realized − adjusted basis.
The 2-of-5-year test. To claim the exclusion, you generally must have owned and lived in the home as your primary residence for at least 2 of the 5 years before the sale. The two years don't have to be continuous. This is the core qualification hurdle.
Only gain above your exclusion amount is potentially taxable. So a married couple with a $400,000 gain who meet the test would typically owe no federal capital gains tax on it, because $400,000 is under the $500,000 ceiling.
A few important points:
The §121 exclusion means most homeowners selling a primary residence they've owned and lived in for at least 2 of the past 5 years pay little or no federal capital gains tax on the first $250,000 (single) or $500,000 (married filing jointly) of gain. Because your gain depends on your basis and your situation, and because rules change, confirm the specifics with a tax professional or read IRS Publication 523 before relying on any number.