Housing · taxes
Most people hear “you don’t pay tax when you sell your house.” The real rule is narrower and more valuable: IRC 121 lets you exclude a chunk of gain, not the sale price, if the house was your main home long enough.
Updated 2026-09-08 · 9 min read
Own it and use it as your principal residence for at least 24 months in the 5 years ending on the sale date. The 24 months do not have to be consecutive. Married couples filing jointly can claim $500,000 if either spouse meets the ownership test and both meet the use test. You generally cannot have claimed the exclusion on another home in the prior two years.
Gain is sale price minus selling costs minus basis (what you paid, plus capital improvements, minus depreciation). A $700,000 sale of a house you bought for $400,000 with $40,000 of documented kitchen/roof work is $260,000 of gain before the exclusion — not $700,000 of “income.”
Single, $250,000 exclusion, $260,000 gain: $10,000 is taxable, usually as long-term gain if you held more than a year. Married, $500,000 exclusion, same $260,000 gain: $0 federally. Add depreciation recapture from a rental period and that slice is taxed at up to 25% and is not sheltered by 121.
Job change of 50+ miles, health, or certain unforeseen events can unlock a partial exclusion: $250,000 × (months of use / 24). A 12-month stay for a qualifying move is a $125,000 single exclusion, not zero. Flipping a house you never lived in is just capital gains. Inherited property gets a step-up in basis — often more powerful than 121 — so heirs should not assume they need the exclusion.
Up to $250,000 of gain if single, $500,000 if married filing jointly, under IRC 121 — if you owned and used the home as your principal residence for at least 2 of the 5 years before the sale, and you did not use the exclusion on another home in the last 2 years.
Time as a rental can still count toward the 2-of-5 test if you also lived there long enough. Depreciation you took while renting is recaptured and is not covered by the $250k/$500k exclusion.
A partial exclusion may apply for a change in employment (typically 50+ miles), health, or other IRS-listed unforeseen circumstances. The exclusion is prorated by the fraction of 24 months you met the test.
Educational only. Confirm IRS Publication 523, improvement receipts, and depreciation schedules with a tax pro.