Thinking of taking a ride on the Barcelona to Madrid train? Here’s everything you need to plan the journey and make the most of it!

Getting from Barcelona to Madrid by train

A high-speed train from Barcelona to Madrid takes about 2 hours and 29 minutes to complete the journey – roughly 503 kilometres.

The first train from Barcelona to Madrid departs Barcelona Sants Train Station at about 05:40 during the week. The last train to Madrid departs Barcelona Sants at roughly 21:25. The schedule is more-or-less consistent across both weekends and weekdays.

Train services available

Three train operators provide high-speed train Barcelona to Madrid service – Renfe, iryo and Ouigo.

Renfe

The national train carrier of Spain offers more than 30 services a day from Barcelona Sants to Madrid Atocha Train Station, with various classes of service to choose from. Of particular note are their newer AVE high-speed trains, which add modern comfort and quality to the journey. The AVLO train is a less-luxurious, budget-friendly high-speed train available along the same route.

Renfe’s standard class is comfortable and convenient. Upper classes of service include in-seat entertainment, meal service and access to station Club Lounges. Renfe is also committed to accessibility, with accommodations available for large luggage, pets and disabled persons.

iryo

If you want a luxury train from Barcelona to Madrid, iryo is a solid go-to iryo is a private train operator that offers the Spanish market a more luxurious travel experience. Its sleek, modern fleet of high-speed trains operates roughly 16 services a day from Barcelona to Madrid. Travellers in its various classes of service can enjoy perks like 5G data, leather seats and in-seat attendants.

iryo is also known for its gourmet fine dining offerings, with seasonal ingredients and premium wine and beverage pairings. iryo travelers can also access special promotions from hotel partners.

Ouigo

Looking for a cheap train from Barcelona to Madrid? Ouigo may be the way to go. Ouigo is the most budget-friendly of the three high-speed train Barcelona to Madrid operators, offering all-inclusive fares (no upcharges) up to 365 days in advance across several relatively inexpensive classes of service.

Key to their business model is the use of double-decker trains for higher capacity across fewer service runs. Nevertheless, Ouigo seats of all classes are comfortable, clean and furnished with essential amenities like wifi and in-seat charging outlets.

Benefits of traveling by train instead of plane

Why choose train instead of air travel for your journey from Barcelona to Madrid? Many reasons, including:

  • Train tickets from Barcelona to Madrid tend to cost less than plane tickets.

  • Flexible, frequent range of itineraries, instead of relatively few rigid and inflexible itineraries with an airline.

  • Booking last-minute train tickets is much more affordable and viable than booking last-minute plane travel.

  • Less hassle with security and screening.

  • Central train stations instead of far-away airports.

  • Comparable journey time when you factor in commute, security, taxi, etc.

  • More comfort, amenities and freedom to move around the car.

  • More affordable premium classes of service.

  • No need to rent a car and worry about fuel, parking or liability.

Plus, soon plane travel between two Spanish destinations that can alternatively be reached by train in under 2 hours and 30 minutes will be banned, so train travel will be the most efficient means of travel.

Barcelona to Madrid train schedule

Schedule details

  • Trains per day: 51 trains

  • Total journey distance: 503 kilometres

  • Fastest train: 2 hours and 29 minutes

  • Earliest train leaving during the week: 05:40

  • Latest train leaving during the week: 21:25

  • Earliest train leaving during the weekend: 05:50

  • Latest train leaving during the weekend: 21:25

  • How much in advance you can book on this journey: 12 months

Quickest journey time and total distance

The quickest train ride from Barcelona to Madrid is roughly 2 hours and 29 minutes, covering a total distance of about 503 kilometres.

Earliest and latest departure times

The earliest departure time for a high-speed train from Barcelona Sants Station to Madrid Atocha Station is roughly 05:40, 5 days a week. The last train on the route usually leaves Sants at around 21:25.

Average number of daily trains for each operator

The number of train services provided by each operator from Barcelona to Madrid are roughly as follows:

  • Renfe: 30-34 trains per day

  • iryo: 16 trains per day

  • Ouigo: 5-7 trains per day

Barcelona to Madrid train ticket prices

Average cost of a ticket on this route if you book 30 days in advance: US$83 Average cost of a ticket on this route if you book 7 days in advance: US$58

Ticket prices and factors affecting the cost

The cost of your train ticket from Barcelona to Madrid depends on many factors, including how far in advance you purchase, the operator, the class of service, the specific train and the demand for the service route at that time and date. Here are our current live estimates of train ticket cost from Barcelona to Madrid:

  • Cheapest ticket on the route: US$6.50

  • Average cost of a ticket on this route if you book 30 days in advance: US$83

  • Average cost of a ticket on this route if you book 7 days in advance: US$58

Importance of booking in advance

It is possible to book Barcelona to Madrid train tickets at the last minute, either online or at the station. However, if you book in advance, at least 7 days and preferably 30 days or more, you will have access to better prices and more options in terms of itineraries, operators, class of service and seat selection.

How to set up booking alerts with Rail Europe

If the fare class, operator or itinerary you want for your Barcelona to Madrid train trip is not yet available, you can set up booking alerts through the Rail Europe website. This automated system will notify you by email when new booking availability on your itinerary of choice gets released.

Here’s how to do it:

  • When you search for an itinerary and it is not available, the website will display a button that says Alert me when booking opens up.

  • Upon clicking this button, you will have the opportunity to enter your email address.

  • When new seats on the itinerary become available, you will receive an email notification.

  • If you were logged into your Rail Europe online account, you can manage your booking alerts from the account dropdown menu on any page.

  • If you didn’t have an account or were logged out, creating an account or logging in with the email address you created the alert with will cause the alert to populate in the “manage booking alerts” section of your account.

Train stations from Barcelona to Madrid

Barcelona Sants Station

Barcelona Sants Train Station is a modern, efficient, easy-to-navigate central train station located just to the West of the historic city center. Built in 1979, it connects high-speed regional and international trains with local metros and transit, connecting Barcelona to the rest of Europe.

Facilities and services available at Sants train station Barcelona to Madrid

  • Connections to regional trains, Metro Lines 3 & 5, city buses, taxis and rideshare.

  • Supermarkets, bookstores, gift stores, specialty stores.

  • Restaurants, bars, cafes and coffee.

  • Short-term and long-term parking facilities.

  • Car rental stations.

  • Waiting rooms with comfortable seating.

Madrid Atocha Station

Built in 1851 and renovated in 1892, Madrid Atocha Station is a lively transit hub and an architectural wonder in its own right. The most notable feature is a more modern addition, though — an indoor tropical garden framed in modern steel and glass, lush greenery to soothe passengers as they wait, commute and transit.

Facilities and services available at Atocha train station Barcelona to Madrid

  • Connections to Cercanías, Metro Line 1, city buses, taxis and rideshare.

  • Gift shops, bookstores, clothing stores, convenience stores.

  • Restaurants, cafes, fast food, coffee.

  • Short-term and long-term parking facilities.

  • Car rental stations.

  • Waiting rooms with comfortable seating, including the indoor tropical garden.

  • Ticket purchasing machines.

  • Human ticket sales agents.

  • Storage lockers and luggage attendance.

  • ATM cash machines and currency exchange.

  • Meeting and conference rooms.

  • Wifi throughout the stations.

  • Police and security.

Travelling with Renfe, iryo and Ouigo

Although you will begin each train trip from Barcelona to Madrid at Barcelona Sants Station, procedures and best practices vary somewhat from operator to operator. Here is what to expect when travelling with each operator.

Renfe trains from Barcelona to Madrid

Security

Standard security includes ticket checks, possible baggage screening, possible ID checks and possible metal detector passage. AVE trains usually entail extra security, including dedicated entry gates and possible checks from Guardia Civil and train personnel.

Boarding process

Scan your ticket at the access gates to enter the boarding area. Gate access as early as 20 minutes before departure. Find the right car for your assigned seat.

Navigating the station

Renfe trains tend to depart from the high-speed tracks – Platforms 1-15. Check the departure boards for your exact departure platform.

iryo trains from Barcelona to Madrid

Security

Standard security includes ticket checks, possible baggage screening, possible ID checks and possible metal detector passage.

Boarding process

Your ticket and/or ID may be checked before you can enter the boarding area. Gate access as early as 15-20 minutes before departure. Find the right car for your assigned seat.

Navigating the station

iryo trains tend to depart from the high-speed tracks – Platforms 1-15. Check the departure boards for your exact departure platform.

Ouigo train Barcelona to Madrid

Security

Standard security includes ticket checks, possible baggage screening, possible ID checks and possible metal detector passage.

Boarding process

Your ticket and/or ID may be checked before you can enter the boarding area. Gate access as early as 15-20 minutes before departure. Find the right car for your assigned seat.

Navigating the station

Ouigo trains tend to depart from the high-speed tracks – Platforms 1-15. Check the departure boards for your exact departure platform.

Train classes and services

Renfe trains from Barcelona to Madrid

  • Turista (Standard): Comfortable reclining seats with substantial legroom. Power outlets at seats, wifi, food and drink purchase available.

  • Turista Plus (Comfort): More seat space and legroom, possible seatback entertainment.

  • Preferente (First Class): Wider leather seats, possible meal service at your seat, privacy, complimentary newspaper, access to Club Lounge at stations.

  • Club (Executive Class): Extra privacy, exclusive cabin access, gourmet meal service.

iryo trains from Barcelona to Madrid

  • Inicial: Wifi, power outlets at the seats, onboard HAZEA Café for food and beverage purchases.

  • Singular: Premium seat, personalised service from on-board attendants, possible “conference” meeting seating.

  • Infinita Bistró: Most spacious seating, personalised service from on-board attendance, premium specialty food and beverage service.

Ouigo trains from Barcelona to Madrid

  • Standard Ouigo (Essential): In-seat power, wifi, one cabin-sized luggage item and one personal item allowed.

  • Ouigo Plus (Confort Ouigo+): XL seats when available, entertainment, one XL luggage item allowed.

Travel documentation and customs

The direct train from Barcelona to Madrid is entirely domestic, with no foreign border crossings. As such, there is no special documentation or customs process required for the journey. There is no passport control, no customs declaration needed. You only need your photo ID and ticket. If you require a visa to visit Spain, make sure to have that visa handy in case an official asks to see it.

Frequently asked questions

How long is the train ride from Barcelona to Madrid?

The high-speed train ride from Barcelona to Madrid takes roughly 2 hours and 29 minutes.

What is the distance by train from Barcelona to Madrid?

The distance by train from Barcelona to Madrid is roughly 503 kilometres.

​​Is there a train from Barcelona airport to Madrid?

There is no direct train service from Barcelona El Prat Airport (BCN) to Madrid. If you plan to arrive at BCN and proceed directly to Madrid, you will need to take Aerobús, the Renfe R2 Nord suburban train, taxi or rideshare from BCN to Barcelona Sants Train Station and from there board a high-speed Renfe, iryo or Ouigo train to Madrid Atocha Station.

How fast is the train from Barcelona to Madrid

To make the 503 kilometres direct train ride from Barcelona to Madrid in 2 hours 29 minutes, a high-speed train travels at a speed of roughly 310 km/h (193 mph).

Is there a Barcelona to Madrid night train?

There is no night train along the route. Because of the relatively short trip duration, there really is no need for a night train Barcelona to Madrid service.

How much are ticket prices?

Ticket prices vary by fare class, operator, advanced booking and popularity of the service. Our current live estimates for train ticket cost from Barcelona to Madrid are as follows:

  • Cheapest ticket on the route: US$6.50

  • Average cost of a ticket on this route if you book 30 days in advance: US$83

  • Average cost of a ticket on this route if you book 7 days in advance: US$58

What tips do you have for booking and boarding?

  • Book in advance, preferably 7-30 days in advance for the best train from Barcelona to Madrid in terms of availability and pricing.

  • Arrive at the station roughly 30 minutes before departure to give yourself time to find the platform and pass any security screening.

  • Pay attention to the luggage allowances of your class of service and make sure you adhere to them.

  • Make any arrangements in advance needed for pets, large luggage or disabled travelers.

Is the train from Barcelona to Madrid scenic?

The train ride from Barcelona to Madrid across the Spanish plateau is not particularly scenic. The arid terrain, dotted with villages, agricultural land and industrial towns, is an interesting glimpse into another side of Spanish life, but it doesn't have the breathtaking grandeur of the Swiss Alps or the Italian countryside. Still, watching the terrain go by is not a bad way to spend some time.

Specific travel features and services

  • Comfortable seats with plenty of legroom and the ability to recline.

  • Onboard meal service, ranging from cold bistro meals to gourmet depending on the operator and class of service.

  • Electrical outlets at seats.

  • On-board Wi-Fi.

  • Luggage storage, including optional space for extra-large luggage.

  • Itinerary information in every car on digital displays.

  • Pet accommodations.

  • Clean and modern train facilities.

  • Security and safety