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