Identifier checkdigit

From CDQ Wiki
Public:Rule Category/IDENTIFIER CHECKDIGIT
Jump to navigation Jump to search
Property Value
A technical identifier, unique in a certain context. Technical key IDENTIFIER_CHECKDIGIT
The human-friendly name shown for this concept in the user interface, used instead of the technical name to improve readability and understanding. Display name Identifier checkdigit
An informal and short human-readable definition of a concept, in terms of a 'one-liner'. Short description Validates checksums or checkdigits embedded in business identifiers to detect errors.
Informal and comprehensive human-readable definition of a concept. Description This category covers data quality rules that verify the integrity of identifiers containing checksums or checkdigits. When an identifier type is known to include a checksum or checkdigit component, this validation ensures the identifier is mathematically consistent with its specified algorithm. Common examples include VAT numbers, company registration numbers, and tax identifiers that embed validation digits. By detecting inconsistencies in the checkdigit, these rules can identify data entry errors, corrupted data, and invalid identifier values. This is essential for maintaining data accuracy and preventing the use of malformed identifiers in business processes. The validation contributes to the Accuracy dimension by ensuring identifiers conform to their mathematical specifications.
Hierachical parent concept of a concept. Parent Checkdigit

Data quality rules

CDQ manages 98 data quality rules in this category.

Data quality rule The country a linked concept is active or generally relevant for. Country scope Informal and comprehensive human-readable definition of a concept. Description Criticality<br/>Specifies how critical of the violation of a data quality rule.<br/>ERROR: Indicates a critical data quality rule violation that requires correction.<br/>WARNING: Indicates a potential data quality issue that should be reviewed.<br/>INFO: Indicates an informational finding with no immediate impact on data quality. Criticality Rule release status<br/>The release status in terms of development progress or maturity of a data quality rule.<br/>IDEA: Initial rule definition that documents a business requirement but is not yet active in services.<br/>DRAFT: Rule concept is being prepared or refined but is not yet finalized for implementation or execution.<br/>HYPERCARE: Rule is newly released and under increased observation to ensure stable behaviour and correct results.<br/>RELEASED: Rule has passed verification and is actively executed in productive CDQ services.<br/>DEACTIVATED: Rule is temporarily removed from the active rule set because it needs correction or clarification before re release.<br/>ARCHIVED: Rule is permanently retired and no longer maintained or intended for future activation. Rule release status
Checkdigit of state tax number (Brasil - Acre (AC))
ACCURACY
BR (Brazil) This rule checks the checkdigit of the state tax number as defined for the administrative area Acre in Brazil INFO RELEASED(2021-09-10)
Checkdigit of state tax number (Brasil - Alagoas (AL))
ACCURACY
BR (Brazil) This rule checks the checkdigit of the state tax number as defined for the administrative area Alagoas in Brazil INFO RELEASED(2021-09-10)
Checkdigit of state tax number (Brasil - Amapa (AP))
ACCURACY
BR (Brazil) This rule checks the checkdigit of the state tax number as defined for the administrative area Amapa in Brazil INFO RELEASED(2024-04-16)
Checkdigit of state tax number (Brasil - Amazonas (AM))
ACCURACY
BR (Brazil) This rule checks the checkdigit of the state tax number as defined for the administrative area Amazonas in Brazil INFO RELEASED(2021-09-10)
Checkdigit of state tax number (Brasil - Bahia (BA))
ACCURACY
BR (Brazil) This rule checks the checkdigit of the state tax number as defined for the administrative area Bahia in Brazil INFO RELEASED(2021-09-10)
Checkdigit of state tax number (Brasil - Ceara (CE))
ACCURACY
BR (Brazil) This rule checks the checkdigit of the state tax number as defined for the administrative area Ceara in Brazil INFO RELEASED(2021-09-10)
Checkdigit of state tax number (Brasil - Espirito Santo (ES))
ACCURACY
BR (Brazil) This rule checks the checkdigit of the state tax number as defined for the administrative area Espirito Santo in Brazil INFO RELEASED(2021-09-10)
Checkdigit of state tax number (Brasil - Federal District (DF))
ACCURACY
BR (Brazil) This rule checks the checkdigit of the state tax number as defined for the administrative area Federal District in Brazil INFO RELEASED(2021-09-10)
Checkdigit of state tax number (Brasil - Goias (GO))
ACCURACY
BR (Brazil) This rule checks the checkdigit of the state tax number as defined for the administrative area Goias in Brazil INFO RELEASED(2021-09-10)
Checkdigit of state tax number (Brasil - Maranhao (MA))
ACCURACY
BR (Brazil) This rule checks the checkdigit of the state tax number as defined for the administrative area Maranhao in Brazil INFO RELEASED(2021-09-10)
Checkdigit of state tax number (Brasil - Mato Grosso (MT))
ACCURACY
BR (Brazil) This rule checks the checkdigit of the state tax number as defined for the administrative area Mato Grosso in Brazil INFO RELEASED(2021-09-10)
Checkdigit of state tax number (Brasil - Mato Grosso do Sul (MS))
ACCURACY
BR (Brazil) This rule checks the checkdigit of the state tax number as defined for the administrative area Mato Grosso do Sul in Brazil INFO RELEASED(2021-09-10)
Checkdigit of state tax number (Brasil - Minas Gerais (MG))
ACCURACY
BR (Brazil) This rule checks the checkdigit of the state tax number as defined for the administrative area Minas Gerais in Brazil INFO RELEASED(2021-09-10)
Checkdigit of state tax number (Brasil - Para (PA))
ACCURACY
BR (Brazil) This rule checks the checkdigit of the state tax number as defined for the administrative area Para in Brazil INFO RELEASED(2021-09-10)
Checkdigit of state tax number (Brasil - Paraiba (PB))
ACCURACY
BR (Brazil) This rule checks the checkdigit of the state tax number as defined for the administrative area Paraiba in Brazil INFO RELEASED(2021-09-10)
Checkdigit of state tax number (Brasil - Parana (PR))
ACCURACY
BR (Brazil) This rule checks the checkdigit of the state tax number as defined for the administrative area Parana in Brazil INFO RELEASED(2021-09-10)
Checkdigit of state tax number (Brasil - Pernambuco (PE))
ACCURACY
BR (Brazil) This rule checks the checkdigit of the state tax number as defined for the administrative area Pernambuco in Brazil INFO RELEASED(2021-09-10)
Checkdigit of state tax number (Brasil - Piaui (PI))
ACCURACY
BR (Brazil) This rule checks the checkdigit of the state tax number as defined for the administrative area Piaui in Brazil INFO RELEASED(2021-09-10)
Checkdigit of state tax number (Brasil - Rio Grande do Norte (RN))
ACCURACY
BR (Brazil) This rule checks the checkdigit of the state tax number as defined for the administrative area Rio Grande do Norte in Brazil INFO RELEASED(2021-09-10)
Checkdigit of state tax number (Brasil - Rio Grande do Sul (RS))
ACCURACY
BR (Brazil) This rule checks the checkdigit of the state tax number as defined for the administrative area Rio Grande do Sul in Brazil INFO RELEASED(2021-09-10)
Checkdigit of state tax number (Brasil - Rio de Janeiro (RJ))
ACCURACY
BR (Brazil) This rule checks the checkdigit of the state tax number as defined for the administrative area Rio de Janeiro in Brazil INFO RELEASED(2021-09-10)
Checkdigit of state tax number (Brasil - Rondonia (RO))
ACCURACY
BR (Brazil) This rule checks the checkdigit of the state tax number as defined for the administrative area Rondonia in Brazil INFO RELEASED(2021-09-10)
Checkdigit of state tax number (Brasil - Roraima (RR))
ACCURACY
BR (Brazil) This rule checks the checkdigit of the state tax number as defined for the administrative area Roraima in Brazil INFO RELEASED(2021-09-10)
Checkdigit of state tax number (Brasil - Santa Catarina (SC))
ACCURACY
BR (Brazil) This rule checks the checkdigit of the state tax number as defined for the administrative area Santa Catarina in Brazil INFO RELEASED(2021-09-10)
Checkdigit of state tax number (Brasil - Sao Paulo (SP))
ACCURACY
BR (Brazil) This rule checks the checkdigit of the state tax number as defined for the administrative area Sao Paulo in Brazil INFO RELEASED(2021-09-10)
Checkdigit of state tax number (Brasil - Sergipe (SE))
ACCURACY
BR (Brazil) This rule checks the checkdigit of the state tax number as defined for the administrative area Sergipe in Brazil INFO RELEASED(2021-09-10)
Checkdigit of state tax number (Brasil - Tocantins (TO))
ACCURACY
BR (Brazil) This rule checks the checkdigit of the state tax number as defined for the administrative area Tocantins in Brazil INFO RELEASED(2021-09-10)
Identifier checkdigit invalid (CPF number (Brazil))
ACCURACY
BR (Brazil) This rule checks the checkdigit of CPF number (Brazil). ERROR IDEA
Identifier checkdigit invalid (CVR number (Denmark))
ACCURACY
DK (Denmark) This rule checks the checkdigit of CVR number (Denmark). ERROR RELEASED(2021-09-10)
Identifier checkdigit invalid (Company identification number (Switzerland))
ACCURACY
CH (Switzerland) The last digit is a MOD11 checksum digit build with weighting pattern: 5,4,3,2,7,6,5,4. The rule allows for any valid formatted CH UID, in case of an invalid format (see Identifier format invalid (Company identification number (Switzerland))) the rule will fail directly. ERROR RELEASED(2020-01-01)
Identifier checkdigit invalid (DEA Registration Number (United States))
ACCURACY
US (United States of America) This rule checks the checkdigit of DEA Registration Number (United States) according to the following the logic:

DEA number without checkdigit: AL455178

To find the checkdigit the following steps are required:

  • Add the first, third, and fifth digits
    • 4 + 5 + 7 = 16
  • Add the second, fourth, and sixth digits – then multiply x 2
    • 5 + 1 + 8 = 14 x 2 = 28
  • Add these two totals together
    • 16 + 28 = 44
  • The second digit of this total number is the check digit, here 4

Any difference results in a violation of this rule

ERROR RELEASED(2024-04-16)
Identifier checkdigit invalid (DIC number (Czech Republic))
ACCURACY
CZ (Czechia) This rule checks the checkdigit of the DIC number (Czech Republic). ERROR RELEASED(2024-04-16)
Identifier checkdigit invalid (European value added tax identifier (Czech Republic))
ACCURACY
CZ (Czechia) This rule checks the checkdigit of the European value added tax identifier (Czech Republic). ERROR RELEASED(2024-04-16)
Identifier checkdigit invalid (GST number (India))
ACCURACY
IN (India) This rule checks the check digit of the Goods and Services Tax number (GST) in India. The first fourteen digits of the GST are the GST number (India).

calculate a hash of each digit of GST number. Steps for calculation of hash are mentioned below:

a) Obtain corresponding code [C] for each alphanumeric digit of GST number. The codes for each alphanumeric characters are as following:

  • 0 -> 0
  • 1 -> 1
  • 2 -> 2
  • 3 -> 3
  • 4 -> 4
  • 5 -> 5
  • 6 -> 6
  • 7 -> 7
  • 8 -> 8
  • 9 -> 9
  • A -> 10
  • B -> 11
  • C -> 12
  • D -> 13
  • E -> 14
  • F -> 15
  • G -> 16
  • H -> 17
  • I -> 18
  • J -> 19
  • K -> 20
  • L -> 21
  • M -> 22
  • N -> 23
  • O -> 24
  • P -> 25
  • Q -> 26
  • R -> 27
  • S -> 28
  • T -> 29
  • U -> 30
  • V -> 31
  • W -> 32
  • X -> 33
  • Y -> 34
  • Z -> 35

b) Multiply “code” with a number called Multiplier [M], which will be 1 for odd digits and 2 or even digits of GST Number.

c) So on multiplication of “code” with “multiplier” [ C x M ] we get a number called Product [P].

d) Divide “product” with 36 [ P ÷ 36]. This division yields us a Quotient [Q] & a Remainder ['R].

e) Add “quotient” and “remainder” [ Q + R ] to get Hash of that digit of GST number.

Repeat the above steps for each digit of GST number, and obtain corresponding hash. After that, derive the checksum digit with below-mentioned steps:

For these 14 digits the check digit is calculated, in the following way:

  1. Add hash of all 14 digits calculated above to get Sum [S]
  2. Now divide “Sum” with 36 and obtain its Quotient [Z]
  3. Subtract from 36 the quotient obtained above [' 36 - Z ] to yield checksum code [Y]
  4. Lookup corresponding alphanumeric digit for the checksum code [Y] obtained in the above step, which is GST Number Checksum Digit
ERROR RELEASED(2020-12-28)
Identifier checkdigit invalid (Global location number)
ACCURACY
WORLD (World) This rule checks the checkdigit of Global location number. ERROR RELEASED(2024-04-16)
Identifier checkdigit invalid (ICO number (Czech Republic))
ACCURACY
CZ (Czechia) This rule checks the checkdigit of the ICO number (Czech Republic). ERROR RELEASED(2024-04-16)
Identifier checkdigit invalid (NIF number (Portugal))
ACCURACY
PT (Portugal) This rule checks the checkdigit of NIF number (Portugal). ERROR RELEASED(2021-09-10)
Identifier checkdigit invalid (NIP number (Poland))
ACCURACY
PL (Poland) This rule describes the algorithm for checksum digit (the last 10th digit) for NIP number (Poland) using the following logic:

1) multiply the fist 9 digits of the NIP by the corresponding wages: 6, 5, 7, 2, 3, 4, 5, 6, 7, 2) sum up the result of the multiplication from step one, 3) calculate modulo 11.

ERROR RELEASED(2020-12-28)
Identifier checkdigit invalid (NIT number (Colombia))
ACCURACY
CO (Colombia) This rule checks the checkdigit of NIT number (Colombia). ERROR RELEASED(2020-12-28)
Identifier checkdigit invalid (National Provider Identifier (United States))
ACCURACY
US (United States of America) This rule checks the checkdigit of National Provider Identifier (United States) according to the following the logic:
  • Step 1 - Starting at the right most digit, which should be the check digit. Double the value of every second digit.
  • Step 2 - Take the sum of all the individual digits.
  • Step 2a - If a doubled value is 2-digits (i.e. 8 was doubled to 16), you add the two digits together (i.e. the doubled value of 16 would be: 1 + 6)
  • Step 3 - Add 24 to the value
  • Step 4 - Take the units digit (i.e. if the number was 67, you would take 7).
  • Step 5 - Subtract the units digit from 10. (Do this step only if the units digit isn't zero)
  • Step 6 - The resulting number is the check digit.

Any difference results in a violation of this rule

ERROR RELEASED(2024-04-16)
Identifier checkdigit invalid (National business register identifier (Austria))
ACCURACY
AT (Austria) This rule checks the checkdigit of National business register identifier (Austria) according to the following the logic:
  • 1) apply the weight number to each identifier's number,
  • 2) calculate a sumproduct of the identifier's number and respectful weight digit

,

  • 3) sum up the result

,

  • 4) apply modulo 17 the summed up result

,

  • 5) lookup the rest number of the modulo 17 in a reference table ---> checksum letter.

Any difference result in a rule violation.

ERROR RELEASED(2024-04-16)
Identifier checkdigit invalid (Organization Number (Norway))
ACCURACY
NO (Norway) This rule checks the checkdigit of Organization Number (Norway). ERROR RELEASED(2021-09-10)
Identifier checkdigit invalid (Organization Registration Number (Sweden))
ACCURACY
SE (Sweden) This rule checks the checkdigit of the Organization registration number (Sweden). The checksum is calculated according to the Luhn algorithm. ERROR RELEASED(2024-04-16)
Identifier checkdigit invalid (Quebec Sales Tax number (Canada))
ACCURACY
CA (Canada) This rule checks the checkdigit of the Quebec Sales Tax number (Canada). The checksum is done in the following way:
  • a) starting from the ninth digit multiply each digit by the factor. The factors form a circular secuence of values 2 through 7, beginning on the right,
  • b) sum up the result

,

  • c) divide the result by 11 (183/11) = 16 reste 7

, If the reminder is 0, the check digit is 1. If the reminder is 1, the check digit are 0. For any other reminder obtained, the check digit is the diference between 11 and the reminder. Subtract the reminder obtained from 11.

ERROR RELEASED(2021-09-10)
Identifier checkdigit invalid (REGON (Poland))
ACCURACY
PL (Poland) This rule describes the algorithm for checksum digit (the last digit) for REGON identifier. Logic for 9-digits identifier:

1) multiply each of the first 8 digits by the gidit-wages: 8 9 2 3 4 5 6 7, 2) sum up the numbers received in step 1, 3) apply modulo 11. the rest is equal to the schecksum digit.

For the 14-digits REGON identifier the logic is the same, but the wages for the first 13 digits are different: 2 4 8 5 0 9 7 3 6 1 2 4 8.

ERROR RELEASED(2020-12-28)
Identifier checkdigit invalid (RIF number (Venezuela))
ACCURACY
VE (Venezuela) This rule checks the checkdigit of RIF number (Venezuela). The number consists of 10 digit with one leading letter, 8 random numbers and check digit. The first letter is the RIF kind that represents the kind of entity this RIF belongs to. This rule checks whether the identifier is valid with respect to the checkdigit.

Format of RIF number (Venezuela) is: [ C1 C2 C3 C4 C5 C6 C7 C8 C9 C10 ], where:

  • C1: Letter
    • V: Venezuelan
    • E: Foreigner
    • J: Legal Entity
    • C: Township or Communal Council
    • P: Passport
    • G: Government Entity
  • C2...C9: Random numbers
  • C10: Check digit

The set of weightings is:

  • M1 = (1
ERROR IDEA
Identifier checkdigit invalid (RUC number (Ecuador))
ACCURACY
EC (Ecuador) This rule checks the checkdigit of RUC number (Ecuador). ERROR RELEASED(2021-09-10)
Identifier checkdigit invalid (RUC number (Paraguay))
ACCURACY
PY (Paraguay) This rule checks the checkdigit of RUC number (Paraguay). ERROR RELEASED(2020-12-28)
Identifier checkdigit invalid (RUC number (Peru))
ACCURACY
PE (Peru) This rule checks the checkdigit of RUC number in Peru

[C1,C2, C3, C4, C5, C6, C7, C8, C9, C10] - Every single digit in 10 digit input number has its corresponding weight: [5, 4, 3, 2, 7, 6, 5, 4, 3, 2] 1. Multiply every element from input number by corresponding weight: - C1 * 5 - C2 * 4 - C3 * 3 - C4 * 2 - C5 * 7 - C6 * 6 - C7 * 5 - C8 * 4 - C9 * 3 - C10 * 2 2. Sum up all of results (sumproduct) 3. The reminder of the modulo 11 4. Subtract restults from 11 5. Checkdigit = the reminder of modulo 10

ERROR RELEASED(2020-12-28)
Identifier checkdigit invalid (RUT number (Chile))
ACCURACY
CL (Chile) This rule checks the checkdigit of RUT number (Chile). ERROR RELEASED(2020-12-28)
Identifier checkdigit invalid (RUT number (Uruguay))
ACCURACY
UY (Uruguay) This rule checks the checkdigit of RUT number (Uruguay). ERROR RELEASED(2020-12-28)
Identifier checkdigit invalid (Tax Identification Number (Serbia))
ACCURACY
RS (Serbia) 9 digits (ex. 123456788) of which the first 8 are the actual ID number, and the last digit is a checksum digit, calculated according to ISO 7064, MOD 11-10 ERROR RELEASED(2020-12-28)
Identifier checkdigit invalid (Tax Identification Number (Vietnam))
ACCURACY
VN (Viet Nam) This rule checks the checkdigit of Tax Identification Number (Vietnam). ERROR RELEASED(2021-09-10)
Identifier checkdigit invalid (Tax Registration Number (Belarus))
ACCURACY
BY (Byelorussian SSR) This rule checks the checkdigit of Tax Registration Number (Belarus)

The number consists of 9 digits (numeric for organisations, alphanumeric for individuals). [C1,C2, C3, C4, C5, C6, C7, C8, CheckDigit] - Every single digit in 8 digit input number has its corresponding weight: weights = (29, 23, 19, 17, 13, 7, 5, 3)

1. Multiply every element from input number by corresponding weight: - C1 * 29 - C2 * 23 - C3 * 19 - C4 * 17 - C5 * 13 - C6 * 7 - C7 * 5 - C8 * 3 2. Sum up all of results (sumproduct) 3. Checdigit - The reminder of the modulo 11

ERROR RELEASED(2020-12-28)
Identifier checkdigit invalid (Tax identification number (South Africa))
ACCURACY
ZA (South Africa) This rule describes the algorithm for checksum digit (the last digit) for Tax identification number (South Africa). Logic for 10-digits identifier:
  • 1) The odd positioned digits of the tax reference number (1, 3, 5, 7 and 9) are multiplied by 2.
  • If the answer is greater than 9 the digits are added together to get the calculated value.
  • 2) Add these calculated values and the even positioned digits of the Tax reference number (2, 4, 6 and 8) together.
  • 3) Subtract the last character of this calculation from 10 to get the check digit.
  • If this is not equal to the last digit of the Tax reference number as entered, then this does not pass the modulus 10 test.

The last character is a check digit, calculated by applying the following algorithm:







  • When the result of the line item calculation exceeds 9, add the individual digits together to obtain a single digit result (e.g. 18=1+8=9)

Digit 10: Check digit

  • if the last digit of Total >0 Then
    • The Checksum digit should be equal to the result of 0 (Total mod 10)
  • if the last digit of Total = 0 Then
    • the Checksum digit shuld be equal to zero
ERROR RELEASED(2020-12-28)
Identifier checkdigit invalid (Tax number (Romania))
ACCURACY
RO (Romania) This rule checks the checksum of the Tax number in Romania.

To calculate the checksum digit, every digit from CNP is multiplied with the corresponding digit in number 279146358279, the sum of all these multiplications is then divided by 11.

If the remainder is 10 then the checksum digit is 1, otherwise it's the remainder itself.

Any difference result in a rule violation.

ERROR RELEASED(2020-12-28)
Identifier checkdigit invalid (Tax number (Turkey))
ACCURACY
TR (Turkey) This rule checks the checkdigit of Tax number (Turkey). ERROR RELEASED(2020-01-01)
Identifier checkdigit invalid (VAT number (Norway))
ACCURACY
NO (Norway) This rule checks the checkdigit of VAT number (Norway). ERROR DRAFT
Identifier checkdigit invalid (VAT registration number (Israel))
ACCURACY
IL (Israel) The rightmost digit is a check digit (using Luhn algorithm (https://en.wikipedia.org/wiki/Luhn_algorithm) ). ERROR RELEASED(2021-09-10)
Identifier checkdigit invalid (VAT registration number (Switzerland))
ACCURACY
CH (Switzerland) The last digit is a MOD11 checksum digit build with weighting pattern: 5,4,3,2,7,6,5,4. The rule allows for any valid formatted CH VAT ID, in case of an invalid format (see Identifier format invalid (VAT registration number (Switzerland))) the rule will fail directly. ERROR RELEASED(2020-12-28)
Invalid checksum of ABN AU (Australia)
ACCURACY
AU (Australia) The 11 digit ABN is structured as a 9 digit identifier with two leading check digits. This rule checks whether the ABN is valid with respect to the checkdigits. The leading check digits are derived using a modulus 89 (remainder after dividing by 89) calculation.

Format of the BNA looks like this:

[ C1 C2 C3 C4 C5 C6 C7 C8 C9 C10 C11 ]

M11 ( C1 - 1 ) + M10 x C2 + M9 x C3 + M8 x C4 + M7 x C5 + M6 x C6 + M5 x C7 + M4 x C8 + M3 x C9 + M2 x C10 + M1 x C11 MOD89=0

The set of weightings are:

M11...M1 = (10,1,3,5,7,9,1113,15,17,19)

ERROR RELEASED(2020-10-12)
Invalid checksum of ACN AU (Australia)
ACCURACY
AU (Australia) This rule checks the checksum of the Australian Company Number. The ACN is a nine digit number with the last digit being a check digit calculated using a modified modulus 10 calculation. ERROR RELEASED(2020-10-12)
Invalid checksum of AR CUIT (Argentina)
ACCURACY
AR (Argentina) This rule checks the checksum of the CUIT number in Argentina. The last digit of the in total 11 digits of the CUIT is a check digit validated according the algorithm established by AFIP (Federal Tax Agency). This rule double checks whether the check digit is correct. ERROR RELEASED(2020-10-12)
Invalid checksum of BN CA (Canada)
ACCURACY
CA (Canada) The Canadian Business number consists of exactly 9 digits. It is important to be correct as it is used as part of the GST/HST number as well. For these 9 digits the checkdigit is calculated in the following way:
  • a) Add all odd digits, except the 9th one,
  • b) String all even digits together and multiply by 2

,

  • c) Add all digits from the result b. together

,

  • d) Add the result of a. and c. together

,

  • e) Subtract the result of d. from the nearest 10 digit.
  • The result of e. must equal the 9th digit.
ERROR RELEASED(2020-10-12)
Invalid checksum of BTW NUMBER (Belgium)
ACCURACY
BE (Belgium) This rule checks the checksum of the BTW number in Belgium. The checksum calculations is done using modulo 97. ERROR ARCHIVED(2020-01-01)
Invalid checksum of CIF number (Spain)
ACCURACY
ES (Spain) This rule describes the algorithm for checksum letter for CIF number (Spain) using the following logic:
  • 1) sum up the 7 digits of the CIF identifier --> Summa A,
  • 2) for each of the digits of the odd positions, multiply the digit by 2 and add the result numbers, but if the result has a single digit simply this figure is added. (ie if the digit is 6, the result would be 6 x 2 = 12 -> 1 + 2 = 3, more if the digit is 2, the result would be 2 x 2 = 4). --> Summa = B

,

  • 3) add the result of the previous 2 steps. --> A + B = C
  • 4) the last digit of the previous sum (C) is subtracted to 10, whose result would be the control code:
    • if C = 14, the last digit is 4, so we would have 10 - 4 = 6.
    • if the last digit of the previous step sum is 0 (eg C = 30), subtraction is not performed and 0 is taken as the control code
ERROR RELEASED(2020-10-12)
Invalid checksum of CNPJ (Brazil)
ACCURACY
BR (Brazil) The last two digits of a CNPJ are checkdigits which are calculated based on the given digits. The check numbers are calculated by algorithm (modulus 11):
  • From right to left all digits are multiplied by a decreasing sequence starting with 9.
  • The sum of all products is computed.
  • The total sum is taken modulo 11. The remainder is C13.
  • Repeat the first step taking the C13 also.
  • The sum of all products is computed.
  • The total sum is taken modulo 11. The remainder is C14.
ERROR RELEASED(2020-10-12)
Invalid checksum of EU VAT ID BE (Belgium)
ACCURACY
BE (Belgium) This rule checks the checksum of the European VAT number in Belgium. The checksum calculations for the last 2 digits ([C9 C10]) is done using modulo 97:
  • 97 - ( [ C1 C2 C3 C4 C5 C6 C7 C8 ] modulo 97 )
ERROR RELEASED(2020-10-12)
Invalid checksum of EU VAT ID DE (Germany)
ACCURACY
DE (Germany) This rule checks the checksum of the European VAT number in Germany. An interactive procedure involving each of the digits C1…C8 in turn used to calculate C9.

P = 10

For N = 1…8 (N = character position i.e. C1)

  • S = CN + P
  • M = S modulo 10
  • If M = 0 then M = 10
  • P = (2 *M) modulo 11

R = 11 – P

If R = 10

then: C9 = 0

else: C9 =R

ERROR RELEASED(2020-10-12)
Invalid checksum of EU VAT ID DK (Denmark)
ACCURACY
DK (Denmark) This rule validates the checksum of the European VAT number in Denmark.

The calculation is as follows: First a dividend R is calculated by multiplying the different digits (C1 to C8) of the VAT number with the following factors:

R = (2*C1 + 7*C2 + 6*C3 + 5*C4 + 4*C5 + 3*C6 + 2*C7 + C8)

If R is divisible by 11 then the number is correct according to the checksum check.

ERROR RELEASED(2020-10-12)
Invalid checksum of EU VAT ID EE (Estonia)
ACCURACY
EE (Estonia) This rule checks the checksum of the European VAT number in Estonia, which has a format:

[C1 C2 C3 C4 C5 C6 C7 C8 C9] where C9 is achecksum digit. The checksum digit is validated usung the algorythm:

A1 = 3*C1 + 7*C2 + 1*C3 + 3*C4 + 7*C5 + 1*C6 + 3*C7 + 7*C8

A2 = CEIL(A1, 10)

C9 = A2 - A1

ERROR RELEASED(2020-10-12)
Invalid checksum of EU VAT ID EL (Greece)
ACCURACY
GR (Greece) This rule checks the checksum of the European VAT number in Greece.

Check digit (C9) = A2 modulo 10

A2 = A1 modulo 11

A1 = 256*C1 + 128*C2 + 64*C3 + 32*C4 + 16*C5 + 8*C6 + 4*C7 + 2*C8

ERROR RELEASED(2020-10-12)
Invalid checksum of EU VAT ID FI (Finland)
ACCURACY
FI (Finland) This rule checks the checksum of the European VAT number in Finland. The last digit is a check digit calculated with Mod 11-2 algorithm.

R = 11 - (7*C1 + 9*C2 + 10*C3 + 5*C4 + 8*C5 + 4*C6 + 2*C7) modulo 11

  • If R = 10 then VAT number is invalid
  • If R = 11:
    • then C8 = 0
    • else C8 = R
ERROR RELEASED(2020-01-01)
Invalid checksum of EU VAT ID FR (France)
ACCURACY
FR (France) This rule checks the checksum of the European VAT number in France which consists of 11 digits in a format:

[ C1 C2 C3 C4 C5 C6 C7 C8 C9 C10 C11 ]

The check rules are different for old style and for a new style:

  • Case 1: Old Style C1 C2

[C1 C2] = ([C3 C4 C5 C6 C7 C8 C9 C10 C11] [1 2]) modulo 97

  • Case 2 : New Style C1 C2

S1 = Check Character (C1) S2 = Check Character (C2)

  • If C1 numeric then:
    • C2 alphabetic
    • S = (S1 * 24) + (S2 – 10)
  • If C1 alphabetic then:
    • S = (S1*34) + (S2-100)
    • P = (S/11) + 1

R1 = (S) modulo 11 R2 = ( [C3 C4 C5 C6 C7 C8 C9 C10 C11] + P) modulo 11 R1 = R2

Check Character:

0-0, 1-1, 2-2, 3-3, 4-4, 5-5, 6-6, 7-7, 8-8, 9-9, 10-A, 11-B, 12-C, 13-D,   14-E, 15-F, 16-G, 17-H, 18-J, 19-K, 20-L, 21-M, 22-N, 23-P, 24-Q, 25-R, 26-S, 27-T, 28-U, 29-V, 30-W, 31-X, 32-Y, 33-Z.
ERROR RELEASED(2020-10-12)
Invalid checksum of EU VAT ID HR (Croatia)
ACCURACY
HR (Croatia) This rule validates the checksum of the European VAT number in Croatia. The checksum is calculated according to this algorithm (international standard ISO 7064 (MOD 11, 10)):

1) The first digit is summed with 10, 2) The sum integer is divided by 10, and the rest is kept, if that number is 0 it gets replaced by number 10 (this latter number is called subtotal), 3) The obtained subtotal is multiplied by 2, 4) The obtained number is divided by 11, and the rest is kept, this number mathematically cannot be 0 because the result of the previous step is always an even number, 5) The next digit is summed with the rest from the previous step, Steps 2, 3, 4 and 5 are repeated until all digits are expanded, If the rest of the final step is equal to 1, the check digit is 0. Otherwise, the check digit is a difference between 11 and the rest in the last step.

ERROR RELEASED(2020-10-12)
Invalid checksum of EU VAT ID HU (Hungary)
ACCURACY
HU (Hungary) This rule checks the validity of the checkdigit of the European VAT number in Hungary. The VAT identifier consists of 8 digits (C1-C8) whereby C8 is the checkdigit which is calculated based on the values of C1-C7. The calculation is as follows:
  • Calculate the sum A by multiplying each digit C1 to C7 with the following factors:

A = 9*C1 + 7*C2 + 3*C3 + 1*C4 + 9*C5 + 7*C6 + 3*C7

  • If the ones digit of A equals zero then the checkdigit C8 is 0
  • Otherwise (if the ones digit is 1-9), subtract the ones digit from 10, the result of the subtraction is then the checkdigit C8
ERROR RELEASED(2020-10-12)
Invalid checksum of EU VAT ID IE (Ireland)
ACCURACY
IE (Ireland) This rule checks the checksum of the European VAT number in Ireland. Identifier's format is:
[C1, C2, C3, C4, C5, C6, C7, C8, C9] where C1 to C7 are number. C8 - checksum letter, C9 is optional and can be a letter in the range [A-I], or “W”.
  • 1. In reverse order, each digit is multiplied by a weight started at 2:
    • C7 - 2
    • C6 - 3
    • C5 - 4
    • C4 - 5
    • C3 - 6
    • C2 - 7
    • C1 - 8
    • LetterToNumber(C9)- 9
  • 2. LetterToNumber(C9) is based on the following mapping:

“A”=1, “B”=2, “C”=3, “D”=4, “E”=5, “F”=6, “G”=7, “H”=8, “I”=9

A “W” or absence of character in position 9 is allocated a numeric value of 0.

  • 3. Sum up the result (sumproduct)
  • 4. The remainder of the modulo 23 indicates the character position on the alphabet according to the following mapping:
ERROR RELEASED(2021-09-10)
Invalid checksum of EU VAT ID IT (Italy)
ACCURACY
IT (Italy) This rule checks the checksum of the European VAT number in Italy using the following logic:
  • 1) S1 = C1 + C3 + C5 + C7 + C9
  • 2) S2 = D2 + D4 + D6 + D8 + D10

where: Di = int(Ci/5) + (2*Ci) modulo 10

  • 3) C11 = (10 – (S1+S2)modulo10)modulo 10
ERROR RELEASED(2020-10-12)
Invalid checksum of EU VAT ID LU (Luxembourg)
ACCURACY
LU (Luxembourg) This rule checks the checksum of the European VAT number in Luxembourg using the following formula:

[C7 C8] = ([C1 C2 C3 C4 C5 C6]) Modulo 89

ERROR RELEASED(2020-10-12)
Invalid checksum of EU VAT ID LV (Latvia)
ACCURACY
LV (Latvia) This rule checks the checksum of the European VAT number in Latvia where the last digit [C11] is validated with the following logic:

A1 = 9*C1 + 1*C2 + 4*C3 + 8*C4 + 3*C5 + 10*C6 + 2*C7 + 5*C8 + 7*C9 + 6*C10

R = 3 - (A1 modulo 11)

  • If R < -1, then C11 = R + 11
  • If R > -1, then C11 = R
  • If R = -1, then VAT number is invalid
ERROR RELEASED(2020-10-12)
Invalid checksum of EU VAT ID MT (Malta)
ACCURACY
MT (Malta) This rule checks the checksum of the European VAT number in Malta, where the last 2 digits are validated using the following logic:
  • A1 = 3*C1 + 4*C2 + 6*C3 + 7*C4 + 8*C5 + 9*C6
  • R = 37 - (A1 modulo 37)
  • If R = 00, then C7 C8 = 37
  • C7 C8 = R
ERROR RELEASED(2020-10-12)
Invalid checksum of EU VAT ID NL (The Netherlands)
ACCURACY
NL (Netherlands) This rule checks the checksum of the European VAT number in The Netherlands. The checksum validation is done following modulo 11:
  • A1 = C1*9 + C2*8 + C3*7 + C4*6 + C5*5 + C6*4 + C7*3 + C8*2
  • A2 = A1 modulo 11
  • If A2 = 10:
    • then number is invalid
    • else C9 = A2
ERROR RELEASED(2020-10-12)
Invalid checksum of EU VAT ID PL (Poland)
ACCURACY
PL (Poland) This rule checks the checksum of the European VAT number in Poland using the following logic:
  • A1 = 6*C1 + 5*C2 + 7*C3 + 2*C4 + 3*C5 + 4*C6 + 5*C7 + 6*C8 + 7*C9
  • R = A1 modulo 11
  • If R = 10, then VAT number is invalid.
  • C10 = R
ERROR RELEASED(2020-10-12)
Invalid checksum of EU VAT ID PT (Portugal)
ACCURACY
PT (Portugal) This rule checks the checksum of the European VAT number in Portugal following the logic:
  • R = 11 – (9*C1 + 8*C2 + 7*C3 + 6*C4 + 5*C5 + 4*C6 + 3*C7 + 2*C8) modulo 11
  • If R=10 or R=11, then R = 0
  • C9 = R
ERROR RELEASED(2020-10-12)
Invalid checksum of EU VAT ID RO (Romania)
ACCURACY
RO (Romania) This rule checks the checksum of the European VAT number in Romania. Note that if the length is less than 10 digits, leading zeros must be assumed to perform the computation.

Checksum validation logic:

  • A1 = C1*7 + C2*5 + C3*3 + C4*2 + C5*1 + C6*7 + C7*5 + C8*3 + C9*2
  • A2 = A1 * 10
  • R1 = A2 modulo 11
  • If R1 = 10, then R = 0
    • Else R = R1


  • C10 = R
ERROR RELEASED(2020-10-12)
Invalid checksum of EU VAT ID SE (Sweden)
ACCURACY
SE (Sweden) This rule checks the checksum of the European VAT number in Sweden. The checksum digit is the 10th digit [C10]. The logic is the following:

C10 = (10 – (R + C2 + C4 + C6 + C8) modulo 10) modulo 10

  • Where: R = S1 + S3 + S5 + S7 + S9
  • Where: Si = INT(Ci/5) + (Ci*2) modulo 10
ERROR RELEASED(2020-10-12)
Invalid checksum of EU VAT ID SI (Slovenia)
ACCURACY
SI (Slovenia) This rule checks the checksum of the European VAT number in Slovenia using the following logic:
  • A1 = C1*8 + C2*7 + C3*6 + C4*5 + C5*4 + C6*3 + C7*2
  • R = 11 - (A1 modulo 11)
  • If R = 10:
    • then C8 = 0
    • Else if R = 11:
      • then number is invalid
      • else C8 = R
ERROR RELEASED(2020-12-28)
Invalid checksum of EU VAT ID SK (Slovakia)
ACCURACY
SK (the Slovak Republic) This rule checks the checksum of the European VAT number in Slovakia using modulo 11:
  • [C1 C2 C3 C4 C5 C6 C7 C8 C9 C10] modulo 11 = 0
ERROR RELEASED(2020-10-12)
Invalid checksum of EU VAT ID UK (United Kingdom)
ACCURACY
GB (United Kingdom of Great Britain and Northern Ireland) This rule checks the checksum of the European VAT number in the United Kingdom. For the standard identifier format (9 characters) validation of the 8th and 9th checksum digits follows the logic:
  • R1 = (8*C1 + 7*C2 + 6*C3 + 5*C4 + 4*C5 + 3*C6 + 2*C7 + C8C9) modulo 97
  • R2 = ((8*C1 + 7*C2 + 6*C3 + 5*C4 + 4*C5 + 3*C6 + 2*C7 + C8C9) + 55) modulo 97
  • Either R1 or R2 must equal to zero.

The following restrictions should be considered:

MOD97 (R1):

  • Not in 0100000...0999999
  • Not in 9490001...9700000
  • Not in 9990001...9999999

MOD9755 (R2):

  • Not in 0000001...0100000
  • Not in 0100001...1000000
ERROR ARCHIVED
Invalid checksum of FR SIREN (France)
ACCURACY
FR (France) This rule checks the checkdigit of the SIREN in France. The check digit (9th digit of the SIREN, C9) indicates the validity of the SIREN and is validated using modulus 10. ERROR RELEASED(2020-10-12)
Invalid checksum of FR SIRET (France)
ACCURACY
FR (France) This rule checks the checksum of the SIRET in France. For more information on how the checksum is calculated, please have a look in the additional information tab. The check digit is calculated by Modulus 10 or Luhn algorithm. ERROR RELEASED(2021-09-10)
Invalid checksum of Fiscal code (Italy)
ACCURACY
IT (Italy) This rule checks the checkdigit of the Fiscal code (Italy). This checksum rule should be applied only for the identifier which is 16 characters long. In case of 11 digits the same logic as here shoule be applied: https://meta.cdq.ch/Invalid_checksum_of_EU_VAT_ID_IT_(Italy) for checking the checksum.

The checksum is done in the following way. Starting from the preceding 15 characters, a check digit is determined as follows:

  • the eight odd characters (1st, 3rd, 5th, etc.) are set apart, same thing for the seven even ones (2nd, 4th, 6th, etc.).
  • after that, each single character is converted into a numeric value as show in the tables below:





















  • after that, all of the values are to be added up, and the final result has to be divided by 26, the remainder (Modulo) will give the last character, according to the following table:
ERROR DRAFT
Invalid checksum of GST CA (Canada)
ACCURACY
CA (Canada) This rule checks the checkdigit of the Goods and Services Tax number (GST) in Canada. The first nine digits of the GST are the Canadian business number. For these 9 digits the checkdigit is calculated, in the following way:
  • a) Add all odd digits, except the 9th one,
  • b) String all even digits together and multiply by 2

,

  • c) Add all digits from the result b. together

,

  • d) Add the result of a. and c. together

,

  • e) Subtract the result of d. from the nearest 10 digit.
  • The result of e. must equal the 9th digit.
ERROR RELEASED(2020-10-12)
Invalid checksum of INN (Russia)
ACCURACY
RU (Russian Federation) This rule describes the algorithm for checksum digits for INN (Russia).

Here there is an algorithm for INN checking – 10 digits:

  • 1. Check sum with the following weighting coefficients is calculated: (2,4,10,3,5,9,4,6,8,0)
  • 2. Check number as a residue of division of check sum by 11 is calculated
  • 3. If check number is more than 9, then check number is calculated as a residue of division of check number by 10
  • 4. Check number is verified with the tenth digit of INN. If they are equal, INN is considered as correct.

Here there is an algorithm for INN checking – 12 digits:

  • 1. Check sum according to 11 digits with the following weighting coefficients is calculated: (7,2,4,10,3,5,9,4,6,8,0)
  • 2. Check number is calculated (1) as a residue of division of check sum by 11.
  • 3. If check number (1) is more than 9, then check number (1) is calculated as a residue of division of check number (1) by 10
  • 4. Check sum according to 12 digits with the following weighting coefficients: (3,7,2,4,10,3,5,9,4,6,8,0).
  • 5. Check number (2) as a residue of division of check sum by 11 is calculated
  • 6. If control number (2) is more than 9, then check number (2) is calculated as a residue of division of check number (2) by 10
  • 7. Check number (1) is verified with the eleventh digit of INN and control number (2) is verified with the twelfth digit of INN. In case of their equality INN is considered as correct.
ERROR RELEASED(2020-10-12)
Invalid checksum of NIF number (Spain)
ACCURACY
ES (Spain) This rule describes the algorithm for checksum digits for NIF number (Spain) using the following logic:
  • the number (8 digits) is divided by 23,
  • the remainder is replaced by a letter determined by the following table:
ERROR RELEASED(2024-04-16)
Invalid checksum of National business register identifier (Austria)
ACCURACY
AT (Austria) This rule checks the checksum of the National business register identifier (Austria) following the logic:
  • 1) apply the weight number to each identifier's number,
  • 2) calculate a sumproduct of the identifier's number and respectful weight digit

,

  • 3) sum up the result

,

  • 4) apply modulo 17 the summed up result

,

  • 5) lookup the rest number of the modulo 17 in a reference table ---> checksum letter.

Any difference result in a rule violation.

ERROR ARCHIVED(2020-10-12)
Invalid checksum of Numero de Identificacion de Extranjero (Spain)
ACCURACY
ES (Spain) This rule describes the algorithm for checksum digits for Numero de Identificacion de Extranjero (Spain) using the following logic:

To calculate the check digit, each letter is replaced by a number: - replace the first letter accordingly:

   X → 0
   Y → 1
   Z → 2
- the number (8 digits) is divided by 23, - the remainder is replaced by a letter determined by the following table:
ERROR RELEASED(2021-09-10)
Invalid checksum of Polish Tax Identifier
ACCURACY
PL (Poland) This rule describes the algorithm for checksum digit (the last 11th digit) for Polish Tax Identifier using the following logic:

1) 9×a + 7×b + 3×c + 1×d + 9×e + 7×f + 3×g + 1×h + 9×i + 7×j, 2) apply modulo 10 to the sum from step 1, 3) the rest of the modulo 10 is a check-sum digit.

ERROR RELEASED(2024-04-16)