The calculated distance (air line) between Barajas de Madrid and Gasteiz / Vitoria is approximately 171 miles respectively 275 kilometers.
By car or train, the actual journey to Gasteiz / Vitoria is certainly longer, as only the direct route (as the crow flies) between Barajas de Madrid and Gasteiz / Vitoria has been calculated here.
Air line (approximately)
275 kilometers
148 nautical miles