Getting from Barcelona to Madrid is one of the most popular routes in Spain. The two cities are linked by a well-developed transport network, so you can choose from several options: train, plane, bus or car.

The distance between Barcelona and Madrid is roughly 500-620 km (about 310-385 miles), depending on the route and the type of transport. Thanks to high-speed trains and frequent flights, the trip between the cities can take just a few hours, which makes it convenient even for a short getaway or a day trip.

In this article I'll explain how to get from Barcelona to Madrid, which option is the fastest and which is the cheapest, how long the trip takes, how much train, bus and plane tickets cost, and which option suits a tourist best.

How to get from Barcelona to Madrid: all options, prices and travel times

The best way to get from Barcelona to Madrid

The best way to travel from Barcelona to Madrid depends first of all on your time, your budget and the purpose of your trip. There is no universal option that suits everyone. Every kind of transport has its own pros and limitations.

A quick overview of the options:

  • Train — the best choice for most tourists. Fast, comfortable and with no transfers: you go straight from central Barcelona to central Madrid.
  • Plane — makes sense if the flight itself matters to you or you found a good fare. But once you add the trip to the airport and security checks, the total time is often comparable to the train.
  • Bus — the cheapest way to get there, but also the slowest. A good option for overnight trips or a tight budget.
  • Car — an option for those who want flexibility on the route. It doesn't suit every tourist, especially if you have no experience driving in Spain.

If your goal is to get from Barcelona to Madrid quickly and comfortably, the train wins most of the time. If price comes first, consider the bus or the budget train fares. The plane and the car are more like alternatives that make sense in specific situations.

Next I'll go through each option in detail, with real travel times, nuances and explanations, so you can pick the best one for yourself.

Train from Barcelona to Madrid

The train is the most popular and convenient way to get from Barcelona to Madrid. It's the option tourists choose most often because it combines speed and comfort and brings you right into the city center, with no need to go to an airport and pass extra checks.

High-speed trains run between Barcelona and Madrid and cover the distance in about 2.5-3 hours.

High-speed trains Barcelona — Madrid: AVE, Iryo and Ouigo

Several operators work on this route, which creates competition and keeps prices down:

  • AVE — the national operator Renfe. The best-known option, with a high level of comfort, frequent departures and flexible fares.
  • Iryo — a modern private operator. New trains, comfortable seats and often good prices if you book early.
  • Ouigo — budget high-speed trains. The lowest ticket price, but extras (seat selection, luggage) may be charged separately.

In terms of travel time there is almost no difference, because all the high-speed trains use the same line.

How long the train from Barcelona to Madrid takes

The average travel time on a high-speed train is from 2 hours 30 minutes to 3 hours 10 minutes.

This time already covers the trip from central Barcelona to central Madrid, which makes the train especially convenient for short trips and even day visits.

Where to buy a Barcelona — Madrid train ticket

It's best to buy high-speed train tickets between Barcelona and Madrid online in advance: there are more departures to choose from and prices are lower.

The main ways to buy:

  • Official operator websites — best if you already know which train you want to take. This is the most direct and reliable option, with no middlemen.

  • Ticket aggregators — handy for comparing AVE, Iryo and Ouigo in one place: you can see the difference in price, departure time and fare conditions right away.

  • Station ticket offices — possible, but in high season and shortly before departure the tickets you want may be sold out or cost more.

For tourists, the best option is to buy online in advance, at least a few days ahead and ideally 1-2 weeks.

Official carrier websites

  1. Renfe (AVE) — the official website of the national operator ✔️ reliable ✔️ all AVE fares ❌ the interface isn't the most tourist-friendly
  2. Iryo — a private high-speed operator ✔️ modern trains ✔️ often good prices if you book early
  3. Ouigo Spain — budget high-speed trains ✔️ the cheapest tickets ❗ extra charges for luggage and seat selection

Aggregators

  1. Omio — the most convenient option for tourists ✔️ compares AVE, Iryo and Ouigo ✔️ clear interface ✔️ you can buy a ticket right away
  2. Trainline ✔️ convenient for foreign visitors ✔️ works with Spanish trains

I recommend comparing prices on Omio and then buying either there or on the operator's website.

How much a Barcelona — Madrid train ticket costs

The ticket price depends on the operator, the fare, the travel date and even the time you buy.

Approximate prices:

  • Ouigo — from €9-15 if booked early
  • Iryo — from €15-25
  • AVE — usually from €30-60, but with more flexible conditions

If you buy in advance, you can find the cheapest fares, because the price at the last minute is often noticeably higher, especially on AVE. Keep in mind that budget fares (especially Ouigo) may have a luggage limit, and seat selection and other extras are paid separately.

Where the trains depart from and arrive

Both Madrid stations are well connected to the metro and public transport, so getting to your hotel or the city center is easy.

Bus from Barcelona to Madrid

The bus is the cheapest way to get from Barcelona to Madrid, but also the slowest. It's usually chosen by travelers for whom the ticket price matters more than speed, or by those planning an overnight trip.

How long the bus from Barcelona to Madrid takes

The average travel time by bus is:

  • 7-8 hours — daytime departures
  • 8-9 hours — overnight departures

The length of the trip depends on the route, the number of stops and traffic. Unlike the train, the bus doesn't run "center to center" on a dedicated line, so the trip takes noticeably longer.

Where to buy a Barcelona — Madrid bus ticket

Bus tickets are also easiest to buy online in advance.

The main options:

  • Online ticket aggregators — the easiest way to compare prices and departure times of different services
  • Official websites of bus companies
  • Ticket offices at the bus station — possible, but the choice of seats and departures may be limited

Main bus company websites and aggregators

  1. Alsa — the largest bus carrier in Spain ✔️ the most frequent departures ✔️ overnight and daytime buses ✔️ official website
  2. Omio (buses and trains in one place) ✔️ compares Alsa buses and other operators ✔️ easy to check prices and times
  3. Busbud ✔️ international aggregator ✔️ good for comparing prices

How much a Barcelona — Madrid bus ticket costs

The price of a bus ticket depends on the departure time, the day of the week, the season and how full the bus is.

Approximate prices:

  • daytime departures — €20 to €35
  • overnight departures — often €18-25

The bus is almost always cheaper than the train and the plane, especially if train tickets are bought at the last minute.

Where the buses depart from and arrive

  • In Barcelona, buses most often leave from the bus station Barcelona Nord
  • In Madrid, buses usually arrive at Estación Sur or other major bus terminals

Both bus stations are connected to the metro and city transport, but getting to the city center still takes longer than when you arrive by train.

Plane from Barcelona to Madrid

The plane is often seen as the fastest way to get from Barcelona to Madrid, but in practice it isn't always the most convenient choice for a tourist. You need to consider not only the flight time but also the trip to the airport, check-in and waiting.

How long the flight from Barcelona to Madrid takes

The flight time is about 1 hour 15-30 minutes. But the real travel time looks different:

  • the trip from central Barcelona to the airport
  • check-in and security control
  • waiting to board
  • the trip from Madrid airport into the city

In the end, the total time easily reaches 4-5 hours, which makes the plane comparable to the train and sometimes less convenient.

Where to buy a Barcelona — Madrid plane ticket

For searching and buying flights, it's easiest to use aggregators that compare the prices of different airlines.

Recommended options:

  1. Trip.com ✔️ easy search ✔️ often good prices ✔️ suitable for international travelers
  2. Aviasales ✔️ compares airlines ✔️ easy to track prices ✔️ clear interface

Both services let you quickly compare options and pick the best-value ticket.

How much a Barcelona — Madrid plane ticket costs

The price of a flight depends on the travel date, the departure time, demand and when you buy.

Approximate prices:

  • from €25-40 if bought in advance
  • €60-100 and up if bought at the last minute or on peak dates

Sometimes the plane can be cheaper than the train, but such deals usually sell out quickly.

Which airports you fly from and to

  • You depart from El Prat airport (Barcelona)
  • You arrive at Barajas airport (Madrid)

Both airports are large and well connected to the city, but the transfer still takes extra time and needs planning.

From Barcelona to Madrid by car

Driving from Barcelona to Madrid suits those who value freedom of movement and a flexible route. For tourists, though, it isn't always the most convenient option, especially if the goal is simply to get from one city to the other.

Distance and driving time

The distance between Barcelona and Madrid is about 620-630 km (roughly 385-390 miles) on the motorways.

The average driving time is 6-7 hours without stops, and longer with heavy traffic, roadworks or detours into towns along the way. The route mostly follows fast motorways, and the roads in Spain are of high quality.

How much a rental car costs for the Barcelona — Madrid trip

The cost of renting a car in Barcelona depends on the season, the car class and the rental period. Overall, Spain is one of the most affordable countries in Europe for car rental prices.

Approximate rental prices:

  • economy class (Fiat 500, Opel Corsa and similar) from €20-35 per day for a rental of several days
  • compact / mid-size from €30-50 per day
  • crossovers and family cars from €50-80 per day

You should also factor in:

  • the deposit (often blocked on your card)
  • insurance (basic is usually included, extended cover costs extra)
  • the cost of fuel
  • paid parking, especially in Madrid

If you rent a car for 1 day just for the transfer, the total cost often ends up higher than the train or the plane.

Where to rent a car in Barcelona

One of the most convenient and reliable options for tourists is renting through aggregators: Booking.com (the "Car rental" section) or Localrent.

Why it's convenient:

  • you can compare offers from different rental companies
  • clear rental terms
  • real reviews
  • free cancellation and transparent prices are often available

Through an aggregator you can rent a car at Barcelona airport, in the city center or at the train stations.

Toll roads and extra costs

There used to be several toll sections on this route, but at the moment the main roads between Barcelona and Madrid are free. Even so, you should factor in other costs on the trip:

  • fuel
  • possible paid parking in Madrid
  • toll roads inside cities or on bypasses

In the center of Madrid there are restricted-traffic zones that you can't enter without a special permit, which is important for tourists driving a rental car.

Comparing the ways to get from Barcelona to Madrid

Below is a side-by-side comparison of all the ways to travel from Barcelona to Madrid by price, travel time and convenience. This block helps you quickly see which option suits you best.

Comparison table

OptionTravel timePriceConvenienceBest for
Train2.5-3 hoursfrom €9-15⭐⭐⭐⭐⭐Tourists, short trips, 1 day
Bus7-9 hoursfrom €18-35⭐⭐Budget travelers
Plane~4-5 hoursfrom €25-40⭐⭐⭐If you find a cheap ticket
Car6-7 hoursfrom €70-120⭐⭐⭐Groups, routes with stops

The fastest way to get from Barcelona to Madrid

The train is the fastest option when you count the whole "door to door" trip. It lets you skip the trip to the airport, check-in, security checks and waiting to board.

In practice, a high-speed train is often faster than a plane.

The cheapest way to get from Barcelona to Madrid

If you book early, the Ouigo or Iryo train is the best choice, but if you buy at the last minute, the bus is cheaper. If the lowest price matters and time isn't critical, the bus remains the most budget-friendly option.

The best option for price vs. time

For most tourists the train offers the best balance:

  • a reasonable price
  • the shortest travel time
  • a high level of comfort
  • arrival in the city center

That's why the train is most often called the best way to get from Barcelona to Madrid.

In this YouTube episode I filmed how we traveled around Spain

Frequently asked questions (FAQ)

Which is better, the train or the plane?

For most tourists the train is more convenient: it's faster "door to door", with no airports or transfers.

How much does a ticket from Barcelona to Madrid cost?

Prices start at:

  • train from €9-15 if booked early
  • bus from €18-25
  • plane from €25-40

Are there overnight services?

Yes, there are overnight buses. Trains and planes mostly run during the day.

When is the best time to buy tickets?

The earlier, the cheaper. For trains it's best to buy tickets 1-3 weeks ahead.

Do I need to make any transfers?

No, all the main types of transport run directly between Barcelona and Madrid.