How big is the margin of safety in aviation?

Distances may vary depending on the phase of the flight and the size of the plane, but the separation between two aircraft flying at cruising altitude, is around 10 km horizontally and 300 metres vertically. If one would transfer the horizontal safe distance from aviation to cars driving 110 km/h on a highway, the distance between each car would be about one kilometer.