Distance from Barcelona to Madrid
Straight line
By road
Travel time
Direction
Open in the calculator (stops, directions, fuel cost) → Madrid → Barcelona
How far is Barcelona from Madrid?
Barcelona (Spain) and Madrid (Spain) are a medium distance apart: 505 km in a straight line, that is 314 miles or 273 nautical miles. The distance is measured over the Earth's surface (WGS84 ellipsoid) along the shortest possible path.
By road, Barcelona to Madrid is 617 km (383 miles), about 6 h 50 min by car on the fastest route, without traffic or stops. The road is 22% longer than the straight line.
From Barcelona, Madrid lies to the west (initial bearing 260°). Both cities are in Spain. The halfway point is at 40.9398°, -0.7933°.
A direct flight would take about 1 h 8 min (800 km/h cruise plus take-off and landing). The road distance and driving time are calculated on the map from OpenStreetMap roads.
Other distances from Barcelona
- Barcelona – Sant Martí 5 km
- Barcelona – L'Hospitalet de Llobregat 6 km
- Barcelona – Badalona 10 km
- Barcelona – Sabadell 18 km
- Barcelona – Terrassa 23 km
- Barcelona – Palma 207 km
- Barcelona – Toulouse 253 km
- Barcelona – Zaragoza 255 km
- Barcelona – Montpellier 284 km
Other distances from Madrid
- Madrid – Ciudad Lineal 5 km
- Madrid – Móstoles 17 km
- Madrid – Alcalá de Henares 30 km
- Madrid – Valladolid 162 km
- Madrid – Zaragoza 274 km
- Madrid – Gasteiz / Vitoria 284 km
- Madrid – Córdoba 296 km
- Madrid – Valencia 302 km
- Madrid – Bilbao 323 km
Frequently asked questions
How far is Barcelona from Madrid?
By road it is 617 km (383 miles) from Barcelona to Madrid; in a straight line it is 505 km (314 miles).
How long is the drive from Barcelona to Madrid?
About 6 h 50 min on the fastest route (617 km), without traffic or stops.
In which direction is Madrid from Barcelona?
Madrid is to the west of Barcelona, at an initial bearing of 260°.
How long is the flight from Barcelona to Madrid?
A direct flight would take about 1 h 8 min at an average cruising speed of 800 km/h.
How is the distance calculated?
The straight-line distance is computed on the WGS84 ellipsoid with the Vincenty formula, accurate to the metre. The road distance comes from OpenStreetMap roads.