Gratuity is paid for each year of service completed from the date of joining a company. The gratuity is 21 calendar days. As such if your basic is 5000 you divide this by 30. multiply the result by 21 and then multiply by the number of complete years you have worked. I don't think gratuity is paid for partial years.