Vat code computing rules for countries inside of European Union of 27 States: ¸land Islands, Austria, Belgium, Bulgaria, Croatia, Cyprus, Czech Republic, Denmark, Estonia, Finland, France, Germany, Greece, Hungary, Ireland, Italy, Latvia, Lithuania, Luxembourg, Malta, Netherlands, Poland, Portugal, Romania, Slovakia, Slovenia, Spain, Sweden and United Kingdom. See notation used in forms.
Country | Coment | Format | Example |
---|---|---|---|
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; if C(1)=10, C(1)=0 | |||
BE Belgium |
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; if C(1)=11, C(1)=0; if C(1)=10, wrong | |||
CY Cyprus |
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 Czech Republic | Legal entities |
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; if C(1)=10, C(1)=0; if C(1)=11, C(1)=1 |
|||
Special cases |
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 digit individual |
N(1-9) N(1-2)={00-53,80-99} N(3-4)={01-12,51-62} if N(3-4)={02,52} and N(1-2)%4>0, N(5-6)={01-28} if N(3-4)={02,52} and N(1-2)%4=0, N(5-6)={01-29} if N(3-4)={04,06,09,11,54,56,59,61}, N(5-6)={01-30} if N(3-4)={01,03,05,07,08,10,12,51,53,55,57,58,60,62}, N(5-6)={01-31} | 991231123 | |
10 digit individuals |
N(1-10) N(1-2)={54-99} N(3-4)={01-12,51-62} if N(3-4)={02,52} and N(1-2)%4>0, N(5-6)={01-28} if N(3-4)={02,52} and N(1-2)%4=0, N(5-6)={01-29} if N(3-4)={04,06,09,11,54,56,59,61}, N(5-6)={01-30} if N(3-4)={01,03,05,07,08,10,12,51,53,55,57,58,60,62}, N(5-6)={01-31} | 6306150004 | |
if (N(1-2)+N(3-4)+N(5-6)+N(7-8)+N(9-10))%11=0 and N(1-10)%11=0, right | |||
DE Germany |
N(1-8)+C(1) N(1-8)>0 | 123456788 | |
S=0 FOR I=1 TO 8 NEXT I C(1)=11-S; if C(1)=10, C(1)=0 | |||
DK Denmark |
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) if S%11=0, right | |||
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; if C(1)=10, C(1)=0 | |||
ES Spain | Legal persons with profit aim |
A(1)+N(1-7)+C(1) A(1)={A-H,J,U,V} | 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; if C=10, C=0 |
|||
Legal persons with non-profit aim or foreign ones with permanent establishment |
A(1)+N(1-7)+C(1) A(1)={N,P,Q,R,S,W} | 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} |
|||
Spanish natural persons | 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} |
|||
Foreign natural persons, under age 14 or non-residents |
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; if C(1)=11, C(1)=0; if C(1)=10, wrong | |||
FR France | Old system |
C(1-2)+N(1-9) N(1-9)>0 | 32123456789 |
C(1-2)=(N(1-9)*100+12)%97 | |||
New system |
C(1-2)+N(1-9) N(1-9)>0 C(1-2)={A-H,J-N,P-Z} | {0-9} if C(1) is alpha, C(2) must be a number and contrarywise. | 2H123456789 | |
There are more than one possible C(1-2) for a given N(1-9), thus, it isn't possible to compute it. | |||
C{0-9,A-H,J-N,P-Z} → C{0-33} if C(1)<10, S=C(1)*24+C(2)-10 if C(1)>9, S=C(1)*34+C(2)-100 X=S%11 S=S\11+1 Y=(N(1-9)+S)%11 if X=Y, right | |||
GB United Kingdom | Government department |
A(1-2)+N(1-3) A(1-2)={GD} N(1-3)<500 | GD123 |
Health authority |
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) if S%97=0, right |
|||
Commercial group |
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) if S%97=0, right |
|||
Island of Man |
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) if S%97=0, right |
|||
Island of Man commercial group |
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) if S%97=0, right | |||
GR Greece | According to ISO-3166-1 norm, GR prefix corresponds to Greece but European Directive 2001/115, following Greece's request, changed the prefix for EL. Both of them can be used. | ||
7 digit system | 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; if C(1)=10, C(1)=0 |
|||
8 digit system | 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; if C(1)=10, C(1)=0 | |||
HU Hungary |
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; if C(1)=10, C(1)=0 | |||
IE Ireland | Old |
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} |
|||
New |
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 Italy | The Italian fiscal code for individuals, approved by Decree #13813 on 12/23/1976, is not verified because it is not accepted as valid code for intracommunity VAT related operations. | ||
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; if C(1)=10, C(1)=0 | |||
LT Lithuania | Legal persons |
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) if 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; if C(1)=10, C(1)=0 |
|||
Temporal tax-payers and natural persons |
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) if 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; if C(1)=10, C(1)=0 | |||
LU Luxembourg |
N(1-6)+C(1-2) N(1-6)>0 | 12345613 | |
C(1-2)=N(1-6)%89 | |||
LV Latvia | Legal persons |
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) if S%11=4 and N(1)=9, S=S-45 if S%11=4, C(1)=4-S%11 if S%11>4, C(1)=14-S%11 if S%11<4, C(1)=3-S%11 |
|||
Natural persons |
N(1-11) if N(3-4)={02} and N(5-6)%4>0, N(1-2)={01-28} if N(3-4)={02} and N(5-6)%4=0, N(1-2)={01-29} if N(3-4)={04,06,09,11}, N(1-2)={01-30} if 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 Netherlands |
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; if C(1)=10, wrong | |||
PL Poland | 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; if C(1)=10, wrong | |||
PT Portugal |
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; if C(1)=10, C(1)=0; if C(1)=11, C(1)=0 | |||
RO Romania | Legal persons | 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; if C(1)=10, C(1)=0 |
|||
Natural persons |
N(1-12)+C(1) N(1)={1,2,3,4,6} N(4-5)={01-12} if N(4-5)={02} and N(2-3)%4>0, N(6-7)={01-28} if N(4-5)={02} and N(2-3)%4=0, N(6-7)={01-29} if N(4-5)={04,06,09,11}, N(6-7)={01-30} if 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; if C(1)=10, C(1)=1 | |||
SE Sweden |
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; if 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; if C(1)=10, C(1)=0; if C(1)=11, C(1)=1 | |||
SK Slovakia | Person born in year 2000, identity number and tax-payer number can't be distinguished. | ||
Identity number |
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; if C(1)=10, C(1)=0; if C(1)=11, C(1)=1 |
|||
Tax-payer number |
N(1-10) N(1-2)={00} | 0012345678 | |
Person (born before 1/1/1954) |
N(1-9) N(1-2)={00-53} N(3-4)={01-12,51-62} if N(3-4)={02,52} and N(1-2)%4>0, N(5-6)={01-28} if N(3-4)={02,52} and N(1-2)%4=0, N(5-6)={01-29} if N(3-4)={04,06,09,11,54,56,59,61}, N(5-6)={01-30} if N(3-4)={01,03,05,07,08,10,12,51,53,55,57,58,60,62}, N(5-6)={01-31} | 531231123 | |
Person (born after 31/12/1953) |
N(1-10) N(1-2)={54-99} N(3-4)={01-12,51-62} if N(3-4)={02,52} and N(1-2)%4>0, N(5-6)={01-28} if N(3-4)={02,52} and N(1-2)%4=0, N(5-6)={01-29} if N(3-4)={04,06,09,11,54,56,59,61}, N(5-6)={01-30} if N(3-4)={01,03,05,07,08,10,12,51,53,55,57,58,60,62}, N(5-6)={01-31} | 6306151234 | |
Notation
X+Y : X added to Y.
X-Y : X substracted by Y.
X*Y : X multiplied by Y.
X#Y : X multiplied with digit addition by Y. For example, 2*6=12, 1+2=3, then, 2#6=3.
X/Y : X divided by Y.
X\Y : divisió entera de X entre Y. Per exemple, 15/6=2 i en resten 3, per tant, 15\6=2.
X%Y : remainder of integer division of X by Y. For example, 15/6=2 and 3 remains, then, 15%6=3.
X{a-b} → X{c-d} : transformació dels elements a-b pel seu corresponent c-d. Per exemple X{1-3} → X{a-c}, convertirà 1 en a, 2 en b i 3 en c.
Multiplication, multiplication with digit addition, division, integer division and remainder of integer division, are calculated before additions and substracts, if there are not parenthesis suggesting otherwise.
On format cell, the format is specified before conditions must be carried out for beeing valid. Numbers are identified with "N" followed with number amount between parenthesis; alphanumeric characters, with "A" followed with character amount between parenthesis, and control characters, with "C" followed with character amount between parenthesis. For example, the format N(1-5)+A(1-2)+N(6-7) corresponds to a code like 45273HM68.
On formulas and rules, values are referred indicating affected subindexes. Thus, with the format N(1-5)+A(1-2)+N(6-7), we will refer to position 7 with A(2) and 9 with N(7).
[catal…][english][castellano] | 7/23/2015 09:46:19 GMT+0000 |