To get the maximum exclusion of gain when selling your home you must satisfy all of the following conditions.
- You owned the home for 2 years out of the 5 years preceding the sale.
- You lived in the home as your primary residence for 2 years out of the 5 years preceding the sale.
- You did not claim an exclusion of gain for the sale of another home within two years preceding the sale.
See IRS Publication 523, Selling Your Home, for details and exceptions.