Madrid to Málaga distance
Madrid and Málaga are 415 km (258 mi) apart in a straight line and 535 km (332 mi) apart by road: about 6 hr 5 min of driving without stops, mostly on the A-4 and the A-44. 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
- 535 km (332 mi)
- Driving time
- 6 hr 5 min
- Straight line
- 415 km (258 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 October 31, 2026; simplified line.
The figures
| Figure | Value |
|---|---|
| Straight line | 415 km (258 mi) geodesic on the WGS84 ellipsoid |
| By road | 535 km (332 mi) fastest driving route (OSRM) |
| Driving time | 6 hr 5 min no stops, no traffic |
| Road detour | +29% 1.29 times the straight line |
| Average speed | 88 km/h (55 mph) along the route, without stops |
| Bearing | 189° (south) leaving Madrid toward Málaga |
| Midpoint | 38.5705° N, 4.0627° W in Mestanza (Ciudad Real) |
| Halfway by road | In La Carolina (Jaén) 267 km from each city by road |
| Time difference | None both share the same time |
| Elevation | Madrid: 645 m (2,116 ft) · Málaga: 6 m (20 ft) IGN (Spain) |
| Population | Madrid: 3,506,730 · Málaga: 599,063 INE population register, January 1, 2025 |
Madrid to Málaga by road
The fastest driving route is 535 km (332 mi) long and takes about 6 hr 5 min without stops or traffic. It runs mostly on the A-4 (282 km), the A-44 (115 km), and the A-92 (89.0 km).
It goes through 3 autonomous communities: the Community of Madrid (42.9 km), Castilla–La Mancha (204 km), and Andalusia (287 km). That’s an average of 88 km/h (55 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 5 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 Málaga are 415 km (258 mi) apart. That’s the geodesic on the WGS84 ellipsoid, the distance “as the crow flies”.
The road is 29% longer: for every 100 km in a straight line you drive 129. That’s a normal detour between two cities. Of the 120 Spanish driving pairs in this series, it ranks 34th for detour (the average is 24%).
From Madrid, Málaga lies to the south (bearing 189°), and from Málaga, Madrid lies to the north.
Halfway between Madrid and Málaga
Halfway along the straight line, 208 km (129 mi) from each city, is the point 38.5705° N, 4.0627° W. It falls in Mestanza (Ciudad Real, pop. 634). The nearest town of 20,000 people or more is Puertollano (Ciudad Real, pop. 45,565), 13.6 km away.
By road, the halfway point is 267 km (166 mi) from each city, in La Carolina (Jaén, pop. 14,677). The nearest town of 20,000 people or more is Linares (Jaén, pop. 55,633), 19.2 km away. The two midpoints are 51.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
Madrid sits at 645 m (2,116 ft) and Málaga at 6 m (20 ft), 639 m (2,096 ft) lower.
Madrid has 3.5 million people and Málaga 599,063 people (INE population register, January 1, 2025).
Frequently asked questions
How many kilometers is it from Madrid to Málaga?
415 km (258 mi) in a straight line and 535 km (332 mi) by road on the fastest route (mostly on the A-4 and the A-44).
How long is the drive from Madrid to Málaga?
About 6 hr 5 min without stops or traffic, according to OSRM with OpenStreetMap data; with 3 stops of 20 minutes, about 7 hr 5 min.
Where is the halfway point between Madrid and Málaga?
In a straight line, in Mestanza (Ciudad Real). By road, 267 km from each city, in La Carolina (Jaén).
Which city is higher, Madrid or Málaga?
Madrid, at 645 m (2,116 ft); Málaga sits at 6 m (20 ft).
Which direction is Málaga from Madrid?
South: the straight line leaves Madrid on a bearing of 189° (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.
- Madrid to Marbella 446 km straight line · 583 km by road · 6 hr 35 min Marbella, 48.1 km from Málaga
- Madrid to Granada 360 km straight line · 420 km by road · 4 hr 45 min Granada, 88.5 km from Málaga
- Madrid to Jaén 295 km straight line · 334 km by road · 3 hr 50 min Jaén, 128 km from Málaga
- Madrid to Córdoba 296 km straight line · 394 km by road · 4 hr 30 min Córdoba, 133 km from Málaga
More distances from Madrid
All distances- Madrid to Bilbao 322 km straight line · 397 km by road · 4 hr 25 min
- Madrid to Alicante 360 km straight line · 420 km by road · 4 hr 35 min
- Madrid to A Coruña 510 km straight line · 593 km by road · 6 hr 30 min
- Madrid to Salamanca 177 km straight line · 216 km by road · 2 hr 35 min
- Madrid to Toledo 68.6 km straight line · 74.7 km by road · 1 hr
- Madrid to Valladolid 162 km straight line · 190 km by road · 2 hr 30 min
More distances from Málaga
- Seville to Málaga 159 km straight line · 214 km by road · 2 hr 40 min
- Málaga to Granada 88.5 km straight line · 128 km by road · 1 hr 40 min
- Barcelona to Málaga 770 km straight line · 965 km by road · 10 hr 50 min
- Valencia to Málaga 467 km straight line · 606 km by road · 6 hr 50 min
- Málaga to Córdoba 133 km straight line · 160 km by road · 2 hr
- Málaga to Cádiz 169 km straight line · 235 km by road · 2 hr 55 min
Sources
- Driving route: FOSSGIS OSRM, car profile (calculated on October 31, 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