Municipalities of Spain by active companies

Madrid had the highest active companies of 6923 municipalities in 2017, at 304,474. Zorita de los Canes had the lowest, at 4. The median was 46 and the figure for Spain was 3.28 million. Source: the Instituto Nacional de Estadística.

Keep it in a collection in your library.
Highest304,474Madrid
Median466923 municipalities
Spain3,282,346History

Top 40 municipalities, 2017

Madrid: 304,474 countMadrid304,474Barcelona: 178,607 countBarcelona178,607València: 63,480 countValència63,480Sevilla: 48,984 countSevilla48,984Zaragoza: 45,977 countZaragoza45,977Málaga: 40,087 countMálaga40,087Palma: 35,488 countPalma35,488Murcia: 32,903 countMurcia32,903Las Palmas de Gran Canaria: 27,658 countLas Palmas de Gran Canaria27,658Bilbao: 26,069 countBilbao26,069Alacant/Alicante: 25,396 countAlacant/Alicante25,396Vigo: 23,097 countVigo23,097Córdoba: 21,428 countCórdoba21,428A Coruña: 20,876 countA Coruña20,876Valladolid: 19,841 countValladolid19,841Granada: 18,950 countGranada18,950Gijón: 17,750 countGijón17,750Marbella: 17,476 countMarbella17,476Elx/Elche: 16,541 countElx/Elche16,541Oviedo: 16,048 countOviedo16,048Santa Cruz de Tenerife: 15,858 countSanta Cruz de Tenerife15,858Donostia/San Sebastián: 15,809 countDonostia/San Sebastián15,809Terrassa: 14,678 countTerrassa14,678Sabadell: 14,377 countSabadell14,377Pamplona/Iruña: 14,198 countPamplona/Iruña14,198Vitoria-Gasteiz: 13,657 countVitoria-Gasteiz13,657Badalona: 12,985 countBadalona12,985Burgos: 12,964 countBurgos12,964L'Hospitalet de Llobregat: 12,872 countL'Hospitalet de Llobregat12,872Castelló de la Plana/Castellón de la Plana: 12,612 countCastelló de la Plana/Castellón de…12,612Albacete: 12,438 countAlbacete12,438Almería: 12,140 countAlmería12,140Santander: 11,742 countSantander11,742Logroño: 11,418 countLogroño11,418Las Rozas de Madrid: 11,384 countLas Rozas de Madrid11,384Cartagena: 11,254 countCartagena11,254Pozuelo de Alarcón: 11,001 countPozuelo de Alarcón11,001Jerez de la Frontera: 10,928 countJerez de la Frontera10,928Lleida: 10,847 countLleida10,847Fuenlabrada: 10,767 countFuenlabrada10,767Madrid: 304,474 countMadrid304,474Barcelona: 178,607 countBarcelona178,607València: 63,480 countValència63,480Sevilla: 48,984 countSevilla48,984Zaragoza: 45,977 countZaragoza45,977Málaga: 40,087 countMálaga40,087Palma: 35,488 countPalma35,488Murcia: 32,903 countMurcia32,903Las Palmas de Gran Canaria: 27,658 countLas Palmas de Gran Canaria27,658Bilbao: 26,069 countBilbao26,069Alacant/Alicante: 25,396 countAlacant/Alicante25,396Vigo: 23,097 countVigo23,097Córdoba: 21,428 countCórdoba21,428A Coruña: 20,876 countA Coruña20,876Valladolid: 19,841 countValladolid19,841Granada: 18,950 countGranada18,950Gijón: 17,750 countGijón17,750Marbella: 17,476 countMarbella17,476Elx/Elche: 16,541 countElx/Elche16,541Oviedo: 16,048 countOviedo16,048Santa Cruz de Tenerife: 15,858 countSanta Cruz de Tenerife15,858Donostia/San Sebastián: 15,809 countDonostia/San Sebastián15,809Terrassa: 14,678 countTerrassa14,678Sabadell: 14,377 countSabadell14,377Pamplona/Iruña: 14,198 countPamplona/Iruña14,198Vitoria-Gasteiz: 13,657 countVitoria-Gasteiz13,657Badalona: 12,985 countBadalona12,985Burgos: 12,964 countBurgos12,964L'Hospitalet de Llobregat: 12,872 countL'Hospitalet de Llobregat12,872Castelló de la Plana/Castellón de la Plana: 12,612 countCastelló de la Plana/Castellón de la Plana12,612Albacete: 12,438 countAlbacete12,438Almería: 12,140 countAlmería12,140Santander: 11,742 countSantander11,742Logroño: 11,418 countLogroño11,418Las Rozas de Madrid: 11,384 countLas Rozas de Madrid11,384Cartagena: 11,254 countCartagena11,254Pozuelo de Alarcón: 11,001 countPozuelo de Alarcón11,001Jerez de la Frontera: 10,928 countJerez de la Frontera10,928Lleida: 10,847 countLleida10,847Fuenlabrada: 10,767 countFuenlabrada10,767
count. Source: INE, Directorio central de empresas: empresas activas por municipio (tabla 4721). Retrieved 2026-10-12.

Full ranking

RankMunicipalities2017
count
Change on 2016
1Madrid304,474+1.7%
2Barcelona178,607+2.5%
3València63,480+2.4%
4Sevilla48,984+1.2%
5Zaragoza45,977+1.1%
6Málaga40,087+1.9%
7Palma35,488+4.2%
8Murcia32,903+2%
9Las Palmas de Gran Canaria27,658+3.3%
10Bilbao26,069-6.9%
11Alacant/Alicante25,396+2%
12Vigo23,097+1.1%
13Córdoba21,428+1.7%
14A Coruña20,876-1.1%
15Valladolid19,841+0.9%
16Granada18,950+3.5%
17Gijón17,750+2%
18Marbella17,476+3.6%
19Elx/Elche16,541+1.5%
20Oviedo16,048+0.5%
21Santa Cruz de Tenerife15,858+2.8%
22Donostia/San Sebastián15,809-6%
23Terrassa14,678+1.7%
24Sabadell14,377+1.1%
25Pamplona/Iruña14,198+0.8%
26Vitoria-Gasteiz13,657-8.3%
27Badalona12,985+1.6%
28Burgos12,964+1.1%
29L'Hospitalet de Llobregat12,872+3.4%
30Castelló de la Plana/Castellón de la Plana12,612+1.8%
31Albacete12,438+0.6%
32Almería12,140+2.5%
33Santander11,742+1.5%
34Logroño11,418+0.1%
35Las Rozas de Madrid11,384+2.7%
36Cartagena11,254+2.9%
37Pozuelo de Alarcón11,001+3.2%
38Jerez de la Frontera10,928+2.4%
39Lleida10,847+0.9%
40Fuenlabrada10,767+0.6%
41Alcobendas10,4140%
42Badajoz10,145+1%
43Salamanca10,127-0.3%
44Sant Cugat del Vallès10,112+2.8%
45Móstoles9,717+0.8%
46Leganés9,526+2.3%
47León9,470-1%
48Alcalá de Henares9,337+2.4%
49San Cristóbal de La Laguna9,327+3.7%
50Girona9,287+2.6%
51Ourense9,264+0.3%
52Mataró9,239+2.7%
53Santiago de Compostela9,233+1%
54Getafe9,071+3.5%
55Alcorcón8,834-0%
56Lugo8,629+0.8%
57Tarragona8,445+1.4%
58Huelva7,448+0.5%
59Jaén7,195+1.9%
60San Sebastián de los Reyes7,108+2%
61Cáceres7,009+1.3%
62Dos Hermanas6,982+1.8%
63Reus6,971+0.1%
64Majadahonda6,798+1.8%
65Arona6,607+6.6%
66Pontevedra6,593+1.3%
67Fuengirola6,255+5.1%
68Torrejón de Ardoz6,154+1.8%
69Mijas6,019+6.6%
70Cádiz6,001+2.3%
71Rivas-Vaciamadrid5,964+4.9%
72Lorca5,857+0.1%
73Toledo5,722+1.7%
74Algeciras5,657+1.1%
75Paterna5,654+2.9%
76Getxo5,602-7.7%
77Torrevieja5,572+2.3%
78Boadilla del Monte5,521+3.7%
79Manresa5,518+2.6%
80San Bartolomé de Tirajana5,468+4.9%
81Roquetas de Mar5,464+4.4%
82Telde5,420+4.3%
83Orihuela5,399+2.8%
84Benidorm5,375+0.9%
85Ponferrada5,363-2.9%
86Estepona5,349+6.1%
87Castelldefels5,323+1.8%
88Cornellà de Llobregat5,280+1.4%
89Granollers5,247+2.1%
90Vélez-Málaga5,244+4.9%
91Eivissa5,237+4.6%
92Talavera de la Reina5,153+2.1%
93Ciudad Real5,147+0.2%
94Palencia5,114-1.4%
95El Puerto de Santa María5,079+3.2%
96Santa Coloma de Gramenet5,068+3.7%
97Benalmádena5,066+5.4%
98Torremolinos5,005+6.4%
99Rubí4,944+4.1%
100Gandia4,941+1.1%
101Calvià4,871+4.9%
102El Ejido4,868+3%
103Zamora4,823-0.7%
104Coslada4,811+0.5%
105Molina de Segura4,802+1.5%
106Alcalá de Guadaíra4,758+0.4%
107Sant Boi de Llobregat4,728+1%
108Torrent4,719+2.2%
109Parla4,702+4.4%
110Adeje4,689+7.8%
111Barakaldo4,602-10.2%
112Guadalajara4,571-1.9%
113Vilanova i la Geltrú4,547+2.4%
114Melilla4,524+4%
115Chiclana de la Frontera4,466+4.9%
116Irun4,421-9.6%
117Dénia4,268+1.8%
118Cerdanyola del Vallès4,236+1%
119Avilés4,225-0.7%
120Mérida4,221+1.1%
121Siero4,149+2.8%
122Arrecife4,099+4.2%
123Valdemoro4,096+2.4%
124Huesca4,067+0.5%
125Vic3,998+1.9%
126Arganda del Rey3,971+1.8%
127Elda3,925+0.4%
128Viladecans3,887+1.4%
129Collado Villalba3,854+1.4%
130Ceuta3,844+2.2%
131Alcoi/Alcoy3,814+1.7%
132Cuenca3,753+1.1%
133Ferrol3,737+0.1%
134Figueres3,723-0.2%
135Ávila3,691+2.3%
136Sant Vicent del Raspeig/San Vicente del Raspeig3,598+1%
137Segovia3,585-1.9%
138Sagunt/Sagunto3,525-0.5%
139El Prat de Llobregat3,524+4%
140Igualada3,431+0.4%
141Esplugues de Llobregat3,426+3.5%
142Mairena del Aljarafe3,423+4.4%
143Tres Cantos3,408+1%
144Villaviciosa de Odón3,369+1.1%
145Gavà3,362+1.5%
146Manacor3,346+3.7%
147San Fernando3,303+3.4%
148Motril3,286+0.7%
149Vila-real3,219-0.1%
150Santa Lucía de Tirajana3,188+5.4%
151Sitges3,176+4.6%
152Sanlúcar de Barrameda3,142+2.3%
153Torrelavega3,113+0.6%
154Santa Eulària des Riu3,057+5.1%
155Pinto3,042+2.2%
156Puerto del Rosario2,950+4.4%
157Colmenar Viejo2,948+3.1%
158Vilafranca del Penedès2,905+1.4%
159Rincón de la Victoria2,891+5.5%
160Plasencia2,872-0.4%
161Ontinyent2,846-0.4%
162Granadilla de Abona2,837+7.6%
163Lucena2,834+1.5%
164Sant Feliu de Llobregat2,824+3.7%
165Alzira2,821+1.5%
166Aranjuez2,814+0.7%
167Xàbia/Jávea2,809+3%
168Oleiros2,805+3.4%
169Soria2,783-0.3%
170Llucmajor2,735+5%
171Mollet del Vallès2,725+0.7%
172Lloret de Mar2,720+6.2%
173Marratxí2,718+3.7%
174San Fernando de Henares2,694+1.4%
175Montcada i Reixac2,676+0.9%
176Teruel2,669+1.4%
177Linares2,666+0.6%
178Tudela2,642-0.8%
179Yecla2,627+2.9%
180Carballo2,619+0.1%
181Cambrils2,611+1.8%
182Alhaurín de la Torre2,583+3.2%
183Barberà del Vallès2,579+0.7%
184Puerto de la Cruz2,564+0.5%
184Vilagarcía de Arousa2,564+1.9%
186La Línea de la Concepción2,530+1.1%
187Alcantarilla2,497+1.5%
188Galapagar2,462+1.5%
189Tomelloso2,459+0.3%
190Utrera2,455+3.8%
191Almendralejo2,430-0.1%
191Torre-Pacheco2,430+3.4%
193Don Benito2,426+0.7%
194La Orotava2,423+1.4%
195Blanes2,400+2.3%
196Antequera2,392+1.6%
196Maó2,392+3.7%
198Petrer2,390+1.4%
199Ciutadella de Menorca2,382+3.9%
200Torrelodones2,379+1.4%
201Olot2,378+2%
202Écija2,366+2.7%
203Arteixo2,363+1%
204Sant Joan Despí2,322+0.7%
204Úbeda2,322+2.1%
206Altea2,305+2.2%
207Tortosa2,294+0.9%
208Basauri2,287-10.1%
209Ripollet2,283+1.6%
210El Vendrell2,279+2.2%
211Aranda de Duero2,242+0.2%
212Ames2,239+3.2%
213Villarrobledo2,2380%
214Sant Pere de Ribes2,227+6.9%
215Ronda2,222+1%
216Narón2,218-0.3%
217Arroyomolinos2,193+5.2%
218La Rinconada2,191+1.5%
219Villena2,181+0.9%
220Humanes de Madrid2,180+1.9%
221Portugalete2,177-6.8%
222Culleredo2,166-1.8%
223Sant Just Desvern2,163+2.5%
224La Oliva2,160+8.5%
225Tías2,143+3.8%
225Vinaròs2,143-0.6%
227Camargo2,141+0.8%
228Xàtiva2,138-0.8%
229Andújar2,137+0.6%
230Villanueva de la Cañada2,101+6.8%
231El Masnou2,096+0.8%
232San Javier2,090+0.5%
233Los Realejos2,080+2.1%
234Molins de Rei2,075+2%
235Crevillent2,072+1.2%
236Castro-Urdiales2,070+1.5%
237Mislata2,067+1.6%
238Sant Adrià de Besòs2,062+2.5%
239Borriana/Burriana2,042-0.8%
239Miranda de Ebro2,042-0.8%
241Riba-roja de Túria2,036+3.4%
242Castellar del Vallès2,035+1.8%
243Langreo2,034-1.1%
244Santa Perpètua de Mogoda2,028+0.4%
245Santurtzi2,025-8%
246Leioa2,022-6.5%
247Errenteria2,011-7.7%
248Valdepeñas2,009+0.8%
249Santa Pola2,007+3.1%
250el Campello2,0060%

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

Harvard

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

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

Which municipality has the lowest active companies?

Zorita de los Canes, with 4 in 2017.

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

Active companies: other rankings

Municipalities of Spain: more rankings