Autonomous communities of Spain by GDP (euros)

Community of Madrid had the highest GDP (euros) of 19 autonomous communities in 2021, at €239.84 billion. Melilla had the lowest, at €1.53 billion. The median was €38.78 billion and the figure for Spain was €1.24 trillion. Source: the Instituto Nacional de Estadística.

Highest239,838Community of Madrid
Lowest1,534Melilla
Median38,78219 autonomous communities
Spain1,235,474History

All autonomous communities, 2021

CSVChart (SVG)

Community of MadridCommunity of Madrid: 239,838 EUR million239,838CataloniaCatalonia: 234,820 EUR million234,820AndalusiaAndalusia: 166,296 EUR million166,296Valencian CommunityValencian Community: 116,387 EUR million116,387Basque CountryBasque Country: 72,513 EUR million72,513GaliciaGalicia: 64,387 EUR million64,387Castile and LeónCastile and León: 59,466 EUR million59,466Castilla-La ManchaCastilla-La Mancha: 44,124 EUR million44,124Canary IslandsCanary Islands: 41,407 EUR million41,407AragonAragon: 38,782 EUR million38,782Region of MurciaRegion of Murcia: 33,604 EUR million33,604Balearic IslandsBalearic Islands: 30,512 EUR million30,512AsturiasAsturias: 23,618 EUR million23,618ExtremaduraExtremadura: 21,552 EUR million21,552NavarreNavarre: 20,821 EUR million20,821CantabriaCantabria: 14,207 EUR million14,207La RiojaLa Rioja: 8,736 EUR million8,736CeutaCeuta: 1,634 EUR million1,634MelillaMelilla: 1,534 EUR million1,534
EUR million. Source: INE. Retrieved 2026-10-07.

Full ranking

RankAutonomous communities2021
EUR million
Change on 2020
1Community of Madrid239,838+8.5%
2Catalonia234,820+9.3%
3Andalusia166,296+10.5%
4Valencian Community116,387+9.7%
5Basque Country72,513+8.8%
6Galicia64,387+9.1%
7Castile and León59,466+8.5%
8Castilla-La Mancha44,124+9.6%
9Canary Islands41,407+10.2%
10Aragon38,782+7.9%
11Region of Murcia33,604+10.4%
12Balearic Islands30,512+14.4%
13Asturias23,618+10.5%
14Extremadura21,552+10.5%
15Navarre20,821+8.7%
16Cantabria14,207+9.4%
17La Rioja8,736+6.7%
18Ceuta1,634+6.4%
19Melilla1,534+5.7%

Other periods

About this ranking

GDP at current market prices, EUR million.

In euros, for Spain and the EU. For the United States, its states and counties, and for other countries and the World, use gdp_usd.

Every value in the ranking comes from the same publisher and the same period, so the autonomous communities are compared on one definition. Equal values share a rank.

How to cite

Instituto Nacional de Estadística (INE). Contabilidad regional de España: PIB a precios de mercado (tabla 82284). https://www.ine.es/jaxiT3/Tabla.htm?t=82284. Retrieved 2026-10-07.

Use this data in your AI agent

Invokely serves this figure to AI assistants through MCP and to code through a REST API, with the source and citation attached. Ask your assistant:

Rank Autonomous communities of Spain by GDP (euros) using official data, and cite the source.
rank_places {"indicator":"gdp","level":"region","within":"Spain","limit":10}
GET https://invokely.ai/api/v1/rank?indicator=gdp&level=region&within=Spain&limit=10

Connect Claude, ChatGPT or Cursor in one step. The trial answers 25 calls a day without an account.

Questions

Which autonomous community has the highest GDP (euros)?

Community of Madrid, with €239.84 billion in 2021, according to the Instituto Nacional de Estadística.

Which autonomous community has the lowest GDP (euros)?

Melilla, with €1.53 billion in 2021.

Where does this ranking come from?

Every value comes from one source and one period, so the places are comparable: Instituto Nacional de Estadística, Contabilidad regional de España: PIB a precios de mercado (tabla 82284). Retrieved 2026-10-07.

Gross domestic product (GDP): other rankings

Autonomous communities of Spain: more rankings