Italian tax code calculator
Enter your details and get your codice fiscale straight away, with a printable card and barcode. Works for people born outside Italy too. Everything runs in your browser: nothing is sent or stored.
- Runs in your browser
- No data sent
- Official algorithm
What the codice fiscale is, and why everyone asks for it
The codice fiscale is Italy's tax identification number, and in practice it is the key to daily life there. You cannot sign a rental contract, buy a SIM card, open a bank account, start a job, enrol at a university, complete a property purchase or register with the health service without it. Foreigners usually discover this within days of arriving, when every counter asks for a number nobody explained how to get.
Unlike most tax numbers, it is not random. Sixteen characters encode who you are: three consonants from your surname, three from your first name, your year, month and day of birth (with the day increased by 40 for women), a four character code for your place of birth, and a final check letter. That is why a calculator can work it out from your details alone.
If you were born outside Italy
The rules are identical, with one change: instead of the code of an Italian town, the four place characters carry the code of your country of birth, always beginning with Z. The city does not matter, so someone born in Chicago and someone born in Miami share Z404 for the United States. The calculator above includes every country code, so just start typing the country name.
One warning worth knowing in advance: the Revenue Agency builds your code from your details exactly as they appear on the document you present. If your passport carries two surnames, or a transliteration from a non-Latin alphabet, the official code will follow that spelling. Any mismatch between documents becomes an administrative problem later, so it pays to be consistent from the start.
Calculated code or official code?
This is the distinction that matters. A calculated code is arithmetic: correct, instant, and enough to fill in a form when your card is not to hand. An official code is the one the Revenue Agency has actually assigned to you and recorded in the national tax register. In the overwhelming majority of cases they are the same string, which is why calculators are so widely used in Italy. They diverge only in cases of omocodia, when two people would otherwise share a code and the Agency alters some digits into letters for the second one.
If a bank or a notary asks you to prove your code, a printout from this or any other calculator will not do: you need the certificate of attribution issued by the Agency, or your health insurance card. Our guide on how to get an official codice fiscale walks through every route, including the one that works from abroad.
What the sixteen characters actually mean
Unlike a national insurance or social security number, the codice fiscale is not arbitrary: it is derived from your own details, which is exactly why it can be calculated. The first three letters come from the consonants of your surname, the next three from your given name, taken in a fixed order that skips the second consonant when there are four or more. Then two digits for the year of birth and a letter for the month, drawn from a set that is not alphabetical. The two digits for the day carry a second piece of information: for women, forty is added to the day, so a birthday on the ninth appears as 49. Four characters identify the place of birth, and the last letter is a check character computed from the previous fifteen. Anyone who knows the rules can read your date of birth, your sex and your birthplace straight off the code, which is why it is printed on so many documents but is not, in any sense, a secret.
Common mistakes when filling in the form
Three of them account for almost every mismatch we see:
- Using the name you go by rather than the one on your passport. The code is built from the registered name. If your passport reads "Robert John", both names count, even if everyone calls you Bob.
- Entering the city instead of the country. If you were born outside Italy, the code carries your country of birth, never the city. Boston, Buenos Aires and Sydney do not appear in the code at all.
- Dropping the second surname. Spanish, Portuguese and Brazilian naming conventions often give two surnames, and the Italian register treats them as a single sequence of letters. If both appear on your document, both belong in the calculation.
Accents, apostrophes and non-Latin characters are handled automatically: the algorithm works only on the letters A to Z, so O'Brien, Müller and Nicolò are all processed correctly without you having to strip anything by hand.
Frequently asked questions
What is the codice fiscale?
It is the Italian tax identification number: sixteen characters built from your name, date and place of birth, and sex. Italy uses it the way other countries use a national insurance or social security number, and you need it for almost any contract.
Is a calculated codice fiscale valid?
The algorithm is public, so a calculated code matches the official one in the vast majority of cases. Only the Italian Revenue Agency actually issues codes, and in rare cases of omocodia (two people generating the same code) the real one differs. Use the calculated code to fill in forms, not as proof of identity.
Do I need to be in Italy to get one?
No. Your Italian consulate can issue it, and several large ones do it entirely by email; policies tightened in March 2025 and now vary by consulate, so check yours. If it turns you down, you can authorise someone in Italy to file form AA4/8 for you.
How much does it cost?
Nothing. The Italian Revenue Agency issues the codice fiscale free of charge through every official channel. Paid services sell the errand, not the code.
Which country code do I use if I was born abroad?
A code starting with Z that identifies your country of birth, not your city: Z404 for the United States, Z602 for Brazil, Z600 for Argentina, Z114 for the United Kingdom. Start typing your country in the calculator and it will fill it in.