How far am I from the Spanish border?
Spain shares land borders with Morocco, France, Portugal, Gibraltar and Andorra. Use your location to measure the straight-line distance from where you are to the nearest point of Spain, or see below how far major cities on both sides of the border are.
How far are you from Spain?
On a phone this uses GPS. The calculator opens with Spain already selected and measures from your exact spot.
Spain's neighbours
Spain is shown in green, and the 5 countries it shares a land border with in blue.
- Spain
- Land neighbours
Which countries border Spain? See every neighbour and the countries two borders away
How far major cities are from Spain
| City | Country | To Spain |
|---|---|---|
| Gibraltar | Gibraltar | 1.1 km (0.7 miles) |
| Andorra la Vella | Andorra | 4.4 km (2.7 miles) |
| les Escaldes | Andorra | 5.5 km (3.4 miles) |
| Porto | Portugal | 83 km (52 miles) |
| Lisbon | Portugal | 161 km (100 miles) |
| Marseille | France | 200 km (125 miles) |
| Rabat | Morocco | 247 km (153 miles) |
| Casablanca | Morocco | 322 km (200 miles) |
| Paris | France | 678 km (421 miles) |
How far Spain's cities are from its borders
Straight-line distance from each city centre to the nearest point of the other country, measured October 8, 2026.
Questions
How far am I from the Spanish border?
Tap "Use my location" on this page. On a phone it uses GPS, and the calculator measures the straight-line distance from where you are to the nearest point of Spain, in miles and kilometers.
Which countries border Spain?
Spain shares land borders with Morocco, France, Portugal, Gibraltar and Andorra.
Is this the distance to a border crossing?
No. It is the straight-line distance to the nearest point on the border line itself. The nearest official crossing can be much farther away by road.
Does it measure across water?
Yes. It measures to the nearest point of Spain's territory. From most places that is the land border, but from somewhere across a sea or a lake it can be Spain's coast.
Which big city is closest to Spain?
Of the cities measured here, Gibraltar in Gibraltar is the closest: 1.1 km (0.7 miles) from Spain in a straight line.