Capital Gain Exception

I've owned my house for 22 years and used it as my primary resident for 18 years.  For the past 4 years I've rented the house and planning to sell.  Do I qualify for Capital gain exemption?