How to Meet IRS Ownership and Use Tests. The gain on the sale of your main home can be excluded from taxable income, up to certain maximum amounts, if you meet the ownership and use tests. First, you must have owned and lived in your house for at least 2 years prior to the date sold. Second, you did not exclude gain from the sale of another house during 2 years prior to the sale date.
Exclude the gain on your home sale if you lived in your home for at least 24 months of the 5 years prior to the date of sale. The required 2 years do not have to be continuous.
Meet the ownership test if either you or your spouse owned the home for at least 2 years, and neither one excluded gain from another home sale during the 2-year period prior to the sold date.
Exclude the maximum gain for married persons when both you and your spouse lived in the home for 2 years.
Choose not to exclude gain on your house if it is a minor amount and there's a possibility of another home sale within the next 2 years.
Claim a reduced maximum exclusion if you do not meet the ownership and use test but meet one of the exceptions. The exceptions include a change in place of employment, health reasons and unforeseen circumstances which could not be anticipated when you bought the home.