How to Calculate Gratuity after death

Gratuity is applicable when 5 years complete.
but in case of employee death gratuity is payble upto retirement. Gratuity calculation is mention below.

Suppose Employee Age is 26 at the time of joining and basic salary is 8000/-

= 58 – employee age
= 58-26 = 32

gratuity = basic salary x lenth of service x 15/26

= 8000 x 32 x 15/26 = 147692.00

Gratuity is Payable of Rs. 147692.00