Skip to content
Try it yourselfCodice fiscale calculatorYour 16-character code, with every step explained.Open tool

The codice fiscale is 15 characters built from your surname, first name, birth date, sex and birthplace, plus one check letter calculated from the first 15. Every step is a fixed rule, so you can repeat it by hand. The codice fiscale calculator does the same and shows each step, which is a quick way to check your own working.

The rules come from DPR 605/1973 and the Ministry of Finance decree of 12 March 1974. One caveat first: the Agenzia delle Entrate’s page describing the structure was unavailable when we last tried, so our tests are hand-calculated rather than checked against an official example (see our accuracy notes).

The layout

Characters What Rule
1 to 3 Surname consonants, then vowels, padded with X
4 to 6 First name 1st, 3rd, 4th consonant if there are four or more
7 to 8 Year last two digits
9 Month one letter from the month table
10 to 11 Day the day, plus 40 for women
12 to 15 Place codice catastale, or a Z code abroad
16 Check one letter, from a sum

Surname and name

Strip accents, apostrophes and spaces, then split the letters into consonants and vowels, keeping their order.

For the surname, write the consonants, then the vowels, and keep the first three. Bianchi has consonants B, N, C, H, so the code is BNC. A short surname uses vowels and then X: Fo gives F, O, X.

For the first name, if there are four or more consonants take the 1st, 3rd and 4th. Francesca has F, R, N, C, S, C, so the code is F, N, C. With fewer than four consonants, apply the surname rule: Anna has N, N, then vowels A, A, so NNA.

Date and sex

The month letters are A B C D E H L M P R S T for January to December, so June is H, not F. The year is just two digits, which is why a code alone can’t say whether 05 means 1905 or 2005. Women add 40 to the day, so the 29th becomes 69.

Place

For the Italian-born this is the four-character codice catastale of the comune: Milano is F205 and Roma is H501. If the comune has since merged or been renamed, you still use the code it had on your birth date. For people born abroad the code starts with Z and identifies the country, such as Z404 for the United States.

The check letter, by hand

Take Francesca Bianchi, born 29 June 1992 in Milan. The first 15 characters are BNCFNC92H69F205.

Number the characters from 1. Characters in odd positions (1st, 3rd, and so on) are converted with one table, those in even positions with another. For even positions, digits keep their value and letters count A as 0, B as 1, up to Z as 25. The odd table is not a pattern: it is a fixed list from the 1974 decree, stored in our code.

Position 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
Character B N C F N C 9 2 H 6 9 F 2 0 5
Value 0 13 5 5 20 2 21 2 17 6 21 5 5 0 13

Odd positions give 0 + 5 + 20 + 21 + 17 + 21 + 5 + 13 = 102. Even positions give 13 + 5 + 2 + 2 + 6 + 5 + 0 = 33. The total is 135. Divide by 26: 5 × 26 = 130, remainder 5. Letter number 5, counting A as 0, is F. The full code is BNCFNC92H69F205F. This example is illustrative: the arithmetic follows the official rule, but we have not yet confirmed this code with the Agenzia delle Entrate checking service.

Why your real code may still differ

When two people would get the same 15 characters, the Agenzia delle Entrate replaces digits with letters, from the right, and recalculates the check letter. That is omocodia, covered in its own guide. Our calculator lists the variants, but cannot know which one you were given.

Foreign-born people and the Z code

The Z code identifies a state, not a place, so two people born in the same country on the same day share that part. The decoder uses the state table published by the Interior Ministry’s ANPR. Our data does not yet contain states that have ceased to exist, so a code for a former state is shown as “may be a former state” rather than decoded.

Limits of this guide

  • The treatment of several given names written with commas follows our reading: we join all letters as written.
  • A code you calculate has no legal value. The code on your tessera sanitaria or on the certificate from the Agenzia delle Entrate is the only valid one. Check it with the validator or the agency’s own verification service, linked below.

Official sources

Last updated 25 Nov 2026

Found a mistake or have a question? Contact us · How we check our numbers