Skip to content
Distance between cities

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

Map from Barcelona to San Sebastián: the straight line and the driving route
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
Straight line vs driving distance

Lambert azimuthal equal-area projection centered on the midpoint. Route: FOSSGIS OSRM with data © OpenStreetMap contributors, calculated on November 1, 2026; simplified line.

Missing a road? Fix it on OpenStreetMap

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.

Similar pairs

The ones in this series whose cities are closest to these two, in case another one suits you better.

More distances from Barcelona

All distances

More distances from San Sebastián

Sources