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