How it works Try a lens The library Explore Get started FAQ Download on the App Store →

COUNTRIES

Spain: map, flag, capital and key facts

Spain is a country in Europe, with about 49.4 million people (2025) and an area of 505,976 square kilometres. Its capital is Madrid, and it shares land borders with 3 countries.

Flag of Spain
Flag of Spain
Map showing where the country sits among its neighbours
Spain in solid, land neighbours outlined, capital marked.

Key facts about Spain

CapitalMadrid
ContinentEurope
Population49,355,143 2025, World Bank. 32nd of 195.
Area505,976 km² (195,358 sq mi) World Bank, surface area. 53rd largest of 195.
Population density98 people per km²
Land neighbours3: Andorra, France, Portugal
Official nameKingdom of Spain
UN statusMember state
Capital coordinates40.40° N, 3.69° W Madrid, Natural Earth.

Land neighbours

Spain borders 3 countries on land. Each links to its own page.

From the Geography app

The app teaches each country through short hand written lenses: PLACE for physical geography, STORY for history and identity, NOW for the news, and THREAD for the ties between countries. Here is one of Spain's 17, in full.

PLACELens 1 of 17

Spain is Europe's gate to Africa and the Atlantic

The Iberian Peninsula hangs at Europe's southwestern corner, separated from Africa by the Strait of Gibraltar, just 14 kilometers of water. Spain faces both the Mediterranean and the Atlantic, which historically made it a departure point for global empire and today makes it a landing point for migration. Its interior is a high, dry plateau (the Meseta) that concentrates population on the coasts and in Madrid.

More on Strait of Gibraltar

At its narrowest point, only 14 km separate Spain from Morocco. This chokepoint controls access between the Atlantic and the Mediterranean and has been strategically contested for centuries.

16 more lenses on Spain in the app

  • STORY Spain's regions pull in different directions
  • NOW Spain's housing crisis has become a political emergency
  • NOW Renewables and growth make Spain an unexpected European success story
  • THREAD Spain's colonial legacy built a linguistic sphere of half a billion people
  • PLACE A peninsula of regions
  • STORY The age of tiki-taka
  • NOW European champions who came home world champions
  • THREAD Spain across the ocean
  • PLACE Three clubs, three identities
  • STORY The school that built a team
  • NOW The league behind the world champions
  • THREAD When the ball came home
  • PLACE Spanish islands nearer Africa than to Spain
  • STORY The translators who handed Europe its books
  • THREAD An electrical island attached to a continent
  • PLACE A sea of plastic in Europe's desert

Titles only. The app brings each lens back on a spaced repetition schedule set by how well you knew it: New, Hazy or Clear.

Compare Spain with another country

Opens the country comparison tool with population, area, income and more side by side, every figure dated.

Common questions

What is the capital of Spain?
The capital of Spain is Madrid. Madrid lies at about 40.4 degrees north and 3.7 degrees west. Spain is in Europe. It is home to about 49.4 million people. The world capitals quiz on this site tests every capital, and the printable capitals sheets cover each continent.
What is the population of Spain?
About 49.4 million people live in Spain, according to the World Bank figures for 2025. That makes it the 32nd most populous of the 195 countries. With an area of 505,976 square kilometres, that is about 98 people per square kilometre.
What countries border Spain?
Spain shares land borders with 3 countries: Andorra, France and Portugal. The map on this page outlines each of them around Spain. The count includes only borders on land, not neighbours across a sea or a lake. Borders here follow Natural Earth at the 1:50 million scale, with Crimea shown as part of Ukraine and Western Sahara as a separate territory.
How big is Spain?
Spain covers 505,976 square kilometres, or about 195,358 square miles. That makes it the 53rd largest of the 195 countries. The figure is total surface area, which includes inland water such as lakes and rivers. Its population of about 49.4 million gives a density of 98 people per square kilometre.

Keep exploring