About Rail.Ninja
Rail Ninja is a reservation service for booking train tickets online. It is not a rail carrier, does not own or operate any trains, and does not represent an official website of any railway company. It is a commercial business that makes it easier for you to book train tickets online.
Barcelona to Madrid Train Timetable
Barcelona to Madrid Train Information

The charming Spanish capital, Madrid, and the popular Catalonian gem, Barcelona, are surely worth seeing at least once in a lifetime. Taking a well-equipped high speed Barcelona to Madrid train is certainly a great and comfortable option — the fastest train completes the journey in just 2 hours and 30 minutes. The high speed line covers a distance of 621 km (386 miles) at speeds of up to 310 km/h with over 37 direct trips daily. The first train departs Barcelona Sants at 5:40 AM and the last train leaves at 9:15 PM. Below you can find out more about travel from Barcelona to Madrid, the route, and the trains. Or enhance your experience with the innovative trip planner — let your imagination go wild with the Spain itinerary builder and mix the amazing sights of both cities into one incredible trip! Both Barcelona and Madrid are connected by the most popular trains in Spain — the Barcelona to Madrid corridor is the busiest long distance route in the country.
Three train companies run services on this route. Renfe's AVE trains are the most frequent with 20+ daily departures — AVE tickets start from €17.05 in standard class. Iryo trains offer high quality full service travel reaching speeds up to 360 km/h — a premium fare option with at seat meal service. Ouigo is a low cost operator with ticket prices starting from just €9 — the cheapest prices available on the Madrid run. All trains have free WiFi, power sockets, air conditioning, and comfortable seats. AVE trains feature a cafe-bar serving hot and cold drinks and soft drinks. Iryo offers at seat service with cold drinks and meals. Ouigo features an upper deck seat area with a spacious cafe-bar. Tickets go on sale 90 days before departure — book 2 to 3 months in advance for the lowest fares. The Barcelona route from Madrid Atocha to Barcelona Sants is equally popular in the reverse direction — check train times and book train tickets for both directions on Rail Ninja for the best available fares.

Popular questions about Barcelona to Madrid Trains
How far is Barcelona from Madrid?
The distance from Barcelona to Madrid is 621 km (386 miles) along the high speed line. Taking a train from Barcelona to Madrid has proven more time efficient than flying when city centre to city centre travel time is factored in — both Barcelona Sants Station and Madrid Puerta de Atocha are in the city centre with no airport transfers needed.
Are there Direct Train Services on the Barcelona to Madrid Route?
Yes — direct trains run approximately 37 times per day with no changes required. Both Barcelona and Madrid run frequent services throughout the day. High speed trains from Barcelona to Madrid arrive at either Madrid Puerta de Atocha or Madrid Chamartín. The direct train is the most popular choice among travelers for its onboard comfort and convenience.
What are the AVE Trains on this Route?
AVE trains operated by Renfe are the flagship high speed train on the Barcelona to Madrid route, reaching speeds of 310 km/h. Standard class (Turista) offers comfortable seats, free WiFi, power outlets, and air conditioning. First class (Preferente) is more spacious with fewer passengers per car. Renfe's Premium fare includes a full meal, wine, and at seat service. You can read more about the seat classes here: AVE high-speed train. Alvia trains and Euromed trains also serve some long distance routes connecting Barcelona with other Spanish cities beyond Madrid. Avlo trains — Renfe's former low cost brand — no longer run on the Barcelona to Madrid route as of late 2025, with Ouigo now filling the low cost gap. The Elige fare gives only you the flexibility to change your ticket for a small fee without paying the full fixed price of a flexible ticket.
What are Ouigo Trains and How Cheap are They?
Ouigo trains are the low cost option on this corridor with ticket prices from €9 — the cheapest prices available. Ouigo tickets include free WiFi and power sockets but have strict hand luggage limits. Larger bags require an additional fee. Ouigo features an upper deck seat and a spacious cafe-bar. Ouigo tickets are non-refundable — book only when your travel dates are confirmed.
What Onboard Services do Iryo Trains Offer?
Iryo trains offer high quality onboard services on the Barcelona to Madrid route since 2022. Iryo reaches speeds up to 360 km/h and offers Inicial class, Sí class, and Infinita Bistró class with at seat meal service. All Iryo trains have free WiFi, power sockets, comfortable seats, and cold drinks available. The Elige fare on Renfe and similar flexible options on Iryo allow changes for a small fee. Iryo trains also offer an onboard entertainment portal with TV series and movies available on personal devices via the free WiFi connection throughout the journey.
How Long Does the Madrid Run Take?
The average journey time is around 3 hours and 2 minutes. The fastest train takes 2 hours and 30 minutes. Journey times vary from 2.5 to 3.5 hours depending on the service and train company. Arrive at Barcelona Sants Station at least 20 to 30 minutes before departure — AVE trains require security checks and ticket scanning at the boarding gates. Journey start from Barcelona Sants is smooth and straightforward — Renfe trains depart from platforms 1-15 on the high speed side of the station.
What is the First Train and Last Train of the Day?
The first train departs Barcelona Sants at 5:40 AM. The last train leaves at 9:15 PM. The train schedule offers practically hourly departures — over 10 options on any given day. Peak business travel windows run from 6:00 AM to 10:00 AM and 3:00 PM to 7:00 PM, with higher ticket prices during these times.
What Standard Class and First Class Options are Available?
If you plan to take the high speed AVE Barcelona to Madrid train, you have several classes to choose from: Standard class (Turista), First class (Preferente), and Premium fare with full at seat service. All cars are air conditioned, modern, and have comfortable seats. First class cars are more spacious with fewer passengers. Iryo's Inicial class is the entry level budget option. Small pets and guide dogs are permitted on all services — small pets may require an additional fee depending on the operator.
When to Buy Tickets — Now or in Advance?
When it comes to buying cheap train tickets from Barcelona to Madrid, the smartest way is "the earlier the better." Renfe trains, Iryo, and Ouigo all offer discounted fares when booked in advance — a standard train ticket on AVE starts from €17 for standard class and from €9 on Ouigo." On Rail Ninja you can book tickets for departures up to 2 years in advance. Cheapest tickets start from €20.55 when booked early — avoid booking on the day to prevent higher rates. Ticket prices start from around €9 for Ouigo and €17 for AVE when booked well ahead.
Do You Need a Seat Reservation?
Seat reservation is included in the ticket for all AVE, Iryo, and Ouigo services. When booking your ticket you may indicate your preferred seat choice — window or aisle — and the best available option will be assigned. Your assigned seat and seat number will be displayed on the ticket. Upper deck seats on Ouigo can also be selected during booking for no extra fees.

Trains on Barcelona - Madrid route
One platform, 34+ destinations, 700+ routes around the globe.
We speak your language and offer over 20 payment methods.
Read authentic Rail Ninja reviews and see what our travelers say about us.
You can conveniently book train tickets for up to a year in advance!
Need a hand? Contact our customer support before or during your trip.




