NIF - Numere de Identificare Europene

In aceasta sectiune sunt prezentati algoritmii pentru validarea unor diverse coduri din statele uniunii europene. Aceste coduri pot fi coduri numerice personale, coduri de identificare fiscala, coduri de TVA etc.


TaraComentariiFormatExemplu
AT
Austria
A(1)+N(1-7)+C(1)
A(1)={U}
U12345675
S=N(1)+2#N(2)+N(3)+2#N(4)+N(5)+2#N(6)+N(7)
C(1)=10-(S+4)%10; daca C(1)=10, C(1)=0
BE
Belgia
N(1-8)+C(1-2)
N(2)>1
1234567894
C(1-2)=97-N(1-7)%97
BG
Bulgaria
N(1-9)+C(1)
if N(1)={2,3}, N(2-3)={22}
1234567892
S=4*N(1)+3*N(2)+2*N(3)+7*N(4)+6*N(5)+5*N(6)+4*N(7)+3*N(8)+2*N(9)
C(1)=11-S%11; daca C(1)=11, C(1)=0; if C(1)=10, eronat
CY
Cipru
N(1-8)+C(1)
N(1)={0,1,3,4,5,9}
12345678F
N(1,3,5,7){0,1,2,3,4,5,6,7,8,9} → N(1,3,5,7){1,0,5,7,9,13,15,17,19,21}
S=N(1)+N(2)+N(3)+N(4)+N(5)+N(6)+N(7)+N(8)
C(1)=S%26
C{0-25} → C{A-Z}
CZ
Cehia
Persoane juridice N(1-7)+C(1)
N(1)={0,1,2,3,4,5,6,7,8}
12345679
S=8*N(1)+7*N(2)+6*N(3)+5*N(4)+4*N(5)+3*N(6)+2*N(7)
C(1)=11-S%11; daca C(1)=10, C(1)=0; daca C(1)=11, C(1)=1
Cazuri speciale N(1-8)+C(1)
N(1)={6}
612345670
S=8*N(2)+7*N(3)+6*N(4)+5*N(5)+4*N(6)+3*N(7)+2*N(8)
C(1)=9-(11-S%11)%10
9 cifre - persoane fizice N(1-9)
N(1-2)={00-53,80-99}
N(3-4)={01-12,51-62}
daca N(3-4)={02,52} si N(1-2)%4>0, N(5-6)={01-28}
daca N(3-4)={02,52} si N(1-2)%4=0, N(5-6)={01-29}
daca N(3-4)={04,06,09,11,54,56,59,61}, N(5-6)={01-30}
daca N(3-4)={01,03,05,07,08,10,12,51,53,55,57,58,60,62}, N(5-6)={01-31}
991231123
 
10 cifre - persoane fizice N(1-10)
N(1-2)={54-99}
N(3-4)={01-12,51-62}
daca N(3-4)={02,52} si N(1-2)%4>0, N(5-6)={01-28}
daca N(3-4)={02,52} si N(1-2)%4=0, N(5-6)={01-29}
daca N(3-4)={04,06,09,11,54,56,59,61}, N(5-6)={01-30}
daca N(3-4)={01,03,05,07,08,10,12,51,53,55,57,58,60,62}, N(5-6)={01-31}
6306150004
daca (N(1-2)+N(3-4)+N(5-6)+N(7-8)+N(9-10))%11=0 si N(1-10)%11=0, valid
DE
Germania
N(1-8)+C(1)
N(1-8)>0
123456788
S=0
FOR I=1 TO 8
S=2*((N(I)+S+9)%10+1)%11
NEXT I
C(1)=11-S; daca C(1)=10, C(1)=0
DK
Danemarca
N(1-8)
N(1)>0
12345674
S=2*N(1)+7*N(2)+6*N(3)+5*N(4)+4*N(5)+3*N(6)+2*N(7)+N(8)
daca S%11=0, valid
EE
Estonia
N(1-8)+C(1) 123456780
S=3*N(1)+7*N(2)+1*N(3)+3*N(4)+7*N(5)+1*N(6)+3*N(7)+7*N(8)
C(1)=10-S%10; daca C(1)=10, C(1)=0
ES
Spania
Persoane juridice pro-profit A(1)+N(1-7)+C(1)
A(1)={A-H}
A12345674
S=2#N(1)+N(2)+2#N(3)+N(4)+2#N(5)+N(6)+2#N(7)
C(1)=10-S%10; daca C=10, C=0
Persoane juridice non-profit A(1)+N(1-7)+C(1)
A(1)={N,P,Q,S}
P1234567D
S=2#N(1)+N(2)+2#N(3)+N(4)+2#N(5)+N(6)+2#N(7)
C(1)=10-S%10
C{1-10} → C{A-J}
Persoane fizice N(1-8)+C(1) 12345678Z
C(1)=1+N(1-8)%23
C{1-23} → C{T,R,W,A,G,M,Y,F,P,D,X,B,N,J,Z,S,Q,V,H,L,C,K,E}
Persoane fizice straine, sub 14 ani sau ne-rezidenti A(1)+N(1-7)+C(1)
A(1)={K,L,M,X}
K1234567L
C(1)=1+N(1-7)%23
C{1-23} → C{T,R,W,A,G,M,Y,F,P,D,X,B,N,J,Z,S,Q,V,H,L,C,K,E}
FI
Finland
N(1-7)+C(1) 12345671
S=7*N(1)+9*N(2)+10*N(3)+5*N(4)+8*N(5)+4*N(6)+2*N(7)
C(1)=11-S%11; daca C(1)=11, C(1)=0; if C(1)=10, eronat
FR
Franta
Sistem vechi C(1-2)+N(1-9)
N(1-9)>0
32123456789
C(1-2)=(N(1-9)*100+12)%97
Sistem nou C(1-2)+N(1-9)
N(1-9)>0
C(1-2)={A-H,J-N,P-Z} | {0-9}
daca C(1) este alfanumeric, C(2) trebuie sa fie numeric si invers.
2H123456789
C{0-9,A-H,J-N,P-Z} → C{0-33}
daca C(1)<10, S=C(1)*24+C(2)-10
daca C(1)>9, S=C(1)*34+C(2)-100
X=S%11
S=S +1
Y=(N(1-9)+S)%11
daca X=Y, valid
GB
Marea Britanie
Departament guvernamental A(1-2)+N(1-3)
A(1-2)={GD}
N(1-3)<500
GD123
 
Ministerul sanatatii A(1-2)+N(1-3)
A(1-2)={HA}
N(1-3)>499
HA567
 
Standard N(1-9)
N(1-7)={0000001-0019999,1000000-9999999}
N(8-9)<97
123456782
S=8*N(1)+7*N(2)+6*N(3)+5*N(4)+4*N(5)+3*N(6)+2*N(7)+10*N(8)+N(9)
daca S%97=0, valid
Grup comercial N(1-10)
N(1-7)={0000001-0019999,1000000-9999999}
N(8-9)<97
N(10)={3}
1234567823
S=8*N(1)+7*N(2)+6*N(3)+5*N(4)+4*N(5)+3*N(6)+2*N(7)+10*N(8)+N(9)
daca S%97=0, valid
Islanda N(1-12)
N(1-3)={000,001}
N(4-10)={0000001-0019999,1000000-9999999}
N(11-12)<97
001123456782
S=8*N(4)+7*N(5)+6*N(6)+5*N(7)+4*N(8)+3*N(9)+2*N(10)+10*N(11)+N(12)
daca S%97=0, valid
Group comercial Islanda N(1-13)
N(1-3)={000,001}
N(4-10)={0000001-0019999,1000000-9999999}
N(11-12)<97
N(13)={3}
0011234567823
S=8*N(4)+7*N(5)+6*N(6)+5*N(7)+4*N(8)+3*N(9)+2*N(10)+10*N(11)+N(12)
daca S%97=0, valid
GR
Grecia
Conform normei ISO-3166-1 , prefixul GR corespunde Greciei dar Directive Europeana 2001/115, in urma cereri din partea Greciei, a schimbat prefixul in EL. Ambele pot fi folosite acum.
Sistem de 7 cifre N(1-7)+C(1) 12345670
S=128*N(1)+64*N(2)+32*N(3)+16*N(4)+8*N(5)+4*N(6)+2*N(7)
C(1)=S%11; daca C(1)=10, C(1)=0
Sistem de 8 cifre N(1-8)+C(1) 123456783
S=256*N(1)+128*N(2)+64*N(3)+32*N(4)+16*N(5)+8*N(6)+4*N(7)+2*N(8)
C(1)=S%11; daca C(1)=10, C(1)=0
HU
Ungaria
N(1-7)+C(1)
N(1)>0
12345676
S=9*N(1)+7*N(2)+3*N(3)+1*N(4)+9*N(5)+7*N(6)+3*N(7)
C(1)=10-S%10; daca C(1)=10, C(1)=0
IE
Irlanda
Vechi N(1)+A(1)+N(2-6)+C(1)
N(1)>6
A(1)={A-Z,+,*}
7A12345J
S=7*N(2)+6*N(3)+5*N(4)+4*N(5)+3*N(6)+2*N(1)
C(1)=S%23
C{0-22} → C{W,A-V}
Nou N(1-7)+C(1)
N(1-7)>0
1234567T
S=8*N(1)+7*N(2)+6*N(3)+5*N(4)+4*N(5)+3*N(6)+2*N(7)
C(1)=S%23
C{0-22} → C{W,A-V}
IT
Italia
Codul fiscal italia pentru persoane fizice, aprobat prin decretul #13813 din 12/23/1976, nu este verificat deoarece nu este acceptat drept cod valid pentru operatiile intercomunitare legate de TVA
N(1-10)+C(1)
N(1-7)>0
N(8-10)={1-100,120,121}
12345670017
S=N(1)+2#N(2)+N(3)+2#N(4)+N(5)+2#N(6)+N(7)+2#N(8)+N(9)+2#N(10)
C(1)=10-S%10; daca C(1)=10, C(1)=0
LT
Lituania
Persoane juridice N(1-8)+C(1)
N(8)={1}
123456715
S=1*N(1)+2*N(2)+3*N(3)+4*N(4)+5*N(5)+6*N(6)+7*N(7)+8*N(8)
daca S%11=10, S=3*N(1)+4*N(2)+5*N(3)+6*N(4)+7*N(5)+8*N(6)+9*N(7)+1*N(8)
C(1)=S%11; daca C(1)=10, C(1)=0
Platitori de taxe temporari si persoane fizice N(1-11)+C(1)
N(11)={1}
123456789011
S=1*N(1)+2*N(2)+3*N(3)+4*N(4)+5*N(5)+6*N(6)+7*N(7)+8*N(8)+9*N(9)+1*N(10)+2*N(11)
daca S%11=10, S=3*N(1)+4*N(2)+5*N(3)+6*N(4)+7*N(5)+8*N(6)+9*N(7)+1*N(8)+2*N(9)+3*N(10)+4*N(11)
C(1)=S%11; daca C(1)=10, C(1)=0
LU
Lubembourg
N(1-6)+C(1-2)
N(1-6)>0
12345613
C(1-2)=N(1-6)%89
LV
Letonia
Persoane juridice N(1-10)+C(1)
N(1)={4,5,6,7,8,9}
41234567891
S=9*N(1)+1*N(2)+4*N(3)+8*N(4)+3*N(5)+10*N(6)+2*N(7)+5*N(8)+7*N(9)+6*N(10)
daca S%11=4 si N(1)=9, S=S-45
daca S%11=4, C(1)=4-S%11
daca S%11>4, C(1)=14-S%11
daca S%11<4, C(1)=3-S%11
Persoane fizice N(1-11)
daca N(3-4)={02} si N(5-6)%4>0, N(1-2)={01-28}
daca N(3-4)={02} si N(5-6)%4=0, N(1-2)={01-29}
daca N(3-4)={04,06,09,11}, N(1-2)={01-30}
daca N(3-4)={01,03,05,07,08,10,12}, N(1-2)={01-31}
N(3-4)={01-12}
15066312345
 
MT
Malta
N(1-6)+C(1-2)
N(1-6)>100000
12345634
S=3*N(1)+4*N(2)+6*N(3)+7*N(4)+8*N(5)+9*N(6)
C(1-2)=37-S%37
NL
Olanda
N(1-8)+C(1)+A(1)+N(9-10)
N(1-8)>0
A(1)={B}
123456782B90
S=9*N(1)+8*N(2)+7*N(3)+6*N(4)+5*N(5)+4*N(6)+3*N(7)+2*N(8)
C(1)=S%11; daca C(1)=10, eronat
PL
Polonia
N(1-9)+C(1) 1234567883
S=6*N(1)+5*N(2)+7*N(3)+2*N(4)+3*N(5)+4*N(6)+5*N(7)+6*N(8)+7*N(9)
C(1)=S%11; daca C(1)=10, eronat
PT
Portugalia
N(1-8)+C(1)
N(1)>0
123456789
S=9*N(1)+8*N(2)+7*N(3)+6*N(4)+5*N(5)+4*N(6)+3*N(7)+2*N(8)
C(1)=11-S%11; daca C(1)=10, C(1)=0; daca C(1)=11, C(1)=0
RO
Romania
Persoane juridice N(1-9)+C(1) 1234567897
S=7*N(1)+5*N(2)+3*N(3)+2*N(4)+1*N(5)+7*N(6)+5*N(7)+3*N(8)+2*N(9)
C(1)=S*10%11; daca C(1)=10, C(1)=0
Persoane fizice N(1-12)+C(1)
N(1)={1,2,3,4,6}
N(4-5)={01-12}
daca N(4-5)={02} si N(2-3)%4>0, N(6-7)={01-28}
daca N(4-5)={02} si N(2-3)%4=0, N(6-7)={01-29}
daca N(4-5)={04,06,09,11}, N(6-7)={01-30}
daca N(4-5)={01,03,05,07,08,10,12}, N(6-7)={01-31}
1630615123457
S=2*N(1)+7*N(2)+9*N(3)+1*N(4)+4*N(5)+6*N(6)+3*N(7)+5*N(8)+8*N(9)+2*N(10)+7*N(11)+9*N(12)
C(1)=S%11; daca C(1)=10, C(1)=1
SE
Suedia
N(1-9)+C(1)+N(10-11)
N(10-11)>0
123456789701
S=2#N(1)+N(2)+2#N(3)+N(4)+2#N(5)+N(6)+2#N(7)+N(8)+2#N(9)
C(1)=10-S%10; daca C(1)=10, C(1)=0
SI
Slovenia
N(1-7)+C(1)
N(1-7)>999999
12345679
S=8*N(1)+7*N(2)+6*N(3)+5*N(4)+4*N(5)+3*N(6)+2*N(7)
C(1)=11-S%11; daca C(1)=10, C(1)=0; daca C(1)=11, C(1)=1
SK
Slovacia
Pentru persoanele nascute in anul 2000, numarul de identitate si platitorii de taxe nu pot fi diferentiati.
Numar de identitate N(1-9)+C(1)
N(1-2)={00}
0012345675
S=8*N(3)+7*N(4)+6*N(5)+5*N(6)+4*N(7)+3*N(8)+2*N(9)
C(1)=11-S%11; daca C(1)=10, C(1)=0; daca C(1)=11, C(1)=1
Platitori de taxe N(1-10)
N(1-2)={00}
0012345678
 
Persoane fizice (nascute inainte de 1/1/1954) N(1-9)
N(1-2)={00-53}
N(3-4)={01-12,51-62}
daca N(3-4)={02,52} si N(1-2)%4>0, N(5-6)={01-28}
daca N(3-4)={02,52} si N(1-2)%4=0, N(5-6)={01-29}
daca N(3-4)={04,06,09,11,54,56,59,61}, N(5-6)={01-30}
daca N(3-4)={01,03,05,07,08,10,12,51,53,55,57,58,60,62}, N(5-6)={01-31}
531231123
 
Persoane fizice (nascute dupa 31/12/1953) N(1-10)
N(1-2)={54-99}
N(3-4)={01-12,51-62}
daca N(3-4)={02,52} si N(1-2)%4>0, N(5-6)={01-28}
daca N(3-4)={02,52} si N(1-2)%4=0, N(5-6)={01-29}
daca N(3-4)={04,06,09,11,54,56,59,61}, N(5-6)={01-30}
daca N(3-4)={01,03,05,07,08,10,12,51,53,55,57,58,60,62}, N(5-6)={01-31}
6306151234
 


Notatii

X+Y : X adunat cu Y.

X-Y : X scazut din Y.

X*Y : X inmultit cu Y.

X#Y : X inmultit Y si cifrele rezultatului adunate. Spre examplu, 2*6=12, 1+2=3, apoi, 2#6=3.

X/Y : X impartit la Y.

X\Y : impartire intreaga a lui X la Y. Spre exemple, 15/6=2 si rest 3, adica, 15\6=2.

X%Y : restul impartirii intregi a lui X la Y (MODULO). Spre examplu, 15/6=2 si rest 3 , adica, 15%6=3.

X{a-b} → X{c-d} : transformarea elementelor a-b in corespondenti lor c-d. Spre exemplu X{1-3} → X{a-c}, convertit 1 in a, 2 in b si 3 in c.

In celula Format, formatul este specificat inaintea conditiilor pentru validare. Numerele se identifica prin "N" urmate de un interval de numere intre paranteze; caracterele alfanumerice, prin "A" urmate de un interval de caractere intre paranteze, si caracterele de control cu "C" urmate de un interval, in care se poate situa caracterul , intre paranteze.