Your gratuity calculation period will be reckoned from the date of your confirmed employment with the firm, the first six months consultation period may not be treated as employment because it was clearly stated that you were deployed for consulting services alone and were not on the salary roll of the employer's firm.
As per Section 4(1) of the Payment of Gratuity Act 1972, an employee becomes eligible for gratuity only after completion of 5 years of continuous service with the same establishment.
Section 4(2) of the Payment of Gratuity Act. The section spells out the condition on the eligibility of an employee for gratuity in the event of him not completing the full five year period:
The section says that for every completed year of service in excess of six months, the employer shall pay gratuity to an employee. That means if an employee works in the establishment for more than 6 months in a year, he shall be eligible to get gratuity at the prescribed rate. So, if an employee completes 4 years and 6 months of continuous service in the same establishment, he is eligible to get gratuity as per the Payment of Gratuity Act 1972.
There is also a judgment by the Madras High Court which says that there is the eligibility for the gratuity of an employee who completes 4 years and 240 days of service
For the calculation of the 5 years, a single year is assessed as 240 working days for employees working in organisations that do not involve work underground. For those working in mines and other such fields, a year is assessed as 190 days.