Barcelona to San Sebastián distance
Barcelona and San Sebastián are 405 km (252 mi) apart in a straight line and 517 km (321 mi) apart by road: about 6 hr 20 min of driving without stops, mostly on the A-2 and the A-22. Below you’ll find the route map, both halfway points, the bearing and where every figure comes from.
By the All Map Tools Team
- By road
- 517 km (321 mi)
- Driving time
- 6 hr 20 min
- Straight line
- 405 km (252 mi)
- Driving route
- Straight line
- Straight-line midpoint
- Halfway by road
Lambert azimuthal equal-area projection centered on the midpoint. Route: FOSSGIS OSRM with data © OpenStreetMap contributors, calculated on November 1, 2026; simplified line.
The figures
| Figure | Value |
|---|---|
| Straight line | 405 km (252 mi) geodesic on the WGS84 ellipsoid |
| By road | 517 km (321 mi) fastest driving route (OSRM) |
| Driving time | 6 hr 20 min no stops, no traffic |
| Road detour | +28% 1.28 times the straight line |
| Average speed | 82 km/h (51 mph) along the route, without stops |
| Bearing | 304° (northwest) leaving Barcelona toward San Sebastián |
| Midpoint | 42.3709° N, 0.1279° E near Aínsa-Sobrarbe (Huesca) |
| Halfway by road | In Siétamo (Huesca) 258 km from each city by road |
| Time difference | None both share the same time |
| Elevation | Barcelona: 13 m (43 ft) · San Sebastián: 8 m (26 ft) IGN (Spain) |
| Population | Barcelona: 1,731,649 · San Sebastián: 189,866 INE population register, January 1, 2025 |
Barcelona to San Sebastián by road
The fastest driving route is 517 km (321 mi) long and takes about 6 hr 20 min without stops or traffic. It runs mostly on the A-2 (109 km), the A-22 (106 km), and the A-15 (69.8 km).
It goes through 4 autonomous communities: Catalonia (184 km), Aragon (195 km), Navarre (103 km), and the Basque Country (35.2 km). That’s an average of 82 km/h (51 mph). Spain’s traffic authority (DGT) recommends a break every two hours or 200 km: with 3 stops of 20 minutes, the trip takes about 7 hr 20 min. The time is OSRM’s estimate with OpenStreetMap data: no traffic and speeds somewhat below the limits, so real trips can differ.
Straight-line distance and bearing
In a straight line, the shortest distance over the Earth’s surface, Barcelona and San Sebastián are 405 km (252 mi) apart. That’s the geodesic on the WGS84 ellipsoid, the distance “as the crow flies”.
The road is 28% longer: for every 100 km in a straight line you drive 128. That’s a normal detour between two cities. Of the 120 Spanish driving pairs in this series, it ranks 39th for detour (the average is 24%).
From Barcelona, San Sebastián lies to the northwest (bearing 304°), and from San Sebastián, Barcelona lies to the southeast. The straight line reaches San Sebastián on a bearing of 301°: on a sphere the bearing keeps changing along the way, which is why the shortest route looks slightly curved on a flat map.
Halfway between Barcelona and San Sebastián
Halfway along the straight line, 202 km (126 mi) from each city, is the point 42.3709° N, 0.1279° E. It falls near Aínsa-Sobrarbe (Huesca, pop. 2,335), 5.2 km away. The nearest town of 20,000 people or more is Huesca (pop. 55,454), 51.2 km away.
By road, the halfway point is 258 km (161 mi) from each city, in Siétamo (Huesca, pop. 697). The nearest town of 20,000 people or more is Huesca (pop. 55,454), 10.2 km away. The two midpoints are 44.7 km apart: if you want to meet halfway, the one on the road is the useful one.
By plane
No flight time is given: under 500 km (311 miles) in a straight line, time at the airport outweighs time in the air.
The two cities
Barcelona and San Sebastián sit at almost the same elevation: 13 m (43 ft) and 8 m (26 ft).
Barcelona has 1.7 million people and San Sebastián 189,866 people (INE population register, January 1, 2025).
Frequently asked questions
How many kilometers is it from Barcelona to San Sebastián?
405 km (252 mi) in a straight line and 517 km (321 mi) by road on the fastest route (mostly on the A-2 and the A-22).
How long is the drive from Barcelona to San Sebastián?
About 6 hr 20 min without stops or traffic, according to OSRM with OpenStreetMap data; with 3 stops of 20 minutes, about 7 hr 20 min.
Where is the halfway point between Barcelona and San Sebastián?
In a straight line, near Aínsa-Sobrarbe (Huesca). By road, 258 km from each city, in Siétamo (Huesca).
Which direction is San Sebastián from Barcelona?
Northwest: the straight line leaves Barcelona on a bearing of 304° (0° is north and 90° is east).
Measure it yourself on the map
The same two cities, already set up in the tools: move the points, get the route by bike or on foot and download the map.
- Distance between two points Measure the distance between any two places or points on the map, in miles or kilometers.
- Straight line vs driving distance Compare the as-the-crow-flies distance with the real driving distance and see how much the road adds.
- Halfway point Find the exact halfway point between two places and see it on the map, ready to share.
Similar pairs
The ones in this series whose cities are closest to these two, in case another one suits you better.
- Barcelona to Pamplona 354 km straight line · 431 km by road · 5 hr 20 min Pamplona, 62.4 km from San Sebastián
- Barcelona to Bilbao 469 km straight line · 610 km by road · 6 hr 40 min Bilbao, 76.4 km from San Sebastián
- Barcelona to Santander 544 km straight line · 707 km by road · 7 hr 45 min Santander, 149 km from San Sebastián
- Barcelona to Zaragoza 257 km straight line · 311 km by road · 3 hr 30 min Zaragoza, 206 km from San Sebastián
More distances from Barcelona
All distances- Barcelona to Castellón 243 km straight line · 280 km by road · 3 hr 20 min
- Barcelona to Palma de Mallorca 205 km straight line · 45 min flight
- Barcelona to Ibiza 282 km straight line · 50 min flight
- Barcelona to Rome 862 km straight line · 1,360 km by road · 14 hr 45 min
- Barcelona to Milan 726 km straight line · 983 km by road · 10 hr 45 min
- Barcelona to Marseille 339 km straight line · 506 km by road · 5 hr 30 min
More distances from San Sebastián
- San Sebastián to Pamplona 62.4 km straight line · 83.0 km by road · 1 hr 10 min
- San Sebastián to Biarritz 39.0 km straight line · 49.1 km by road · 40 min
- Madrid to San Sebastián 352 km straight line · 452 km by road · 5 hr 5 min
- Bilbao to San Sebastián 76.4 km straight line · 103 km by road · 1 hr 20 min
Sources
- Driving route: FOSSGIS OSRM, car profile (calculated on November 1, 2026) · FOSSGIS e.V.
- Roads, streets and places · © OpenStreetMap contributors (ODbL)
- Straight line, bearings and midpoint (geodesics on the WGS84 ellipsoid) · GeographicLib (C. F. F. Karney)
- Location and elevation of Spanish cities (gazetteer and DEM) · Instituto Geográfico Nacional (CC BY 4.0)
- Population register, January 1, 2025 · INE (Spain)
- Places near the midpoints: All Map Tools gazetteer (GeoNames, INE, IGN and Census) · All Map Tools
- Time zones (timezone-boundary-builder outlines and the IANA database) · © OpenStreetMap contributors (ODbL)
- Map: provinces (IGN), states (US Census Bureau) and countries (Natural Earth) · IGN, Census and Natural Earth
- Methodology