The calculated distance (air line) between Castleknock and Carlow is approximately 44 miles respectively 70 kilometers.
By car or train, the actual journey to Carlow is certainly longer, as only the direct route (as the crow flies) between Castleknock and Carlow has been calculated here.
Air line (approximately)
70 kilometers
38 nautical miles