Italian tax code calculator

Work out your codice fiscale and see how each character is built

RSS
Surname
MRA
First name
80A01
Date and sex
H501
Town
U
Check
Sex

Born abroad? Enter the country code directly (it starts with Z).

Fill in every field to calculate the code.

Check an existing code

See whether a tax code is formally correct.

The codice fiscale is the sixteen-character code that identifies every person dealing with the Italian public administration. It is not random: every character derives from your personal details following precise rules set out in a 1976 decree. Here you can calculate it and, more usefully, understand where each letter comes from.

How it is built

The sixteen characters split into five blocks, always in the same order:

  • Characters 1-3: three letters from the surname.
  • Characters 4-6: three letters from the first name.
  • Characters 7-8: the last two digits of the birth year.
  • Character 9: a letter for the birth month.
  • Characters 10-11: the day of birth, with 40 added for women.
  • Characters 12-15: the cadastral code of the town of birth.
  • Character 16: the check letter, computed from the previous fifteen.

The three letters from the surname

Take the consonants in the order they appear. Rossi becomes RSS, Bianchi becomes BNC.

If there are not enough consonants, vowels follow in their own order: Oliva has only two consonants and becomes LVO — L, V, then the first vowel O.

If three letters still cannot be formed, X fills the gap: the surname Fo becomes FOX. Spaces, apostrophes and accents are ignored, so De Luca is treated as DELUCA and becomes DLC.

The first name follows a different rule

This is the one real trap. If the name has four or more consonants you do not take the first three, but the first, third and fourth.

That is why Francesco becomes FNC and not FRN: the consonants are F, R, N, C, S, C and the second is dropped. With fewer than four consonants the surname rule applies again: Mario becomes MRA.

The difference exists to reduce how many people would end up sharing a code.

Date of birth and sex

The year enters as its last two digits: 1980 becomes 80, and so would 2080. The codice fiscale does not distinguish the two centuries, which is one of its known limitations.

The month is a letter, but not in alphabetical order: January A, February B, March C, April D, May E, June H, July L, August M, September P, October R, November S, December T. Letters easily confused with others were skipped deliberately.

The day takes two digits. For women, 40 is added: a woman born on the 15th shows 55. That is how the code records sex without spending a character on it.

The town code

The next four characters are the cadastral code, also called the Belfiore code: one letter and three digits assigned to every Italian town. Rome is H501, Milan F205, Naples F839, Turin L219.

People born abroad have a country rather than a town, and the code starts with Z: enter it by hand, as the tool above covers Italian towns.

Watch out for towns that have been merged or abolished: the correct code is the one in force on the date of birth, which may no longer appear in current lists.

The check character

The final letter adds no information: it exists to catch transcription errors. Each of the previous fifteen characters gets a value — from two different tables depending on whether the position is odd or even — and the sum is divided by 26, with the remainder giving the letter.

In practice, getting a single letter wrong almost always breaks the check. That is how online forms can tell you immediately that a code is mistyped, without consulting any archive.

When two people share a code: omocodia

The rules do not guarantee uniqueness. Two people with similar names, born the same day in the same town, can produce the same code.

The Revenue Agency then steps in and replaces some digits with letters, starting from the last: 0 becomes L, 1 becomes M, 2 N, 3 P, 4 Q, 5 R, 6 S, 7 T, 8 U, 9 V.

So a code containing letters where you would expect numbers is not wrong: it has been corrected for omocodia, and it is the only valid one for that person.

If the result does not match your code

The most common causes, in order: the registered surname or name differs from the one you normally use (including middle names), the town of birth has been merged or renamed, or your code was corrected for omocodia.

In all these cases the right code is the one on your health card, not the one calculated here.