Municipalities of Spain by active companies

Madrid had the highest active companies of 6889 municipalities in 2021, at 314,028. Zarapicos had the lowest, at 4. The median was 47 and the figure for Spain was 3.37 million. Source: the Instituto Nacional de Estadística.

Keep it in a collection in your library.
Highest314,028Madrid
Lowest4Zarapicos
Median476889 municipalities
Spain3,366,570History

Top 40 municipalities, 2021

Madrid: 314,028 countMadrid314,028Barcelona: 183,286 countBarcelona183,286València: 67,635 countValència67,635Sevilla: 50,973 countSevilla50,973Zaragoza: 45,019 countZaragoza45,019Málaga: 42,061 countMálaga42,061Palma: 36,114 countPalma36,114Murcia: 33,290 countMurcia33,290Las Palmas de Gran Canaria: 28,522 countLas Palmas de Gran Canaria28,522Alacant/Alicante: 26,991 countAlacant/Alicante26,991Bilbao: 26,110 countBilbao26,110Vigo: 22,603 countVigo22,603Córdoba: 21,984 countCórdoba21,984A Coruña: 19,974 countA Coruña19,974Granada: 19,374 countGranada19,374Valladolid: 19,170 countValladolid19,170Marbella: 19,063 countMarbella19,063Gijón: 17,847 countGijón17,847Elx/Elche: 17,704 countElx/Elche17,704Santa Cruz de Tenerife: 16,157 countSanta Cruz de Tenerife16,157Oviedo: 15,912 countOviedo15,912Donostia/San Sebastián: 15,640 countDonostia/San Sebastián15,640Terrassa: 14,812 countTerrassa14,812Sabadell: 14,693 countSabadell14,693Pamplona/Iruña: 14,570 countPamplona/Iruña14,570L'Hospitalet de Llobregat: 14,082 countL'Hospitalet de Llobregat14,082Vitoria-Gasteiz: 13,765 countVitoria-Gasteiz13,765Badalona: 13,680 countBadalona13,680Castelló de la Plana/Castellón de la Plana: 13,343 countCastelló de la Plana/Castellón de…13,343Almería: 12,614 countAlmería12,614Burgos: 12,574 countBurgos12,574Albacete: 12,356 countAlbacete12,356Santander: 11,845 countSantander11,845Cartagena: 11,451 countCartagena11,451Jerez de la Frontera: 11,372 countJerez de la Frontera11,372Pozuelo de Alarcón: 11,214 countPozuelo de Alarcón11,214Las Rozas de Madrid: 11,185 countLas Rozas de Madrid11,185Logroño: 11,101 countLogroño11,101Alcobendas: 10,749 countAlcobendas10,749Fuenlabrada: 10,744 countFuenlabrada10,744Madrid: 314,028 countMadrid314,028Barcelona: 183,286 countBarcelona183,286València: 67,635 countValència67,635Sevilla: 50,973 countSevilla50,973Zaragoza: 45,019 countZaragoza45,019Málaga: 42,061 countMálaga42,061Palma: 36,114 countPalma36,114Murcia: 33,290 countMurcia33,290Las Palmas de Gran Canaria: 28,522 countLas Palmas de Gran Canaria28,522Alacant/Alicante: 26,991 countAlacant/Alicante26,991Bilbao: 26,110 countBilbao26,110Vigo: 22,603 countVigo22,603Córdoba: 21,984 countCórdoba21,984A Coruña: 19,974 countA Coruña19,974Granada: 19,374 countGranada19,374Valladolid: 19,170 countValladolid19,170Marbella: 19,063 countMarbella19,063Gijón: 17,847 countGijón17,847Elx/Elche: 17,704 countElx/Elche17,704Santa Cruz de Tenerife: 16,157 countSanta Cruz de Tenerife16,157Oviedo: 15,912 countOviedo15,912Donostia/San Sebastián: 15,640 countDonostia/San Sebastián15,640Terrassa: 14,812 countTerrassa14,812Sabadell: 14,693 countSabadell14,693Pamplona/Iruña: 14,570 countPamplona/Iruña14,570L'Hospitalet de Llobregat: 14,082 countL'Hospitalet de Llobregat14,082Vitoria-Gasteiz: 13,765 countVitoria-Gasteiz13,765Badalona: 13,680 countBadalona13,680Castelló de la Plana/Castellón de la Plana: 13,343 countCastelló de la Plana/Castellón de la Plana13,343Almería: 12,614 countAlmería12,614Burgos: 12,574 countBurgos12,574Albacete: 12,356 countAlbacete12,356Santander: 11,845 countSantander11,845Cartagena: 11,451 countCartagena11,451Jerez de la Frontera: 11,372 countJerez de la Frontera11,372Pozuelo de Alarcón: 11,214 countPozuelo de Alarcón11,214Las Rozas de Madrid: 11,185 countLas Rozas de Madrid11,185Logroño: 11,101 countLogroño11,101Alcobendas: 10,749 countAlcobendas10,749Fuenlabrada: 10,744 countFuenlabrada10,744
count. Source: INE, Directorio central de empresas: empresas activas por municipio (tabla 4721). Retrieved 2026-10-12.

Full ranking

RankMunicipalities2021
count
Change on 2020
1Madrid314,028-0.9%
2Barcelona183,286-1.4%
3València67,635-0.8%
4Sevilla50,973-0.3%
5Zaragoza45,019-2.3%
6Málaga42,061-0.9%
7Palma36,114-3.4%
8Murcia33,290-1.7%
9Las Palmas de Gran Canaria28,522-2.8%
10Alacant/Alicante26,991-1%
11Bilbao26,110-2.8%
12Vigo22,603-1.8%
13Córdoba21,984-0.1%
14A Coruña19,974-2.2%
15Granada19,374-1.8%
16Valladolid19,170-2.3%
17Marbella19,063-0.5%
18Gijón17,847-1.4%
19Elx/Elche17,704-0.3%
20Santa Cruz de Tenerife16,157-2.5%
21Oviedo15,912-1%
22Donostia/San Sebastián15,640-2%
23Terrassa14,812-1.3%
24Sabadell14,693-0.7%
25Pamplona/Iruña14,570+0.8%
26L'Hospitalet de Llobregat14,082-0%
27Vitoria-Gasteiz13,765-1.3%
28Badalona13,680-1.2%
29Castelló de la Plana/Castellón de la Plana13,343-0.3%
30Almería12,614+0.3%
31Burgos12,574-1.6%
32Albacete12,356-0.7%
33Santander11,845-0.5%
34Cartagena11,451-2.3%
35Jerez de la Frontera11,372+0.9%
36Pozuelo de Alarcón11,214-0.7%
37Las Rozas de Madrid11,185-0.2%
38Logroño11,101-1.5%
39Alcobendas10,749-0.9%
40Fuenlabrada10,744-1.3%
41Sant Cugat del Vallès10,522-1%
42Lleida10,493-1.5%
43Badajoz10,111-1.9%
44Alcalá de Henares10,066-0.6%
45Salamanca9,975-2%
46Móstoles9,892-1.3%
47Leganés9,859-1.5%
48Getafe9,855+0.3%
49San Cristóbal de La Laguna9,827-2%
50Mataró9,671-1%
51Girona9,550-1%
52Alcorcón9,247-1.5%
53León9,234-2.3%
54Santiago de Compostela9,028-1.8%
55Ourense8,806-2.3%
56Tarragona8,500-0.7%
57Lugo8,354-1.9%
58Huelva7,632-1.3%
59Dos Hermanas7,496+0.4%
60San Sebastián de los Reyes7,310-1.7%
61Mijas7,224+0.2%
62Jaén7,188-1.1%
63Reus7,073-1%
64Cáceres6,980-2.7%
65Majadahonda6,900-1.2%
66Arona6,847-5.1%
67Fuengirola6,807-3.7%
68Rivas-Vaciamadrid6,710+1%
69Torrejón de Ardoz6,582-0.7%
70Pontevedra6,493-2.6%
71Cádiz6,2050%
72Torrevieja6,199-1.6%
73Boadilla del Monte6,107+0.2%
74Benalmádena6,041-0.3%
75Estepona5,995-0.1%
76Orihuela5,986-0.7%
77Roquetas de Mar5,970-0.7%
78Paterna5,958-0.2%
79Toledo5,935-0.9%
80Lorca5,865+0.3%
81Vélez-Málaga5,812+0.4%
82Algeciras5,738-0.2%
83Eivissa5,726-2.2%
84Castelldefels5,692-1.2%
85Telde5,691-1.8%
86Getxo5,690-2.2%
87Manresa5,562-0.7%
88Santa Coloma de Gramenet5,533-0.8%
89Benidorm5,493-2%
90Cornellà de Llobregat5,388-0.6%
90Torremolinos5,388-2.6%
92San Bartolomé de Tirajana5,385-5.4%
93Parla5,321-0.3%
94Talavera de la Reina5,289+0.5%
95Granollers5,277-1.4%
96Gandia5,204-1.3%
97El Puerto de Santa María5,174-0.2%
98El Ejido5,145+1.8%
99Torrent5,143+0.3%
100Ciudad Real5,123-0.9%
101Calvià5,083-0.7%
102Ponferrada5,026-4.7%
103Melilla5,024-4%
104Adeje5,014-5%
105Rubí4,986-1%
106Chiclana de la Frontera4,979+2.1%
107Molina de Segura4,950-1.5%
108Alcalá de Guadaíra4,897+0.9%
109Palencia4,870-2.1%
110Barakaldo4,848-1.7%
111Coslada4,804-1.8%
112Vilanova i la Geltrú4,765-0.8%
113Dénia4,666+0.2%
114Zamora4,629-2%
115Sant Boi de Llobregat4,600-2.2%
116Irun4,409-3.9%
117Guadalajara4,401-2.8%
118Valdemoro4,382+0.3%
119Arganda del Rey4,317-1.4%
120Arrecife4,280-4.7%
121Cerdanyola del Vallès4,206-2.3%
122Mérida4,078-2.8%
123Avilés4,033-1.3%
123Siero4,033-0.6%
125Collado Villalba4,002-1.3%
126Huesca3,945-2.3%
127Elda3,922-1.9%
128Alcoi/Alcoy3,912-0.4%
129Vic3,894-1.3%
130Viladecans3,848-2.3%
131Ceuta3,749-2.5%
132Sant Vicent del Raspeig/San Vicente del Raspeig3,661-1.6%
133Cuenca3,657-3.3%
134Figueres3,646-1%
135Ávila3,600-2.2%
136Tres Cantos3,544-1.4%
137Sagunt/Sagunto3,533-1.5%
138Segovia3,528-1%
139Santa Eulària des Riu3,525+0.3%
140Esplugues de Llobregat3,518-1.8%
141Manacor3,495-1.4%
142Mairena del Aljarafe3,494-0.7%
143Ferrol3,484-2.5%
144San Fernando3,477+0.8%
145Sanlúcar de Barrameda3,464+0.8%
146Santa Lucía de Tirajana3,462-2%
147Igualada3,396-3.6%
148Gavà3,393-1.2%
149El Prat de Llobregat3,379-2.4%
150Villaviciosa de Odón3,332-1.1%
151Sitges3,307-2%
152Motril3,283-0.6%
153Pinto3,263-0.2%
154Xàbia/Jávea3,206+1.6%
155Granadilla de Abona3,204-3.2%
156Vila-real3,199-2.4%
157Rincón de la Victoria3,177-2.1%
158Puerto del Rosario3,113-3.9%
159Colmenar Viejo3,101-0.5%
160Torrelavega3,008-2.7%
161Oleiros2,981-0.9%
162Aranjuez2,961-0.7%
163Lloret de Mar2,957+1.8%
163Vilafranca del Penedès2,957+0.5%
165Sant Feliu de Llobregat2,945-0.9%
166Alzira2,931-1%
167Plasencia2,917-0.8%
168Alhaurín de la Torre2,877-0.7%
169Lucena2,868-2%
170Ontinyent2,835-0.2%
171Marratxí2,829-1.4%
172Llucmajor2,818-2.6%
173San Fernando de Henares2,761-1.1%
174Galapagar2,757-2.3%
175Mollet del Vallès2,736-3.3%
176Cambrils2,731-1.4%
177Montcada i Reixac2,723-0.9%
178Linares2,716-0.7%
179Soria2,701-1.6%
180Utrera2,6600%
181Yecla2,654-2.3%
182Tudela2,632+0.2%
183La Línea de la Concepción2,612-0.2%
184Torrelodones2,597-1.5%
185Torre-Pacheco2,593-0.7%
186Carballo2,578-1.3%
186Vilagarcía de Arousa2,578-1.1%
188Puerto de la Cruz2,577-4.6%
189Teruel2,564-3.2%
190La Orotava2,538-1.8%
191Ciutadella de Menorca2,5370%
192Barberà del Vallès2,535-0.9%
193Maó2,514-0.2%
194Alcantarilla2,499-2.1%
195Tomelloso2,490+0.3%
196Don Benito2,486-0.9%
197Almendralejo2,481-1.9%
198Écija2,473+0.8%
199Arroyomolinos2,469+0.4%
199Blanes2,469-0.1%
201La Oliva2,432-0.3%
202Sant Pere de Ribes2,418+0.1%
203El Vendrell2,416-0.7%
204Petrer2,405-0.3%
205Antequera2,393+0.6%
206Altea2,383-2.3%
206Olot2,383-1.7%
208Ronda2,365-0.7%
209Úbeda2,350-1.1%
210Sant Joan Despí2,335-1.4%
211Santa Pola2,328+1.9%
212Ripollet2,307-0.9%
213Ames2,288+0.2%
214Villanueva de la Cañada2,268-0.2%
215Basauri2,265-0.7%
216Arteixo2,259-0.3%
217el Campello2,251+0.4%
218Aranda de Duero2,250-0.3%
219Villena2,243-2.1%
220Tortosa2,241-1.5%
221La Rinconada2,236+0.7%
222San Roque2,233+1%
223San Javier2,219-0.1%
224El Masnou2,218+0.7%
225Humanes de Madrid2,216-0%
226Inca2,213-1.2%
227Andújar2,201+0.5%
228Camargo2,190+1.3%
229Xàtiva2,188-1.1%
230Narón2,179-1.4%
231Mislata2,169-1.8%
232Los Realejos2,166-3.2%
233Culleredo2,1630%
234Illescas2,156-2.4%
235Vinaròs2,153+1%
236Sant Adrià de Besòs2,148+1.1%
237Castro-Urdiales2,132-0.3%
238Riba-roja de Túria2,122-0.1%
239Calp2,103+0.9%
240la Vila Joiosa/Villajoyosa2,098-3%
241Sant Just Desvern2,094-3.2%
242Sant Josep de sa Talaia2,088-2.5%
243Crevillent2,086-1.2%
244Castellar del Vallès2,080+0.8%
245Molins de Rei2,072-0.9%
245Tías2,072-6.9%
247Burjassot2,0680%
248Borriana/Burriana2,064+0.4%
249Sant Joan d'Alacant2,062-1.6%
250Portugalete2,059-5.6%

Showing the top 250 of 6889. The Excel download has every row.

Other periods

About this ranking

Active companies on 1 January (INE Central Business Directory, DIRCE).

Every value in the ranking comes from the same publisher and the same period, so the municipalities are compared on one definition. 470 municipalities with data in other periods have no value for 2021 and are left out rather than filled from another source. Equal values share a rank.

How to cite

Instituto Nacional de Estadística (INE). Directorio central de empresas: empresas activas por municipio (tabla 4721). https://www.ine.es/jaxiT3/Tabla.htm?t=4721. Retrieved 2026-10-12.

Citation styles

The publisher is the author. Invokely is named only as the place the figures were read, where a style asks for it.

APA 7

Instituto Nacional de Estadística. (2026). Directorio central de empresas: empresas activas por municipio (tabla 4721) (Municipalities of Spain by active companies, 2021) [Data set]. Retrieved October 12, 2026, from https://www.ine.es/jaxiT3/Tabla.htm?t=4721

MLA 9

Directorio central de empresas: empresas activas por municipio (tabla 4721), Municipalities of Spain by active companies, 2021. Instituto Nacional de Estadística, 7 Oct. 2026, https://www.ine.es/jaxiT3/Tabla.htm?t=4721. Invokely, https://invokely.ai/rankings/active-companies/spain-municipalities?period=2021. Accessed 12 Oct. 2026.

Chicago (author-date)

Instituto Nacional de Estadística. 2026. Directorio central de empresas: empresas activas por municipio (tabla 4721). Municipalities of Spain by active companies, 2021. Dataset. Accessed October 12, 2026. https://www.ine.es/jaxiT3/Tabla.htm?t=4721. Also distributed by Invokely, https://invokely.ai/rankings/active-companies/spain-municipalities?period=2021.

Harvard

Instituto Nacional de Estadística (2026) Directorio central de empresas: empresas activas por municipio (tabla 4721), Municipalities of Spain by active companies, 2021 [Dataset]. Available at: https://www.ine.es/jaxiT3/Tabla.htm?t=4721, via Invokely: https://invokely.ai/rankings/active-companies/spain-municipalities?period=2021 (Accessed: 12 October 2026).

BibTeX
@misc{instituto_municipalities_of_spain_by_2021,
  author = {{Instituto Nacional de Estadística}},
  title = {{Directorio central de empresas: empresas activas por municipio (tabla 4721): Municipalities of Spain by active companies, 2021}},
  year = {2026},
  howpublished = {Data set},
  url = {https://www.ine.es/jaxiT3/Tabla.htm?t=4721},
  urldate = {2026-10-12},
  note = {Accessed via Invokely, https://invokely.ai/rankings/active-companies/spain-municipalities?period=2021. Publisher attribution: Instituto Nacional de Estadística (INE). Directorio central de empresas: empresas activas por municipio (tabla 4721). https://www.ine.es/jaxiT3/Tabla.htm?t=4721. Retrieved 2026-10-12.},
}
RIS
TY  - DATA
AU  - Instituto Nacional de Estadística
TI  - Directorio central de empresas: empresas activas por municipio (tabla 4721): Municipalities of Spain by active companies, 2021
PY  - 2026
DA  - 2026/10/07
PB  - Instituto Nacional de Estadística
DB  - Invokely
UR  - https://www.ine.es/jaxiT3/Tabla.htm?t=4721
L2  - https://invokely.ai/rankings/active-companies/spain-municipalities?period=2021
Y2  - 2026/10/12
N1  - Accessed via Invokely, https://invokely.ai/rankings/active-companies/spain-municipalities?period=2021.
N1  - Publisher attribution: Instituto Nacional de Estadística (INE). Directorio central de empresas: empresas activas por municipio (tabla 4721). https://www.ine.es/jaxiT3/Tabla.htm?t=4721. Retrieved 2026-10-12.
ER  - 
Embed this chart

Paste this code into a web page or a blog post. The chart shows the latest figures as they are published, with the source and a link back to this page.

Sites that read oEmbed links, such as WordPress, can show the chart when you paste the link to this page.

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 Municipalities of Spain by active companies using official data, and cite the source.
rank_places {"indicator":"active_companies","level":"municipality","within":"Spain","limit":10}
GET https://invokely.ai/api/v1/rank?indicator=active_companies&level=municipality&within=Spain&limit=10

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

Questions

Which municipality has the highest active companies?

Madrid, with 314,028 in 2021, according to the Instituto Nacional de Estadística.

Which municipality has the lowest active companies?

Zarapicos, with 4 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, Directorio central de empresas: empresas activas por municipio (tabla 4721). Retrieved 2026-10-12. 470 municipalities have no value for 2021 and are not ranked.

Active companies: other rankings

Municipalities of Spain: more rankings