The codice fiscale (Italian tax identification code) is one of the most important identifiers in the life of every Italian citizen. Composed of 16 alphanumeric characters, it contains fundamental personal information and is used in virtually every interaction with public administration, the healthcare system, the tax authority, and much more. But how exactly is it calculated? What do those letters and numbers mean? In this comprehensive guide, we will discover the structure of the codice fiscale, its calculation algorithm, the phenomenon of "omocodie" (duplicate codes), and how to verify the correctness of a codice fiscale.

What Is the Codice Fiscale and What It Is Used For

The codice fiscale was introduced in Italy with Presidential Decree No. 605 of September 29, 1973, to uniquely identify individuals and other entities in their dealings with public agencies and administrations. It is assigned by the Agenzia delle Entrate (Revenue Agency) and, for newborns, by the municipality of birth or the hospital at the time of civil registration.

The codice fiscale is used for:

  • Tax returns and dealings with the tax authority
  • Enrollment in the National Health Service
  • Opening bank accounts
  • Signing contracts (rental, employment, utilities)
  • Enrollment in schools and universities
  • Requesting INPS (social security) benefits
  • Purchasing prescription medications
  • Issuing and receiving invoices

The Structure of the Codice Fiscale: The 16 Characters Explained

The codice fiscale of an individual is composed of 16 characters, divided into groups with specific meanings. Let's take the fictitious codice fiscale RSSMRA85M01H501Z as an example and analyze it:

PositionCharactersMeaningExample
1-33 lettersSurnameRSS = Rossi
4-63 lettersFirst nameMRA = Mario
7-82 digitsYear of birth85 = 1985
91 letterMonth of birthM = August
10-112 digitsDay of birth and gender01 = day 1, male
12-151 letter + 3 digitsMunicipality cadastral codeH501 = Rome
161 letterCheck characterZ

How surname letters are derived (positions 1-3)

The consonants of the surname are taken in the order they appear. If there are fewer than three consonants, vowels are added in order. If the surname has fewer than three total letters, it is completed with the letter X.

  • ROSSI - consonants R, S, S - RSS
  • RE - consonant R, vowel E, completion X - REX
  • AIELLO - consonants L, L; vowels A, I - LLA (all consonants first, then vowels)
  • DE LUCA - treated as "DELUCA", consonants D, L, C - DLC

How first name letters are derived (positions 4-6)

The procedure is similar to that of the surname, with one important difference: if the first name has more than three consonants, the first, third, and fourth consonants are taken (skipping the second).

  • MARIO - consonants M, R - vowels A, I - MRA (only 2 consonants, vowel added)
  • FRANCESCO - consonants F, R, N, C, S, C - take 1st, 3rd, and 4th: FNC
  • GIUSEPPE - consonants G, S, P, P - take 1st, 3rd, and 4th: GPP
  • ADA - consonant D, vowels A, A - DAA

Year and month of birth (positions 7-9)

The year is represented by the last two digits (85 for 1985, 00 for 2000, 26 for 2026). The month is encoded with a letter according to this table:

MonthLetterMonthLetter
JanuaryAJulyL
FebruaryBAugustM
MarchCSeptemberP
AprilDOctoberR
MayENovemberS
JuneHDecemberT

Day of birth and gender (positions 10-11)

For males, the day of birth is indicated directly (from 01 to 31). For females, 40 is added to the day. So a woman born on the 15th of the month will have the number 55 (15 + 40), while a man born on the same day will have 15.

Municipality cadastral code (positions 12-15)

Every Italian municipality has a unique cadastral code composed of one letter and three digits. Some well-known examples:

  • Rome: H501
  • Milan: F205
  • Naples: F839
  • Turin: L219
  • Florence: D612

For those born abroad, the code of the foreign country of birth is used (it always starts with Z, for example Z404 for Romania).

The check character (position 16)

The last character is a letter calculated with a specific algorithm that verifies the correctness of the entire code. The algorithm assigns different values to characters in even and odd positions, sums everything, divides by 26, and converts the remainder to a letter (0=A, 1=B, etc.). This character serves to detect transcription errors.

Omocodie: When Two People Have the Same Code

It can happen that two different people have the same personal data relevant to the codice fiscale: same surname, first name, date of birth, and municipality of birth. In this case, an "omocodia" occurs, meaning two identical codici fiscali.

To resolve the problem, the Agenzia delle Entrate modifies one of the two codes by replacing one or more digits (starting from the last one, at position 14, then 13, etc.) with letters according to a conversion table:

Digit0123456789
LetterLMNPQRSTUV

For example, if RSSMRA85M01H501Z is already assigned, the second duplicate code will become RSSMRA85M01H50MZ (the 1 at position 14 becomes M). The check character is of course recalculated.

Reverse Codice Fiscale: Tracing Personal Data

From the codice fiscale, it is possible to trace several pieces of personal data:

  • Gender: if the digits at positions 10-11 are greater than 40, the person is female
  • Date of birth: year (positions 7-8), month (position 9), day (positions 10-11, subtracting 40 for women)
  • Municipality of birth: from the cadastral code (positions 12-15)

It is not possible, however, to trace the full name and surname with certainty, since three letters for each are insufficient: "RSS" could correspond to Rossi, Russo, Rossa, etc.

With our codice fiscale calculator, you can perform both the direct calculation (from personal data to code) and the reverse calculation (from code to data), obtaining immediate and verified results.

Where to Find Your Codice Fiscale

The codice fiscale appears on several documents:

  • Health card / National Services Card (CNS): the most common document, issued by the Agenzia delle Entrate
  • Electronic identity card (CIE): since 2016, the codice fiscale is printed on the CIE
  • Assignment certificate: document issued by the Agenzia delle Entrate
  • Online tax portal: accessible via SPID, CIE, or CNS on the Agenzia delle Entrate website

Health Card and Codice Fiscale

The Italian health card serves a dual function: it is both the National Health Service card and the document containing the codice fiscale. On the back of the card, there is also a barcode and a magnetic strip containing the codice fiscale in machine-readable format.

The health card has an expiration date (generally 6 years) and is automatically renewed by the Agenzia delle Entrate. In case of loss or deterioration, a duplicate can be requested online through the Agenzia delle Entrate website or by visiting a local office.

Since 2022, it is possible to have a digital version of the health card in the IO app or in the Electronic Health File, which has the same legal validity as the physical one.

How to Verify a Codice Fiscale

To verify if a codice fiscale is formally correct, you can:

  1. Check the length: it must be 16 characters
  2. Verify the format: 6 letters + 2 digits + 1 letter + 2 digits + 1 letter + 3 digits + 1 letter
  3. Check the check character: recalculate it with the algorithm and compare
  4. Verify consistency: the cadastral code must correspond to an existing municipality, the date must be valid

For an official verification, the Agenzia delle Entrate provides an online service that confirms whether the codice fiscale is actually present in their database and who it is associated with.

Codice Fiscale for Foreign Citizens

Foreign citizens residing in Italy also receive a codice fiscale. For those born abroad, the cadastral code of the birthplace is that of the foreign country (starts with Z). The codice fiscale is assigned at the time of the residence permit request or civil registration.

For EU citizens who move to Italy, the codice fiscale is assigned by the Agenzia delle Entrate upon request, and it is necessary for working, opening a bank account, and accessing public services.

Temporary (Numeric) Codice Fiscale

There is also a temporary codice fiscale, composed of 11 digits (similar to the VAT number), which is assigned in special cases:

  • When the definitive code cannot be calculated immediately
  • For entities other than individuals (organizations, associations) that do not have a VAT number
  • In emergency or temporary situations

The temporary code is then replaced by the definitive 16-character code as soon as possible.

Frequently Asked Questions

Can the codice fiscale change?

In principle, the codice fiscale remains unchanged throughout life. However, it can change in case of corrections to personal data (for example, an error in the place of birth) or in case of omocodia resolved by the Agenzia delle Entrate.

How do I calculate a newborn's codice fiscale?

The codice fiscale is automatically assigned at birth when the municipality registers the newborn in the civil registry. Parents will receive the health card at their home address within a few weeks. Alternatively, you can use our online calculator to compute it from the child's personal data.

What do I do if I lose my health card?

You can request a duplicate online on the Agenzia delle Entrate website by logging in with SPID, CIE, or CNS, or by calling the toll-free number 800.030.070, or by visiting an Agenzia delle Entrate office.

Is the codice fiscale the same as the VAT number?

No, they are two different codes. The VAT number is an 11-digit numeric code assigned to persons carrying out economic activities. For sole proprietors and professionals, the VAT number often numerically coincides with the codice fiscale, but for companies they are always different.

Can I have two codici fiscali?

No, each person must have a single codice fiscale. If two codes have been assigned by mistake, it is necessary to go to the Agenzia delle Entrate for rectification. The agency will cancel the duplicate code.

How is the codice fiscale calculated for someone with a compound surname?

Compound surnames (with a space or hyphen) are treated as a single string. For example, "De Rossi" becomes "DEROSSI" and consonants are extracted normally: D, R, S - DRS.