Return mid by distance