Municipalities of Spain by active companies

Madrid had the highest active companies of 6917 municipalities in 2020, at 316,846. Zafrilla had the lowest, at 4. The median was 47 and the figure for Spain was 3.4 million. Source: the Instituto Nacional de Estadística.

Keep it in a collection in your library.
Highest316,846Madrid
Lowest4Zafrilla
Median476917 municipalities
Spain3,404,428History

Top 40 municipalities, 2020

Madrid: 316,846 countMadrid316,846Barcelona: 185,857 countBarcelona185,857València: 68,170 countValència68,170Sevilla: 51,104 countSevilla51,104Zaragoza: 46,062 countZaragoza46,062Málaga: 42,448 countMálaga42,448Palma: 37,379 countPalma37,379Murcia: 33,873 countMurcia33,873Las Palmas de Gran Canaria: 29,351 countLas Palmas de Gran Canaria29,351Alacant/Alicante: 27,265 countAlacant/Alicante27,265Bilbao: 26,853 countBilbao26,853Vigo: 23,017 countVigo23,017Córdoba: 22,002 countCórdoba22,002A Coruña: 20,430 countA Coruña20,430Granada: 19,722 countGranada19,722Valladolid: 19,620 countValladolid19,620Marbella: 19,157 countMarbella19,157Gijón: 18,108 countGijón18,108Elx/Elche: 17,752 countElx/Elche17,752Santa Cruz de Tenerife: 16,577 countSanta Cruz de Tenerife16,577Oviedo: 16,080 countOviedo16,080Donostia/San Sebastián: 15,965 countDonostia/San Sebastián15,965Terrassa: 15,005 countTerrassa15,005Sabadell: 14,804 countSabadell14,804Pamplona/Iruña: 14,448 countPamplona/Iruña14,448L'Hospitalet de Llobregat: 14,083 countL'Hospitalet de Llobregat14,083Vitoria-Gasteiz: 13,943 countVitoria-Gasteiz13,943Badalona: 13,840 countBadalona13,840Castelló de la Plana/Castellón de la Plana: 13,388 countCastelló de la Plana/Castellón de…13,388Burgos: 12,776 countBurgos12,776Almería: 12,578 countAlmería12,578Albacete: 12,449 countAlbacete12,449Santander: 11,901 countSantander11,901Cartagena: 11,720 countCartagena11,720Pozuelo de Alarcón: 11,297 countPozuelo de Alarcón11,297Jerez de la Frontera: 11,276 countJerez de la Frontera11,276Logroño: 11,268 countLogroño11,268Las Rozas de Madrid: 11,208 countLas Rozas de Madrid11,208Fuenlabrada: 10,887 countFuenlabrada10,887Alcobendas: 10,844 countAlcobendas10,844Madrid: 316,846 countMadrid316,846Barcelona: 185,857 countBarcelona185,857València: 68,170 countValència68,170Sevilla: 51,104 countSevilla51,104Zaragoza: 46,062 countZaragoza46,062Málaga: 42,448 countMálaga42,448Palma: 37,379 countPalma37,379Murcia: 33,873 countMurcia33,873Las Palmas de Gran Canaria: 29,351 countLas Palmas de Gran Canaria29,351Alacant/Alicante: 27,265 countAlacant/Alicante27,265Bilbao: 26,853 countBilbao26,853Vigo: 23,017 countVigo23,017Córdoba: 22,002 countCórdoba22,002A Coruña: 20,430 countA Coruña20,430Granada: 19,722 countGranada19,722Valladolid: 19,620 countValladolid19,620Marbella: 19,157 countMarbella19,157Gijón: 18,108 countGijón18,108Elx/Elche: 17,752 countElx/Elche17,752Santa Cruz de Tenerife: 16,577 countSanta Cruz de Tenerife16,577Oviedo: 16,080 countOviedo16,080Donostia/San Sebastián: 15,965 countDonostia/San Sebastián15,965Terrassa: 15,005 countTerrassa15,005Sabadell: 14,804 countSabadell14,804Pamplona/Iruña: 14,448 countPamplona/Iruña14,448L'Hospitalet de Llobregat: 14,083 countL'Hospitalet de Llobregat14,083Vitoria-Gasteiz: 13,943 countVitoria-Gasteiz13,943Badalona: 13,840 countBadalona13,840Castelló de la Plana/Castellón de la Plana: 13,388 countCastelló de la Plana/Castellón de la Plana13,388Burgos: 12,776 countBurgos12,776Almería: 12,578 countAlmería12,578Albacete: 12,449 countAlbacete12,449Santander: 11,901 countSantander11,901Cartagena: 11,720 countCartagena11,720Pozuelo de Alarcón: 11,297 countPozuelo de Alarcón11,297Jerez de la Frontera: 11,276 countJerez de la Frontera11,276Logroño: 11,268 countLogroño11,268Las Rozas de Madrid: 11,208 countLas Rozas de Madrid11,208Fuenlabrada: 10,887 countFuenlabrada10,887Alcobendas: 10,844 countAlcobendas10,844
count. Source: INE, Directorio central de empresas: empresas activas por municipio (tabla 4721). Retrieved 2026-10-12.

Full ranking

RankMunicipalities2020
count
Change on 2019
1Madrid316,846+1.9%
2Barcelona185,857+1.4%
3València68,170+2.5%
4Sevilla51,104+1.9%
5Zaragoza46,062-0.4%
6Málaga42,448+2.8%
7Palma37,379+0.3%
8Murcia33,873+1.7%
9Las Palmas de Gran Canaria29,351+0.8%
10Alacant/Alicante27,265+2.1%
11Bilbao26,853+1.4%
12Vigo23,017-1.3%
13Córdoba22,002+1.1%
14A Coruña20,430-2.9%
15Granada19,722+2.7%
16Valladolid19,620-1.3%
17Marbella19,157+3.4%
18Gijón18,108+0.4%
19Elx/Elche17,752+1.6%
20Santa Cruz de Tenerife16,577-0.3%
21Oviedo16,080-0.1%
22Donostia/San Sebastián15,965+1%
23Terrassa15,005+1.7%
24Sabadell14,804+1.6%
25Pamplona/Iruña14,448+0.9%
26L'Hospitalet de Llobregat14,083+5.1%
27Vitoria-Gasteiz13,943+1.3%
28Badalona13,840+2.7%
29Castelló de la Plana/Castellón de la Plana13,388+6.5%
30Burgos12,776-1.6%
31Almería12,578+1.1%
32Albacete12,449+0.2%
33Santander11,901+0.7%
34Cartagena11,720+0.2%
35Pozuelo de Alarcón11,297+2.2%
36Jerez de la Frontera11,276+2%
37Logroño11,268+0.3%
38Las Rozas de Madrid11,208+0.4%
39Fuenlabrada10,887+0.3%
40Alcobendas10,844+2.4%
41Lleida10,651-0.2%
42Sant Cugat del Vallès10,630+2.4%
43Badajoz10,305-1.1%
44Salamanca10,183-1.1%
45Alcalá de Henares10,128+3.6%
46San Cristóbal de La Laguna10,029+0.3%
47Móstoles10,022+1.2%
48Leganés10,005+2.6%
49Getafe9,830+3.6%
50Mataró9,772+2.4%
51Girona9,644+2.4%
52León9,447-1.5%
53Alcorcón9,384+2.9%
54Santiago de Compostela9,195-2%
55Ourense9,009-2.8%
56Tarragona8,559+2.3%
57Lugo8,514-1.9%
58Huelva7,730+0.7%
59Dos Hermanas7,469+2%
60San Sebastián de los Reyes7,433+2.3%
61Jaén7,266+1.1%
62Arona7,213-0.3%
63Mijas7,212+6.3%
64Cáceres7,173-0.4%
65Reus7,143+0.5%
66Fuengirola7,067+4.8%
67Majadahonda6,983+0.4%
68Pontevedra6,665-1.2%
69Rivas-Vaciamadrid6,646+4.2%
70Torrejón de Ardoz6,630+3.2%
71Torrevieja6,298+2.7%
72Cádiz6,202+2%
73Boadilla del Monte6,094+4.8%
74Benalmádena6,057+5.5%
75Orihuela6,031+2.1%
76Roquetas de Mar6,014+4.8%
77Estepona6,002+4.5%
78Toledo5,991+1.6%
79Paterna5,969+2%
80Eivissa5,855+2%
81Lorca5,845+0.6%
82Getxo5,816+1.3%
83Telde5,793+2.4%
84Vélez-Málaga5,788+3.9%
85Castelldefels5,761+2.5%
86Algeciras5,752+1.7%
87San Bartolomé de Tirajana5,691-1.8%
88Benidorm5,607+1.3%
89Manresa5,600+1.1%
90Santa Coloma de Gramenet5,577+5.8%
91Torremolinos5,533+6.4%
92Cornellà de Llobregat5,419+1.7%
93Granollers5,351+0.9%
94Parla5,336+5.4%
95Adeje5,278+1.4%
96Ponferrada5,275-0.8%
97Gandia5,273+1.9%
98Talavera de la Reina5,264+1.3%
99Melilla5,234-1.3%
100El Puerto de Santa María5,183+2.1%
101Ciudad Real5,169-2.2%
102Torrent5,129+4.1%
103Calvià5,118+0.7%
104El Ejido5,056+1.8%
105Rubí5,036+1.8%
106Molina de Segura5,027+1.3%
107Palencia4,972-0.1%
108Barakaldo4,930+1.2%
109Coslada4,892+1.3%
110Chiclana de la Frontera4,876+3.9%
111Alcalá de Guadaíra4,852+1.1%
112Vilanova i la Geltrú4,805+3.3%
113Zamora4,722-1.5%
114Sant Boi de Llobregat4,703+1.4%
115Dénia4,656+2.8%
116Irun4,588+0.1%
117Guadalajara4,529+0.9%
118Arrecife4,489+0.9%
119Arganda del Rey4,377+3.8%
120Valdemoro4,371+2.6%
121Cerdanyola del Vallès4,306+1.3%
122Mérida4,197-2.3%
123Avilés4,087-1.8%
124Siero4,059-1.4%
125Collado Villalba4,055+1.7%
126Huesca4,038-0.6%
127Elda3,999+1.4%
128Vic3,947+0.4%
129Viladecans3,937+2%
130Alcoi/Alcoy3,927+0.3%
131Ceuta3,845+1.5%
132Cuenca3,783-1%
133Sant Vicent del Raspeig/San Vicente del Raspeig3,722+0.9%
134Figueres3,682-1.1%
135Ávila3,681-0%
136Tres Cantos3,596+3.6%
137Sagunt/Sagunto3,586+1.3%
138Esplugues de Llobregat3,584+2.4%
139Ferrol3,572-4.2%
140Segovia3,565-0.1%
141Manacor3,543+1.6%
142Santa Lucía de Tirajana3,534+2.8%
143Igualada3,522+2.9%
144Mairena del Aljarafe3,517-0.7%
145Santa Eulària des Riu3,513+3.9%
146El Prat de Llobregat3,463+2%
147San Fernando3,451-0.9%
148Sanlúcar de Barrameda3,438+4.2%
149Gavà3,434+1.8%
150Sitges3,376+2.6%
151Villaviciosa de Odón3,369-0.4%
152Granadilla de Abona3,310+2.2%
153Motril3,304+1.7%
154Vila-real3,277-0.2%
155Pinto3,268+1.8%
156Rincón de la Victoria3,246+3.7%
157Puerto del Rosario3,240-1.9%
158Xàbia/Jávea3,156+1.8%
159Colmenar Viejo3,117+1.2%
160Torrelavega3,093-0.6%
161Oleiros3,008+1.3%
162Aranjuez2,981+2.1%
163Sant Feliu de Llobregat2,973+1.3%
164Alzira2,960+2.1%
165Vilafranca del Penedès2,943-0.9%
166Plasencia2,942-0.6%
167Lucena2,926+0.2%
168Lloret de Mar2,904+2.2%
169Alhaurín de la Torre2,897+3.6%
170Llucmajor2,894+0.6%
171Marratxí2,868+1.9%
172Ontinyent2,840+0.1%
173Mollet del Vallès2,828+1.4%
174Galapagar2,822+4.4%
175San Fernando de Henares2,792+1.6%
176Cambrils2,769+2.3%
177Montcada i Reixac2,747+1%
178Soria2,746+1%
179Linares2,736+1%
180Yecla2,717+1.3%
181Puerto de la Cruz2,700+0.2%
182Utrera2,660+2%
183Teruel2,648-0.8%
184Torrelodones2,637+3.9%
185Tudela2,626+0.5%
186La Línea de la Concepción2,617+1.9%
187Carballo2,611-0.1%
188Torre-Pacheco2,610+4.3%
189Vilagarcía de Arousa2,607+0.9%
190La Orotava2,585-1%
191Barberà del Vallès2,558-0.2%
192Alcantarilla2,552+1.4%
193Ciutadella de Menorca2,537+1.2%
194Almendralejo2,530-2.3%
195Maó2,519+1.1%
196Don Benito2,509+2%
197Tomelloso2,483-1.7%
198Blanes2,471+1.1%
199Arroyomolinos2,460+3.3%
200Écija2,453+3.2%
201La Oliva2,439+2.4%
202Altea2,438+3.2%
203El Vendrell2,432+2.7%
204Olot2,423+0.1%
205Sant Pere de Ribes2,416+4.4%
206Petrer2,413+0.8%
207Ronda2,382+2%
208Antequera2,379+0.4%
209Úbeda2,376+2.5%
210Sant Joan Despí2,367+0.7%
211Ripollet2,327+2.4%
212Villena2,291+1.9%
213Santa Pola2,285+3%
214Ames2,284-1%
215Basauri2,280+0.1%
216Tortosa2,275-0.4%
217Villanueva de la Cañada2,273+0.3%
218Arteixo2,266-4.2%
219Aranda de Duero2,257-0.4%
220el Campello2,243+0.9%
221Inca2,241+1.1%
222Los Realejos2,237+0.6%
223Tías2,225-1.5%
224San Javier2,222+3.3%
225La Rinconada2,220+1.2%
226Humanes de Madrid2,217+1.6%
227Xàtiva2,212+1.2%
228Narón2,211-2.4%
229San Roque2,210+6.5%
230Illescas2,209+5%
231Mislata2,208+3.3%
232El Masnou2,203+1.4%
233Andújar2,189+0.6%
234Portugalete2,180-1%
235Sant Just Desvern2,164+3.4%
236Culleredo2,163-2.3%
237Camargo2,162+0.1%
237la Vila Joiosa/Villajoyosa2,162+3.3%
239Sant Josep de sa Talaia2,142+5.7%
240Castro-Urdiales2,138+1.4%
241Vinaròs2,131+0.4%
242Leioa2,125+3.4%
242Riba-roja de Túria2,125-0%
244Sant Adrià de Besòs2,124+1.4%
245Crevillent2,112+0.5%
246Sant Joan d'Alacant2,096+1.6%
247Molins de Rei2,091-0.6%
248Calp2,085+1.2%
249Burjassot2,067+1%
250Santurtzi2,066+0.4%

Showing the top 250 of 6917. 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. 442 municipalities with data in other periods have no value for 2020 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, 2020) [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, 2020. 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=2020. 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, 2020. 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=2020.

Harvard

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

BibTeX
@misc{instituto_municipalities_of_spain_by_2020,
  author = {{Instituto Nacional de Estadística}},
  title = {{Directorio central de empresas: empresas activas por municipio (tabla 4721): Municipalities of Spain by active companies, 2020}},
  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=2020. 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, 2020
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=2020
Y2  - 2026/10/12
N1  - Accessed via Invokely, https://invokely.ai/rankings/active-companies/spain-municipalities?period=2020.
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 316,846 in 2020, according to the Instituto Nacional de Estadística.

Which municipality has the lowest active companies?

Zafrilla, with 4 in 2020.

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. 442 municipalities have no value for 2020 and are not ranked.

Active companies: other rankings

Municipalities of Spain: more rankings