The Italian Codice Fiscale: How the Code Is Calculated
Anyone who lives, works, studies or rents a flat in Italy needs a codice fiscale, the 16-character tax code of a person. It is built from the surname, name, date of birth, sex and place of birth by rules set in the Decreto ministeriale of 23 December 1976, and ends in a control letter. This guide walks through each part with worked examples, explains omocodia and the 11-digit numeric code, and why only the code assigned by the Agenzia delle Entrate counts.
Who Assigns the Code
The codice fiscale is assigned by the Agenzia delle Entrate, Italy's tax agency, and printed on the health card (tessera sanitaria) or an assignment certificate. The Agenzia states that codes calculated by applications on websites have no value. A calculation helps you understand a code, check its form or make test data; the assigned code can differ, for example in a case of omocodia or when the data used were wrong.
The 16 Characters
| Positions | Content | Example (Mario Rossi, Rome, 1 January 1980) |
|---|---|---|
| 1–3 | Surname (3 letters) | RSS |
| 4–6 | Name (3 letters) | MRA |
| 7–8 | Year of birth (last 2 digits) | 80 |
| 9 | Month of birth (letter) | A |
| 10–11 | Day of birth and sex | 01 |
| 12–15 | Italian municipality or foreign state of birth | H501 |
| 16 | Control letter | U |
Surname and Name
Surname (art. 3): the first three consonants in order. With fewer than three, the vowels follow in order, and a surname of two letters is completed with X. Parts of a compound surname are read as one sequence, and married women use their maiden surname. Name (art. 4): the same rule, except that a name with four or more consonants gives the 1st, 3rd and 4th consonant. Several names are read together as one.
| Case | Example | Letters |
|---|---|---|
| Surname with three or more consonants | Rossi | RSS |
| Surname with two consonants | Poli | PLO |
| Surname of two letters | Fo | FOX |
| Compound surname | De Luca | DLC |
| Name with four or more consonants | Gianfranco (G N F R N C) | GFR |
| Two names | Anna Maria (N N M R) | NMR |
The decree does not list the vowels or say how to write letters outside the Italian alphabet. The LeedyBox tool treats A, E, I, O and U as vowels, removes accents and asks you to write characters such as ß or Ø as in Italian records.
Date of Birth and Sex
The year is written with its last two digits and the month as a letter (art. 5): A January, B February, C March, D April, E May, H June, L July, M August, P September, R October, S November, T December. The day has two digits, 01–31 for men; for women 40 is added, so it runs from 41 to 71. The century is not in the code, so 04 can mean 1904 or 2004.
Place of Birth
Characters 12–15 are the codice catastale of the Italian municipality (a letter and three digits) or, for people born abroad, of the foreign state, which starts with Z. The Agenzia's own leaflet gives Bologna, A944, and Imola, E289; Rome is H501, the United States Z404 and the United Kingdom Z114. The tool uses the ANPR tables of the Italian Ministry of the Interior, which also list former municipalities and the periods in which each name was valid, so a person born in a town that was later renamed or merged still finds the right code. The foreign-states table lists current states only.
The Control Letter, Step by Step
Each of the first 15 characters gets a value (art. 7). In even positions (2nd, 4th … 14th) A or 0 = 0, B or 1 = 1 … Z = 25. In odd positions (1st, 3rd … 15th) the decree's table applies: A or 0 = 1, B or 1 = 0, C or 2 = 5, D or 3 = 7, E or 4 = 9, F or 5 = 13, G or 6 = 15, H or 7 = 17, I or 8 = 19, J or 9 = 21, K = 2, L = 4, M = 18, N = 20, O = 11, P = 3, Q = 6, R = 8, S = 12, T = 14, U = 16, V = 10, W = 22, X = 25, Y = 24, Z = 23. The sum is divided by 26 and the remainder 0–25 becomes the letter A–Z.
Worked example: for RSSMRA80A01H501 the odd positions R, S, R, 8, A, 1, 5, 1 are worth 8 + 12 + 8 + 19 + 1 + 0 + 13 + 0 = 61 and the even positions S, M, A, 0, 0, H, 0 are worth 18 + 12 + 0 + 0 + 0 + 7 + 0 = 37. The total, 98, leaves 20 when divided by 26, which is U.
Omocodia
When two people's data produce the same 15 characters (art. 6), the Agenzia replaces one or more of the seven digits, starting from the right, with letters (0 = L, 1 = M, 2 = N, 3 = P, 4 = Q, 5 = R, 6 = S, 7 = T, 8 = U, 9 = V) and recalculates the control letter. Replacing the last digit of the example gives RSSMRA80A01H50MM. According to the Agenzia, the base code is then used by nobody, and differentiated codes make up under 0.08% of all codes. Software must accept letters in the digit positions.
The 11-Digit Numeric Code
Companies and other organisations have an 11-digit numeric codice fiscale (art. 8): a 7-digit serial number, 3 digits for the office and a control digit. For the control digit (art. 9), add the digits in odd positions, double those in even positions (adding the two digits of any result above 9), add everything and subtract the unit digit from 10. The Agenzia's own code, 06363391001, gives 15 + 14 = 29 and a control digit of 1. Provisional codes use the same 11-digit form (art. 10).
Frequently Asked Questions
Can I use a codice fiscale I calculated myself?
No. Only the code assigned by the Agenzia delle Entrate is valid; it can differ from a calculation, for example in a case of omocodia.
What code do people born abroad get?
The place part is the code of the foreign state, starting with Z: for example Z404 for the United States or Z114 for the United Kingdom.
Does the code tell a person's age?
Only partly: it contains the year with two digits but not the century.
Does the tool send my data anywhere?
No. Calculation and checks run in your browser; only the place-code data file is loaded from LeedyBox.
Sources
Source: Decreto ministeriale 23 dicembre 1976, «Sistemi di codificazione dei soggetti da iscrivere all'anagrafe tributaria» (Gazzetta Ufficiale n. 345, suppl. ord.) · Last checked:
Source: Decreto ministeriale 23 dicembre 1976, artt. 6–10 (Gazzetta Ufficiale n. 345, suppl. ord.) · Last checked:
Source: Agenzia delle Entrate: Codice fiscale e tessera sanitaria – Risposte alle domande più frequenti · Last checked:
Source: Agenzia delle Entrate: «Il Codice Fiscale» (scheda) · Last checked:
Source: Ministero dell'Interno, ANPR: Tabelle di decodifica – Archivio comuni (aggiornamento 4 giugno 2026) · Last checked:
Source: Ministero dell'Interno, ANPR: Tabelle di decodifica – Stati esteri (aggiornamento 12 gennaio 2024) · Last checked: