Straight-line distance between the two places: about 510 km.
AVE high-speed train
About 2 hours 30 minutes to 3 hours
Renfe's AVE is the traditional high-speed service and runs many times a day from Barcelona Sants to Madrid Atocha. Both are central stations, so there is little time lost on transfers. Fares vary a lot by how early you book and by train type, so compare departures on the Renfe site. Arrive at the station a little early, as a quick baggage security check is required before the platforms.
Ouigo and Iryo trains
About 2 hours 30 minutes to 3 hours 30 minutes
Ouigo and Iryo are private high-speed operators competing with Renfe on this line, also between Barcelona Sants and Madrid Atocha. Ouigo is a low-cost service that charges extra for suitcases and has a stricter check-in deadline, so read its luggage rules before booking. Iryo is a full-service operator with several comfort classes. Compare all three operators for the same day.
Bus
About 7.5 to 9 hours
Alsa runs direct coaches between Barcelona and Madrid, and other operators also sell the route. The journey is long and clearly slower than the train, so a bus makes sense mainly when fares are much lower. In Barcelona, Alsa coaches commonly use the Estació d'Autobusos Nord, and in Madrid, services stop at stations such as Avenida de América or Estación Sur. Check the exact stations on your ticket.
Flight
About 1 hour 25 minutes in the air, 3.5 to 5 hours door to door
Flights connect Barcelona El Prat and Madrid Barajas, and the flying time is short. After airport transfers, check-in and security, however, the total is generally no faster than the high-speed train, which also leaves from and arrives in city centers. A flight can still help if you are continuing on an international connection at Madrid Barajas or if you found a particularly low fare.
Car
About 6 to 7 hours (roughly 610 km)
The usual route follows the AP-2 and A-2 motorways via Zaragoza, with parts of the AP-2 charging tolls. It is a long drive best split with a stop in Zaragoza or another town on the way. A car makes sense if you are traveling with several people or plan to explore Aragon or Castile en route. Parking and low-emission zones in central Madrid can be restrictive, so check where you will leave the car.
Timetables, fares and services change. Check the operator before you travel.