Get your taxes done using TurboTax

your situation should be reviewed by a tax pro, the fact that you waited more than 3 years after moving out may be an issue

here's from IRS reg 1.121-3 reduced exclusion

Factors that may be relevant in determining the taxpayer's primary reason for the sale or exchange include (but are not limited to) the extent to which -

(1) The sale or exchange and the circumstances giving rise to the sale or exchange are proximate in time;

(2) The suitability of the property as the taxpayer's principal residence materially changes;

(3) The taxpayer's financial ability to maintain the property is materially impaired;

(4) The taxpayer uses the property as the taxpayer's residence during the period of the taxpayer's ownership of the property;

(5) The circumstances giving rise to the sale or exchange are not reasonably foreseeable when the taxpayer begins using the property as the taxpayer's principal residence; and

(6) The circumstances giving rise to the sale or exchange occur during the period of the taxpayer's ownership and use of the property as the taxpayer's principal residence.

 

in any case, you would first have to recapture any depreciation allowed or allowable during the rental period before any excess gain would be eligible for the exclusion if any is available under your circumstances.