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