Skip to content

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.

Tax

What 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:

SystemHow CNAE is used
AEAT census (Modelo 036)Primary and secondary activity declaration
Social SecurityDetermines AT/EP occupational risk contribution rate
INE statisticsUsed in industrial surveys, employment statistics, national accounts
Commercial RegistryCompanies sometimes specify their CNAE alongside their statutory object
Public procurementBidders classified by CNAE for sector eligibility
Banking and financeLenders use CNAE for risk assessment; bank accounts may be flagged by CNAE
AEAT risk profilingAEAT 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:

SectionActivity
AAgriculture, forestry, fishing
BMining and quarrying
CManufacturing
D-EEnergy, water, waste
FConstruction
GWholesale and retail trade
HTransportation and storage
IAccommodation and food services
JInformation and communication (tech, software, media)
KFinancial and insurance activities
LReal estate activities
MProfessional, scientific, and technical activities
NAdministrative 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 levelExample CNAEAT/EP rate (approx.)
Very lowOffice services, insurance (64–66)1.0–1.5%
LowIT, consultancy, education1.5–2.0%
MediumRetail trade, hospitality2.0–3.0%
HighConstruction, manufacturing3.5–7.0%
Very highQuarrying, forestry, offshore7.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:

FeatureCNAEIAE
PurposeStatistical + administrative classificationTax classification (Business Activity Tax)
Issued byINE (National Statistics Institute)AEAT / municipalities
Format4-digit numericalHeading (epígrafe), numerical
Used forCensus, SS contributions, statisticsTax calculation, business licences
OverlapBoth describe economic activityBoth 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?
The CNAE-2009 list is published by Spain's National Statistics Institute (INE). You can search the full hierarchical classification at ine.es. The CNAE code is a 4-digit number. When in doubt between two codes, the correct one is the one that best describes the principal revenue-generating activity, not a secondary or ancillary activity.
Is CNAE the same as IAE?
No. CNAE and IAE (Impuesto sobre Actividades Económicas) are related but separate classification systems. CNAE is a statistical classification used for Social Security, AEAT census registration, and public statistics. IAE is a tax classification used specifically for the Business Activity Tax. Both must be consistent with the actual business activities, but they use different codification systems.
Does the CNAE code affect my Social Security contribution rate?
Yes. The CNAE code determines the applicable occupational accident and professional disease contribution rate (cuota de accidentes de trabajo y enfermedades profesionales, AT/EP) that employers must pay on top of the general Social Security contribution. Rates vary significantly by industry — manufacturing, construction, and transportation have higher AT/EP rates than office-based services.
Can a company have more than one CNAE code?
A company must declare a primary CNAE code (the principal activity) with the AEAT. Additional secondary activities can also be declared. For Social Security purposes, the contribution rate is based on the primary CNAE code that generates the most revenue. If the principal activity changes, Modelo 036 must be updated to reflect the new primary code.
What happens if a company uses the wrong CNAE code?
Using an incorrect CNAE code can result in inaccurate Social Security contributions (potentially underpaying AT/EP contributions for a higher-risk activity), incorrect sector risk profiling by the AEAT, and formal infraction penalties for census inaccuracies. It should be corrected promptly via Modelo 036 update.
Back to glossary

Request a personalized consultation

Our experts are ready to analyze your situation and provide tailored solutions.

Call Contact