From 21-Mar-2006 to 30-April-2011 1st Calculate no of Days = 1,866 Minus Total un-paid leave taken in 5 years for Example 25 Days =1,866-25=1,841 Days /365 Days
=5.04 * 21 Days

Total =5.04*21 = 105.92 Days

Now take your salary only basic will be taken in to a/c for Gratuity

For Example your Basic Salary is Qr.5000 / month

Convert in to Days =5,000/30 = 166.67

Now Finally Basic Salary per day multiple into number of Days Worked

= 166.67 * 105.92

=17,653.69 is your Gratuity.

Hope you understand