Below you can see the front-view size comparison of the Olympus TG-870 and Sony a5100. The Sony a5100 is 3 mm narrower and 1 mm shorter than the Olympus TG-870 but it is also 8 mm thicker.
The chart below depicts how two cameras compare with average dimensions of the cameras in their class.