Some links in this guide are affiliate links: if you book through them we may earn a small commission at no extra cost to you. Learn more.
Madrid and Barcelona are Spain's two biggest cities, and most first trips to Spain include both. They are about 300 miles apart as the crow flies, and more like 370 miles by road, but Spain has one of the best high-speed rail networks in Europe, so getting between them is easy. Here is how the train, the plane, the bus and the car compare.
Option 1: Take the high-speed train
The train is the classic way to travel between Madrid and Barcelona, and it is hard to beat. You leave from the middle of one city and arrive in the middle of the other, with no airport transfers, no liquid rules and plenty of legroom.
How long does the train take?
The fastest nonstop trains take around two and a half hours. Many trains make one or two stops along the way, often at Zaragoza, and take closer to three hours. Either way, it is one of the quickest city-to-city train rides in Europe.
Which companies run the trains?
The route has more competition than most train lines in Europe:
- Renfe, Spain's national rail company, runs the AVE, its main high-speed service, and Avlo, its low-cost high-speed brand with simpler fares.
- Iryo and Ouigo are private high-speed operators that also run trains between Madrid and Barcelona.
Because several companies serve the same route, it pays to compare them. Low-cost options tend to have cheaper starting fares but stricter rules on luggage and changes, so check what the ticket includes before you book.
Stations
- In Madrid, most high-speed trains to Barcelona leave from Madrid Puerta de Atocha, near the Prado and the Retiro park. Some services use Madrid Chamartín in the north of the city, so check your ticket.
- In Barcelona, trains arrive at Barcelona Sants, the city's main station, with metro and local train links to the rest of the city.
Spanish high-speed trains have a security check for bags before you reach the platform, a bit like a quick airport scan. Arrive at the station at least 20 to 30 minutes before departure, and more on busy days.
How to get a cheap train ticket
- Book early. Fares usually rise as the train fills up, so the best prices are often weeks ahead.
- Compare operators. The same time slot can cost very different amounts with different companies.
- Travel midweek or at off-peak times. Early-morning and midday trains on Tuesdays and Wednesdays are often cheaper than Friday and Sunday afternoons.
- Check what is included. Some low-cost fares limit how many bags you can bring or charge to change your ticket.
- Rail pass holders: if you have a Eurail pass, you will usually need to book a seat reservation for high-speed trains in Spain, and it can sell out. Check the rules before you go.
Option 2: Fly from Madrid to Barcelona
Madrid to Barcelona is one of the busiest air routes in Europe, with many flights every day. The flight itself is short, a little over an hour, but you need to add the trip to and from the airport and time at security.
Airports
- Madrid-Barajas (MAD) is northeast of the city center. Metro Line 8 and Cercanías local trains connect it to the city.
- Barcelona El Prat (BCN) is southwest of the city. The Aerobús shuttle, the R2 Nord train and metro Line 9 Sud connect it to the center.
When flying makes sense
- You are connecting to another flight. If you land in Madrid from the US and want to go straight on to Barcelona, a connecting flight on the same ticket can be simpler than getting into the city for a train.
- You find a very cheap fare. Budget airlines sometimes sell seats for less than the train, especially if you only bring a small bag.
- You are flying out of Barcelona airport. If your next flight leaves from El Prat, flying in can save you a trip across the city.
Otherwise, the train is usually faster door to door and far more comfortable. If you do fly, compare the total price with bags, and book an airport transfer if you land late at night or travel with a lot of luggage.
Option 3: Take the bus
Long-distance buses run between Madrid and Barcelona several times a day. The trip takes seven to eight hours or more, so it is much slower than the train or a flight, but bus fares can be among the cheapest ways to make the trip, especially when booked early.
The bus makes the most sense if you are on a tight budget, travel at the last minute when train fares are high, or want an overnight trip to save a night of hotel costs. Bring snacks, water and a charged phone, and check where the bus stations are in each city, since they are not always in the center.
Option 4: Drive
Driving from Madrid to Barcelona takes around six hours without long stops, on good highways through the plains of Aragon. It is not the quickest choice, but it makes sense if you want to explore along the way.
A car lets you stop in:
- Zaragoza, roughly halfway, for the huge Basilica of Our Lady of the Pillar and a long lunch.
- The Montserrat mountains, near Barcelona, with their monastery and dramatic rock formations.
- Wine country, in areas like the Penedès near Barcelona.
Keep in mind that parking in central Madrid and Barcelona is expensive and hard to find, and many central areas have traffic restrictions. Most travelers pick up a car when they leave one city and drop it at the edge of the other. Dropping a car in a different city usually costs extra, so compare companies on Discover Cars and check the one-way fee before you book.
Train vs. plane vs. bus vs. car
- Fastest door to door: the high-speed train, about 2.5 to 3 hours center to center.
- Most comfortable: the train, with more space, no airport security and views of the Spanish countryside.
- Often cheapest: the bus, or a low-cost train or flight booked early.
- Best for connections: a flight, if you are connecting from or to another flight.
- Best for sightseeing on the way: driving.
Fly into one city and home from the other
If you are coming from the US, the smartest money and time saver is often an open-jaw ticket: you fly into Madrid and home from Barcelona, or into Barcelona and home from Madrid. You see both cities without ever going back the way you came, and the price is often close to a round trip.
Search flights from US cities like New York to Madrid, Chicago to Madrid, Miami to Barcelona or New York to Barcelona, or build the whole trip on our multi-city flight search, where you can add Madrid, Barcelona and any other stop and compare live fares.
How many days in each city?
Most first-time visitors spend two to four days in each city:
- Madrid is about art, food and city life: the Prado, the Reina Sofia, the Royal Palace, the Retiro park and late dinners in neighborhoods like La Latina. Find a place to stay on our Madrid hotels page.
- Barcelona mixes Gaudi's buildings, the Gothic Quarter, the beach and great food markets. Book big sights like the Sagrada Familia ahead, and see our list of things to do in Barcelona and Barcelona hotels.
If you are still choosing when to go, read our guide to the best time to visit Barcelona. Planning a bigger trip? Our 10-day Europe itinerary and guide on how to travel around Europe cheaply can help you add more cities.
Tips for the trip
- Book trains early, especially for weekends, holidays and summer.
- Check which station your train uses, since not every Madrid train leaves from Atocha.
- Arrive early for the bag check at high-speed train stations.
- Compare the total price of flights with bags before you assume they are cheaper.
- Use an open-jaw ticket from the US to avoid backtracking.
Frequently asked questions
- What is the fastest way to get from Madrid to Barcelona?
- The high-speed train is usually the fastest door to door. The quickest nonstop trains take about two and a half hours, center to center. A flight is shorter in the air, but airport travel and security usually make the whole trip longer.
- What is the cheapest way to get from Madrid to Barcelona?
- Buses are often the cheapest, but they take seven to eight hours or more. Low-cost high-speed trains and budget flights booked well ahead can also be cheap, so compare all three for your dates.
- Is it better to take the train or fly from Madrid to Barcelona?
- For most travelers the train is better: it is about as fast door to door, more comfortable and goes from city center to city center. Flying makes sense if you are connecting to another flight or find a much cheaper fare.
- How far in advance should I book the Madrid to Barcelona train?
- As early as you can. Fares usually rise as trains fill up, so booking a few weeks ahead, or more for weekends, holidays and summer, gives you the best chance of a low fare.
- Can I see Madrid and Barcelona in one trip from the US?
- Yes. Fly into one city and home from the other with an open-jaw ticket, and take the high-speed train between them. Two to four days in each city is a good start.
