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