Section 121 exclusion, partial exclusions, rental periods and depreciation recapture
Updated October 2026
Sale price is the contract price from your closing statement (also on Form 1099-S if you got one). Selling costs are commissions, title and legal fees and transfer taxes you paid. Purchase price plus buying costs includes the settlement fees Publication 523 lets you add to basis, such as title fees and recording fees. Capital improvements are additions that add value or extend the home’s life (a new roof, an addition, central air), not repairs. Depreciation is any you took, or could have taken, for a home office or rental use after May 6, 1997. If you rented the home out before living in it, enter those months as nonqualified use and your total months of ownership.
The couple’s amount realized is $850,000 − $45,000 = $805,000. Their adjusted basis is $300,000 + $40,000 = $340,000. Gain: $805,000 − $340,000 = $465,000. They both lived there for at least 2 of the last 5 years and one of them owned it that long, so the limit is $500,000 and the full $465,000 is excluded. A single owner in the same house would exclude $250,000 and owe tax on $215,000.
When there is depreciation or a rental period, the order follows Worksheet 3 in Publication 523: subtract depreciation from the gain first (it is taxed as unrecaptured section 1250 gain), then take out the share of the remaining gain that belongs to nonqualified use, and apply the exclusion only to what is left.
| Situation | Gain | Exclusion limit | Excluded | Taxable (incl. recapture) | Est. federal tax at 15% |
|---|---|---|---|---|---|
| Couple, bought for $300,000 in 2012, sells for $850,000 | $465,000 | $500,000 | $465,000 | $0 | $0 |
| Single owner, $410,000 gain | $410,000 | $250,000 | $250,000 | $160,000 | $24,000 |
| Single, job move after 14 months, $90,000 gain | $90,000 | $145,833 | $90,000 | $0 | $0 |
| Former rental: 2 of 5 years rented, $20,000 depreciation (Pub 523 Finley) | $320,000 | $250,000 | $180,000 | $140,000 | $23,000 |
The job-move seller qualifies for 14 ÷ 24 of $250,000, or $145,833, more than the $90,000 gain, so nothing is taxed. The former rental matches Publication 523’s Finley example: 2 of 5 years rented makes 40% of the $300,000 gain after depreciation ($120,000) taxable, and the $20,000 of depreciation is recaptured.
Ownership: you owned the home at least 24 months in the 5 years before the sale. Residence: you lived in it as your main home at least 24 months (730 days) in that period; the months need not be consecutive. Look-back: you did not exclude gain on another home sold in the 2 years before this sale. A married couple filing jointly gets $500,000 if either spouse meets the ownership test, both meet the residence test and neither used the exclusion in the prior 2 years. A surviving spouse can still use $500,000 for a sale within 2 years of the spouse’s death if they have not remarried. The $250,000 and $500,000 limits are not indexed for inflation.
If you fail the 2-year tests mainly because of a change in workplace (a new job at least 50 miles farther from the home than the old one), a health reason, or an unforeseeable event (Publication 523 lists examples such as a death, a divorce or legal separation, becoming eligible for unemployment compensation, and twins or more from one pregnancy), you get a reduced limit. Take the shortest of your residence time in the last 5 years, your ownership time, and the time since you last used the exclusion; divide by 24 months (or 730 days) and multiply by $250,000. A joint filer does this for each spouse and adds the results; this calculator assumes both spouses have the same period.
Any depreciation allowed or allowable after May 6, 1997 is taxed when you sell, at a rate of up to 25%, even if the rest of the gain is excluded. Periods after 2008 when nobody used the home as a main residence are nonqualified use, and that share of the gain is taxable, except for time after you moved out within the 5-year window, up to 10 years of qualified official extended duty, and up to 2 years of temporary absence for work, health or unforeseen reasons.
Counting repairs as improvements. Painting and fixing a leak do not add to basis; a new roof does. Losing improvement records, which leaves you unable to prove a higher basis. Ignoring depreciation you never claimed on a former rental: the "allowable" rule can still apply. Assuming a married couple always gets $500,000 when only one spouse lived there. Thinking a loss is deductible: a loss on a personal residence is not. Skipping Form 8949 when a 1099-S was issued, even if all the gain is excluded.
It does not split a home with a separate business structure, handle divorce transfers, 1031 exchanges, military "stop the clock" periods, inherited homes (stepped-up basis), state income tax, or the 3.8% net investment income tax that can apply to taxable gain at higher incomes. The tax estimate uses a single capital gains rate you choose, not your full return. A tax professional is worth it for a former rental, a partial exclusion, or a sale with a large taxable gain.