The amount you get as gratuity depends on the number of years you have served and the last drawn monthly salary. Roughly, you get half a month’s Basic and DA for every completed year of service.
Formula to calculate gratuity amount: (Number of years of service) * (Last drawn monthly Basic and DA) *15/26.
For example, if you have served 30 years and draw monthly Basic and DA of Rs. 20,000 when you leave the job, you get gratuity of Rs. 3,46,154 calculated as (30 * 20,000 *15/26).
The formula has been posted in many posts of this forum.Search button would have instantly given you this formula.