The calculated distance (air line) between Krasnodar and Sochi is approximately 107 miles respectively 171 kilometers.
By car or train, the actual journey to Sochi is certainly longer, as only the direct route (as the crow flies) between Krasnodar and Sochi has been calculated here.