Query on CAP Exempt duration calculation

My H1B petition was approved for Dec’11 to Feb’13 from employer X. Now my petition and visa both expired. I was in USA for 5 month and came back India in Dec’12.

I have a query on CAP Exempt duration -

Is calculation done from the date petition validity started i.e Dec- 2011 Or from the date I last stayed in USA i.e Dec’12 Or the date I entered in USA May -2011

Thanks in Advance…!

I have a similar query
My visa expired in 2008 and i went back to india in 2008. Now i would like to apply for the remaining 5 years left on my visa in 2017 after 9 years. Is it possible ?
I have seen conflicting answers like these mentioned below

http://www.immi-usa.com/h1b-cap-exempt/

https://www.murthy.com/2016/11/23/i-was-in-h1b-for-a-couple-of-years-and-then-left-in-2009-can-i-file-a-cap-exempt-h1b-to-claim-remaining-years-now/

https://www.murthy.com/2017/01/23/i-worked-for-1-year-in-h1b-status-and-then-went-back-to-my-home-country-2001-can-an-employer-file-a-cap-exempt-h1b-now-to-reclaim-remaining-5-years/

Please some one with similar case answer to resolve this confusion. Its very time critical.