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
BarcelonaMadrid

Barcelona to Madrid by train

Madrid lies 504 km (313 mi) west of Barcelona, 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.

BarcelonaMadrid

Open Madrid in Google Maps

The two ends, side by side
BarcelonaMadrid
CountrySpainSpain
Population1.7 million3.3 million
Elevation47 m (154 ft)665 m (2,182 ft)
Time nowUTC+2 (Europe/Madrid)UTC+2 (Europe/Madrid)
Stations on recordnone listednone listed
Postal codes08001–0808004810–28087

Where to book trains from Barcelona to Madrid

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 Madrid

Our booking partner lists 6,042+ places to stay in Madrid (statistics below are from the first 1,000). Of the 853 with a star rating, the largest group is 4-star (364), and 41 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,646,164 reviews in total.

Book a hotel in Madrid

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 Madrid from Barcelona?

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

How long does it take to get from Barcelona to Madrid 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 Barcelona and Madrid?

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

Where can I stay in Madrid?

Our booking partner lists 6,042+ places to stay in Madrid, 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.