Business glossary
CNAE Codes — Spanish Business Activity Classification
CNAE (Clasificación Nacional de Actividades Económicas) is Spain's standard classification system for economic activities, based on the EU's NACE Rev. 2 standard. Every Spanish business must declare its CNAE code when registering with the AEAT and the Social Security. The code identifies the company's principal economic activity and affects tax treatment, statistical reporting, regulatory requirements, and sector benchmarking by the AEAT.
TaxWhat Are CNAE Codes?
The Clasificación Nacional de Actividades Económicas (CNAE) is Spain’s official standard for classifying economic activities. The current version, CNAE-2009, was approved by Real Decreto 475/2007 and is Spain’s adaptation of the European Union’s NACE Rev. 2 classification. NACE is in turn derived from the UN’s ISIC (International Standard Industrial Classification).
CNAE codes are 4-digit numbers arranged in a hierarchical structure:
- Section: Letter (A–U), e.g., A = Agriculture, C = Manufacturing, G = Wholesale and retail trade
- Division: 2-digit prefix, e.g., 47 = Retail trade
- Group: 3-digit code, e.g., 47.1 = Retail in non-specialised stores
- Class: 4-digit code, e.g., 4711 = Retail in non-specialised stores with predominance of food
Every Spanish business entity — companies, self-employed individuals, branches of foreign companies — must declare their CNAE code when registering with the AEAT and the Social Security system.
How It Works in Spain
Where CNAE Codes Are Used
CNAE codes appear across multiple administrative systems:
| System | How CNAE is used |
|---|---|
| AEAT census (Modelo 036) | Primary and secondary activity declaration |
| Social Security | Determines AT/EP occupational risk contribution rate |
| INE statistics | Used in industrial surveys, employment statistics, national accounts |
| Commercial Registry | Companies sometimes specify their CNAE alongside their statutory object |
| Public procurement | Bidders classified by CNAE for sector eligibility |
| Banking and finance | Lenders use CNAE for risk assessment; bank accounts may be flagged by CNAE |
| AEAT risk profiling | AEAT benchmarks taxpayer returns against sector averages by CNAE |
The CNAE-2009 Structure
The full CNAE-2009 classification has:
- 21 sections (A through U)
- 88 divisions
- 272 groups
- 615 classes
Key sections for foreign investors in Spain:
| Section | Activity |
|---|---|
| A | Agriculture, forestry, fishing |
| B | Mining and quarrying |
| C | Manufacturing |
| D-E | Energy, water, waste |
| F | Construction |
| G | Wholesale and retail trade |
| H | Transportation and storage |
| I | Accommodation and food services |
| J | Information and communication (tech, software, media) |
| K | Financial and insurance activities |
| L | Real estate activities |
| M | Professional, scientific, and technical activities |
| N | Administrative and support services |
Technology companies typically fall under section J (codes 58–63): software publishing (5820), web portals (6312), computer programming (6201), IT consultancy (6202), data processing (6311).
Social Security: The AT/EP Rate Impact
The most financially significant consequence of the CNAE code is the occupational accident and professional disease (AT/EP) contribution rate applied to the Social Security payroll. This contribution is paid entirely by the employer on top of the general Social Security contributions.
Rates by activity risk level:
| Risk level | Example CNAE | AT/EP rate (approx.) |
|---|---|---|
| Very low | Office services, insurance (64–66) | 1.0–1.5% |
| Low | IT, consultancy, education | 1.5–2.0% |
| Medium | Retail trade, hospitality | 2.0–3.0% |
| High | Construction, manufacturing | 3.5–7.0% |
| Very high | Quarrying, forestry, offshore | 7.0–12.0% |
Companies registered under a low-risk CNAE that actually carry out higher-risk activities (e.g., a holding company with CNAE 6420 but with subsidiary workers doing construction) may face Social Security inspections.
CNAE vs IAE: The Distinction
CNAE and IAE are frequently confused but are different systems:
| Feature | CNAE | IAE |
|---|---|---|
| Purpose | Statistical + administrative classification | Tax classification (Business Activity Tax) |
| Issued by | INE (National Statistics Institute) | AEAT / municipalities |
| Format | 4-digit numerical | Heading (epígrafe), numerical |
| Used for | Census, SS contributions, statistics | Tax calculation, business licences |
| Overlap | Both describe economic activity | Both describe economic activity |
When registering a business, both CNAE and IAE codes must be correctly selected and they must be consistent with each other and with the actual activity.
Key Regulations
- Real Decreto 475/2007: approval of CNAE-2009
- Real Decreto Legislativo 2/2004 (TRLRHL): IAE framework (related but distinct)
- Resolución de 29 de abril de 2009 de la Presidencia del INE: classification rules and updates
- Social Security Order (Orden TAS 2865/2003 as updated): AT/EP contribution rates by CNAE
- Real Decreto 637/2014: updates to contribution rates aligned with CNAE-2009
Practical Implications for Foreign Investors
Correct Code Selection on Incorporation
When incorporating a Spanish S.L. or registering a branch, the CNAE code must be selected before or during the Modelo 036 census registration. Foreign founders often choose a broad code (“management consultancy” 7020 or “holding activities” 6420) without realising that the code affects Social Security costs and AEAT benchmarking.
Companies planning to carry out multiple activities should declare secondary CNAE codes alongside the primary to accurately reflect their operations. Failure to do so creates a risk of administrative penalties and potential Social Security audit.
AEAT Benchmarking and Inspection Risk
The AEAT’s risk-scoring system uses CNAE codes to benchmark a company’s declared margins, costs, and VAT recovery rates against sector norms. A company in CNAE 4711 (retail food) with gross margins significantly above or below sector averages will trigger risk flags. Foreign companies unfamiliar with Spanish sector norms sometimes inadvertently create audit triggers by filing returns that look anomalous compared to domestic peers in the same CNAE.
Updating CNAE Codes
When a business’s principal activity changes — for example, a company that was an importer (CNAE 4669) and pivots to manufacturing (CNAE 2590) — the CNAE must be updated via a Modelo 036 amendment within one month. This triggers a recalculation of the Social Security AT/EP rate for subsequent periods.
How BMC Can Help
We advise on CNAE code selection during business formation, review existing registrations for accuracy, and manage Modelo 036 updates when activities change. We also advise on the Social Security cost implications of CNAE codes for businesses expanding into new activity areas in Spain, and flag CNAE-related benchmarking risks before AEAT inspection triggers arise.
Frequently asked questions
How do I find the right CNAE code for my business?
Is CNAE the same as IAE?
Does the CNAE code affect my Social Security contribution rate?
Can a company have more than one CNAE code?
What happens if a company uses the wrong CNAE code?
Related service
Discover our services in this area
Related sectors
Request a personalized consultation
Our experts are ready to analyze your situation and provide tailored solutions.