What is the Control Character (CIN)
The CIN (Control Internal Number) is the 16th and last character of the Italian Tax Code. It's always a letter (A to Z) calculated algorithmically from the first 15 characters of the code.
Its main function is to verify the integrity of the Tax Code: if even a single character of the first 15 is typed incorrectly, the calculated CIN will be different from the correct one, allowing the error to be detected immediately.
RSSMRA85C15H501S
15 characters + CIN
Why CIN Matters
The control character plays a fundamental role in error prevention:
- Typos: Detects single incorrectly typed characters
- Transpositions: Identifies swapped adjacent characters
- Omissions: Flags missing characters
- Additions: Identifies extra characters
The CIN Calculation Algorithm
The control character calculation follows a precise algorithm in 5 steps:
Step 1: Separate positions
Consider the first 15 characters, distinguishing between odd (1,3,5,7,9,11,13,15) and even (2,4,6,8,10,12,14) positions.
Step 2: Convert odd positions
Each character in odd position is converted using the Odd Table.
Step 3: Convert even positions
Each character in even position is converted using the Even Table.
Step 4: Sum all values
Add up all values from both odd and even position conversions.
Step 5: Calculate remainder
Divide the sum by 26 and take the remainder. The remainder (0-25) corresponds directly to the CIN letter (A=0, B=1, ... Z=25).
Complete Conversion Tables
Table for ODD Positions
| Char | 0/A | 1/B | 2/C | 3/D | 4/E | 5/F | 6/G | 7/H | 8/I | 9/J |
|---|---|---|---|---|---|---|---|---|---|---|
| Val | 1 | 0 | 5 | 7 | 9 | 13 | 15 | 17 | 19 | 21 |
| Char | K | L | M | N | O | P | Q | R | S | T |
|---|---|---|---|---|---|---|---|---|---|---|
| Val | 2 | 4 | 18 | 20 | 11 | 3 | 6 | 8 | 12 | 14 |
| Char | U | V | W | X | Y | Z |
|---|---|---|---|---|---|---|
| Val | 16 | 10 | 22 | 25 | 24 | 23 |
Table for EVEN Positions
| Char | 0/A | 1/B | 2/C | 3/D | 4/E | 5/F | 6/G | 7/H | 8/I | 9/J |
|---|---|---|---|---|---|---|---|---|---|---|
| Val | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
K=10, L=11, M=12, N=13, O=14, P=15, Q=16, R=17, S=18, T=19, U=20, V=21, W=22, X=23, Y=24, Z=25
Remainder → CIN Letter Table
| Resto | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Lettera | A | B | C | D | E | F | G | H | I | J | K | L | M |
| Resto | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Lettera | N | O | P | Q | R | S | T | U | V | W | X | Y | Z |
Complete Practical Example
Let's calculate the CIN for RSSMRA85C15H501:
Odd positions (1,3,5,7,9,11,13,15):
R(8) + S(12) + M(18) + A(1) + 8(19) + 1(0) + H(17) + 0(1) = 76
Even positions (2,4,6,8,10,12,14):
S(18) + R(17) + 5(5) + C(2) + 5(5) + 5(5) + 1(1) = 53
Final calculation:
Sum: 76 + 53 = 129
Remainder: 129 mod 26 = 25 → Z
