Gratuity is one of the main components of retiral benefits provided to an employee.
Formula to calculate gratuity: (Number of years of service) * (Last drawn monthly Basic and DA) *15/26.Here DA means Dearness Allowance. (Cost of living adjustmnt for pensionrs) So, if you have served 30 years and draw monthly Basic and DA of Rs. 50,000 when you leave the job, you get gratuity of Rs. 8,65,385 calculated as (30 * 50,000 *15/26).
if you want know more visit
https://hrone.cloud/how-to-calculate-gratuity/