In April 18 I sold my home that was my primary residence from May 14 to June 17. It was rented from July 17 to Feb 18. Does this sale need to be reported on 2018 returns?

Received a 1099-S form related to this home sale. This home was my primary residence for 3 out of the 4 years I owned it. The home was rented for 7.5 months total. Does this qualify me to be exempted from the gains tax from the home sale of a rented property?