Companies offer gratuity amount to their employees. An employee gets the benefit of gratuity after working in a company for…