Real estate becomes exempt from capital gains tax if the home is considered your primary residence. According to the IRS, your primary residence is a home you have lived in for at least 2 of the last 5 years.