Skip to content
Distance between cities

Madrid to Huesca distance

Madrid and Huesca are 335 km (208 mi) apart in a straight line and 384 km (238 mi) apart by road: about 4 hr 15 min of driving without stops, mostly on the A-2 and the A-23. 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 Madrid to Huesca: the straight line and the driving route
By road
384 km (238 mi)
Driving time
4 hr 15 min
Straight line
335 km (208 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 335 km (208 mi) geodesic on the WGS84 ellipsoid
By road 384 km (238 mi) fastest driving route (OSRM)
Driving time 4 hr 15 min no stops, no traffic
Road detour +15% 1.15 times the straight line
Average speed 90 km/h (56 mph) along the route, without stops
Bearing 54° (northeast) leaving Madrid toward Huesca
Midpoint 41.2916° N, 2.0721° W near Ariza (Zaragoza)
Halfway by road In Ariza (Zaragoza) 192 km from each city by road
Time difference None both share the same time
Elevation Madrid: 645 m (2,116 ft) · Huesca: 487 m (1,598 ft) IGN (Spain)
Population Madrid: 3,506,730 · Huesca: 55,454 INE population register, January 1, 2025

Madrid to Huesca by road

The fastest driving route is 384 km (238 mi) long and takes about 4 hr 15 min without stops or traffic. It runs mostly on the A-2 (299 km) and the A-23 (61.2 km).

It goes through 4 autonomous communities: the Community of Madrid (40.4 km), Castilla–La Mancha (99.4 km), Castile and León (39.7 km), and Aragon (204 km). That’s an average of 90 km/h (56 mph). Spain’s traffic authority (DGT) recommends a break every two hours or 200 km: with 2 stops of 20 minutes, the trip takes about 4 hr 55 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, Madrid and Huesca are 335 km (208 mi) apart. That’s the geodesic on the WGS84 ellipsoid, the distance “as the crow flies”.

The road is 15% longer: for every 100 km in a straight line you drive 115. That’s a normal detour between two cities. Of the 120 Spanish driving pairs in this series, it ranks 106th for detour (the average is 24%).

From Madrid, Huesca lies to the northeast (bearing 54°), and from Huesca, Madrid lies to the southwest. The straight line reaches Huesca on a bearing of 56°: 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 Madrid and Huesca

Halfway along the straight line, 167 km (104 mi) from each city, is the point 41.2916° N, 2.0721° W. It falls near Ariza (Zaragoza, pop. 1,096), 2.5 km away. The nearest town of 20,000 people or more is Calatayud (Zaragoza, pop. 20,158), 36.7 km away.

By road, the halfway point is 192 km (119 mi) from each city, in Ariza (Zaragoza, pop. 1,096). The nearest town of 20,000 people or more is Calatayud (Zaragoza, pop. 20,158), 33.6 km away. The two midpoints almost coincide (3.7 km apart), because the road doesn’t stray far from the straight line.

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

Madrid sits at 645 m (2,116 ft) and Huesca at 487 m (1,598 ft), 158 m (518 ft) lower.

Madrid has 3.5 million people and Huesca 55,454 people (INE population register, January 1, 2025).

Frequently asked questions

How many kilometers is it from Madrid to Huesca?

335 km (208 mi) in a straight line and 384 km (238 mi) by road on the fastest route (mostly on the A-2 and the A-23).

How long is the drive from Madrid to Huesca?

About 4 hr 15 min without stops or traffic, according to OSRM with OpenStreetMap data; with 2 stops of 20 minutes, about 4 hr 55 min.

Where is the halfway point between Madrid and Huesca?

In a straight line, near Ariza (Zaragoza). By road, 192 km from each city, in Ariza (Zaragoza).

Which city is higher, Madrid or Huesca?

Madrid, at 645 m (2,116 ft); Huesca sits at 487 m (1,598 ft).

Which direction is Huesca from Madrid?

Northeast: the straight line leaves Madrid on a bearing of 54° (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 Madrid

All distances

More distances from Huesca

Sources