Glossary
The home sale capital gains exclusion erases $250,000 of gain on a primary residence for a single filer and $500,000 joint, if you owned and lived there two of the last five years. Most home sales owe nothing; the two-year rule is the gate.
The home sale exclusion, IRC Section 121, removes up to $250,000 of gain from the sale of a primary residence for a single filer and $500,000 for married filing jointly, per the IRS. The gain is sale price minus basis, where basis is purchase price plus qualifying improvements minus depreciation taken. The exclusion is not a deduction; it erases the gain entirely, and it can be used once every two years.
The gate is the ownership-and-use test: you must have owned and lived in the home as a primary residence for two of the five years before the sale. The two years need not be consecutive. For the $500,000 joint exclusion, one spouse must meet the ownership test and both must meet the use test. Depreciation claimed on a rented portion is recaptured at up to 25% and never excluded, and the exclusion does not apply to a second home or a pure rental.
The arithmetic is sale price minus basis. Basis starts at the purchase price, adds capital improvements, a new roof, a remodel, an addition, and subtracts depreciation claimed on any rented portion. A couple buys at $300,000, adds $80,000 of improvements, and sells at $520,000: the gain is $140,000, and the $500,000 joint exclusion erases all of it. The sale reports on Form 1099-S, and the return shows no tax when the exclusion covers the gain.
The ownership-and-use test runs on the five years before the closing date: two of owned and occupied as a primary residence, not necessarily consecutive. A homeowner who rents the house out for a year in the middle still qualifies; the test is a two-of-five tally, not a streak. The rental years carry the wrinkle: depreciation claimed is recaptured at a maximum 25% rate and never excluded, so a house rented for five years and sold still owes the recapture on every dollar of depreciation taken.
The exclusion repeats every two years, which is the feature most homeowners never use. Sell at a $200,000 gain, buy again, live two years, sell at another $200,000 gain: both are erased. The proration applies when the test is partially met for a job move or health reasons, per the IRS formula in Publication 523. Married filing separately halves the exclusion to $125,000 each.
The exclusion is the largest tax break most American households ever touch, and most sellers never think about it because the closing clears the gain automatically. The mortgage, the improvements, and the timing all feed the basis, and the basis is the number the exclusion works against. The two-year rule is the gate, and the rental recapture is the fine print.
I watched a colleague named Brent (yes, that Brent) rent his house for four years, sell at a $180,000 gain, and assume the exclusion covered everything. The four years of depreciation he had claimed, roughly $29,000, was recaptured at 25%, and the rest of the gain was erased by the two-of-five test. The surprise was the $7,250 recapture bill, not the gain.
The highest-leverage thing most Americans can do is track every capital improvement in a folder from the day of purchase, because basis is the number the exclusion multiplies. Run the arithmetic with the rent vs. buy calculator, check the mortgage side in the mortgage amortization entry, and price the gain with the US CGT calculator.
A couple buys at $300,000, adds $80,000 of improvements, and sells at $520,000 after living there six years. The gain is $140,000: sale price minus the $380,000 basis. The $500,000 joint exclusion erases all of it, and the return shows no tax. The improvements folder is what made the basis $380,000 instead of $300,000, an extra $17,600 of erased gain at a 22% bracket. The closing package and the county records are the evidence the basis stands on.
Brent rents his house for four years, claims $29,000 of depreciation, and sells at a $180,000 gain. The two-of-five test is met: two of the five years before closing were owned and occupied. But the $29,000 of depreciation is recaptured at 25% and never excluded: $7,250 owed. The rest of the gain is erased, and the recapture is the fine print that bites. The 25% rate is the maximum, and the depreciation ledger is the number it reads.
A homeowner buys, lives in the house two years, rents it for one, moves back for two, and sells: five years, four of them as a primary residence. The test is met, and the exclusion applies to the full gain. The same homeowner selling after three rented years and two owned ones also passes, because the test is a tally of two in five, not a streak. The exclusion repeats every two years, which is the feature most sellers never use.
Mistake: Assuming the exclusion covers a second home.
Why it bites you: The exclusion applies to a primary residence only; a lake house or a rental sale owes the full gain. The two-of-five test is the gate, not the address on the deed.
Mistake: Forgetting depreciation recapture.
Why it bites you: Depreciation claimed on a rented portion is recaptured at up to 25% and never excluded, even when the rest of the gain is. Brent's $29,000 of depreciation cost $7,250.
Mistake: Losing the improvements receipts.
Why it bites you: Basis is purchase price plus improvements, and the receipts are the evidence; a lost folder is a smaller basis and a bigger gain. The receipts matter up to the exclusion line.
Mistake: Selling twice inside two years.
Why it bites you: The exclusion repeats only every two years; a second sale inside the window owes the full gain unless a job move or health reason prorates it. Publication 523 is the proration formula.
I spent an afternoon inside Publication 523 and two closing packages so you do not have to, and the exclusion is the most generous line in the code and the most automatic: most sellers never compute anything, because the two-of-five test is met and the gain clears. Brent rented for four years and met the depreciation recapture, the one part of the sale that never excludes. Track the improvements folder from the day of purchase, mind the two-year gate, and let the exclusion do its work. It is the tax code being quiet, which is rare enough to note. The quietest line in the code is the one that works.
$250,000 of gain for a single filer and $500,000 for married filing jointly, on a primary residence. The gain is sale price minus basis, and the exclusion erases it entirely.
Two of the five years before the sale, owning and occupying it as a primary residence. The two years need not be consecutive.
The rental years add depreciation recapture at up to 25%, which is never excluded. The two-of-five test may still erase the rest of the gain.
Once every two years, which is the feature most homeowners never use. Sell at a gain, buy again, live two years, and the next gain is covered too.
No, they increase your basis, which shrinks the gain the exclusion works against. An $80,000 remodel on a $300,000 purchase makes the basis $380,000 and the gain that much smaller.
Disclaimer: This information is general in nature and does not constitute financial or legal advice. Always consult a qualified professional for your specific situation.

Financial Chaos Analyst
Ivy Sinclair-Wren is a Financial Chaos Analyst covering investing, AI, wealth psychology, and the emotional consequences of opening finance apps during market crashes. Based in Melbourne, she specializes in demystifying the US tax code and helping users navigate the intersection of spreadsheet logic and human irrationality.