Question about California capital gain tax on home selling?

Hi
I consider selling a home and want to ask some questions.
I purchased a home as a primary residence on May 31st 2011 and lived for 1 year and half.
After that, the house was rented until Dec 1st 2015.
I'm going back to home to live. (Actually, I want to sell)

It looks like house has been owned for 5 years now after purchase.
Am I qualified for capital gain tax 0% if I live more than 6 months? ( because I previously lived for 1 year and 6months)

Some says it's calculated in a consecutive way and other says it doesn't matter.
I live in California. Current our tax bracket seems 15% (income tax)

And how can a residence length record be found?
Can it be found on tax return report if I can't find an utility bill?

And as a final question, what expense is deducted on tax? For instance, agent commission fee, home remodeling,..?