The laws covering the calculation of a fiscal code were put in place by the Ministry of Economy and Finances on December 23, 1976.
For natural persons, the fiscal code is made of 16 alphanumeric characters; for legal persons (e.g. corporations) it comprises 11 numeric-only characters. While it is possible to calculate one's tax code, the only official tax code is the one provided by the tax office, which avoids cases of identical tax codes (which is a frequent case for people not born in Italy, as in this case the 4-characters town code in the codice fiscale is replaced by "Z" followed by a 3-digit country code) as well as cases where a code is incorrect, but still valid (because provided by the tax office).
The algorithm that follows is used to generate natural persons' fiscal codes.
Here is the fiscal code of a fictitious Matteo Moretti (male), born in Milan on 8 April 1991:
Here is the fiscal code of a fictitious Samantha Miller (female), born in the USA on 25 September 1982, living in Italy:
"Tax code (Codice Fiscale) and SPID". conslondra.esteri.it. 2025-02-25. Archived from the original on 2025-02-25. Retrieved 2021-06-26. https://conslondra.esteri.it/consolato_londra/en/i_servizi/per_i_cittadini/codice_fiscale ↩
"Application for a tax code, notification of change details and requests for a tax code card/duplicate of the national health system card(natural persons)" [Form AA4/8 instructions] (PDF). agenziaentrate.gov.it. p. 3, Part B. Retrieved 30 October 2019. https://www.agenziaentrate.gov.it/portale/documents/20143/278995/Instructions+on+how+to+fill+in+this+form_AA4_8_istruzioni_ING.pdf ↩
"Table of the Italian municipalities cadastral codes" (PDF). agenziaentrate.gov.it. Archived from the original (PDF) on 19 August 2016. Retrieved 24 January 2014. https://web.archive.org/web/20160819012136/http://www.agenziaentrate.gov.it/wps/wcm/connect/321b0500426a5e2492629bc065cef0e8/codicicatastali_comuni_29_11_2010.pdf?MOD=AJPERES&CACHEID=321b500426a5e2492629bc065cef0e8 ↩