Use case · 2026 federal estimate · Updated October 2, 2026
Can I exclude gain if I sell my house before 2 years?
Direct answer
A partial exclusion applies only if you sell because of a job move, health, or unforeseen event. The amount is months qualified ÷ 24 × $250,000 (single) or × $500,000 (married filing jointly). Eighteen of 24 months excludes $187,500 for a single seller. Without that reason, the exclusion is $0.
18 months, single, $230,000 gain
Bought for $350,000, sold for $600,000 after $20,000 of selling costs, owned and lived in for 18 months, $80,000 of other taxable income. Eighteen months is more than one year, so both rows are long-term.
| Qualifying reason | No qualifying reason | |
|---|---|---|
| Exclusion | $187,500 | $0 |
| Taxable gain | $42,500 | $230,000 |
| Federal tax | $6,375 | $39,292 |
| Of which NIIT | $0 | $4,792 |
The gain is under the full $250,000 exclusion, so reaching 24 months of ownership and use would drop federal tax from $6,375 to $0 in this example. State tax is not included.
Married filing jointly
Eighteen of 24 months × $500,000 is $375,000. A couple who bought for $400,000 and sold for $900,000 after $40,000 of costs has a $460,000 gain. With the partial exclusion and $120,000 of other income, $85,000 is taxed at 15%: $12,750 federal.
Limits
- The proration uses the shorter of ownership and use. Living in the home for 18 months but owning it for 6 months uses 6 months.
- A work-related move generally has to put the new workplace at least 50 miles farther from the home. Publication 523 has the health and unforeseen-event tests.
- Depreciation taken after May 6, 1997 is never excluded, even when the rest of the gain is.
Use the calculator
Prior depreciation: how depreciation recapture is taxed. The full walkthrough: capital gains tax on a property sale. Model your sale in the real estate capital gains calculator.