Investors & landlords

See https://www.irs.gov/taxtopics/tc701

 

I am presuming that you mean you have been renting your house to a third party (or parties) for the last 3 years and 3 months.

 

In order to exclude some or all of the gain, you would need to have used the house as your main residence for the last 2 out of 5 years leading up to the sale (refer to the link above).

 

As it stands at this point, beyond something like a 1031 exchange (link below), you will have to recognize gain and will be subject to depreciation recapture.

 

https://www.irs.gov/pub/irs-news/fs-08-18.pdf