AirOrSeaTravel is an independent guide. Bookings on this page are completed on the provider’s own website. How we are funded.

AirOrSeaTravel — find your way there
MadridBarcelona

Madrid to Barcelona by train

Barcelona lies 504 km (313 mi) east of Madrid, in the same time zone. What the numbers say about getting there.

By rail the journey is about 3 h 13 min at the speeds typical of Spain rail, over roughly 615 km (382 mi) of track; the operator’s timetable is the number that counts.

MadridBarcelona

Open Barcelona in Google Maps

The two ends, side by side
MadridBarcelona
CountrySpainSpain
Population3.3 million1.7 million
Elevation665 m (2,182 ft)47 m (154 ft)
Time nowUTC+2 (Europe/Madrid)UTC+2 (Europe/Madrid)
Stations on recordnone listednone listed
Postal codes04810–2808708001–08080

Where to book trains from Madrid to Barcelona

OmioCompares trains, buses and some flights across European operators in one search.Explore train options on Omio (opens www.omio.com in a new tab)
TrainlineStrong UK and European rail coverage, including split-ticket options in Britain.Check rail fares on Trainline (opens www.thetrainline.com in a new tab)
Deutsche BahnSells its own tickets plus Trenitalia, SBB, SNCF, OeBB, Eurostar and SJ, so most multi-country journeys price end to end here.Plan a cross-border route on Deutsche Bahn (opens int.bahn.de in a new tab)
Rail EuropePasses and point-to-point tickets sold in USD, which suits some US travellers.Book European rail on Rail Europe (opens www.raileurope.com in a new tab)
Every link above leaves this site.

We take no bookings for these providers and hold no reservation with them. The provider you choose handles payment, confirmation, changes and refunds. How that works.

Staying in Barcelona

Our booking partner lists 3,733+ places to stay in Barcelona (statistics below are from the first 1,000). Of the 889 with a star rating, the largest group is 4-star (470), and 51 are five-star. Across 914 properties with at least 50 reviews, the average guest score is 8.5 out of 10. Guests have left 2,110,769 reviews in total.

Book a hotel in Barcelona

Live rooms and prices from our booking partner, booked and paid for here. Free cancellation is marked where it applies.

Common questions

How far is Barcelona from Madrid?

504 km (313 mi) in a straight line, east of Madrid; by road roughly 615 km (382 mi).

How long does it take to get from Madrid to Barcelona by train?

About 3 h 13 min, estimated from distance and typical speeds. Timetables and traffic decide the real figure.

Is there a time difference between Madrid and Barcelona?

No, both are on Europe/Madrid at the moment.

Where can I stay in Barcelona?

Our booking partner lists 3,733+ places to stay in Barcelona, bookable on this site.

Where these facts come from

  • GeoNames (CC BY 4.0): population, elevation, time zone, postal codes
  • Wikidata (CC0): area, sister cities, visitor numbers, heritage listings, stations and ports
  • OurAirports (public domain): airports, runways
  • Natural Earth (public domain): map outlines

Data compiled 13 September 2026. Hotel figures are from our booking partner’s catalogue on that date. Journey times on this page are estimates from distance, not timetables; check the operator before you rely on one.