Knowledge

Check digit

Source 📝

48: 219:(2004), that too detects all single-digit errors and all adjacent transposition errors. These three methods use a single check digit and will therefore fail to capture around 10% of more complex errors. To reduce this failure rate, it is necessary to use more than one check digit (for example, the modulo 97 check referred to below, which uses two check digits—for the algorithm, see 356:: The sum of products is 0×10 + 2×9 + 0×8 + 1×7 + 5×6 + 3×5 + 0×4 + 8×3 + 2×2 + 1×1 = 99 ≡ 0 (mod 11). So the ISBN is valid. Positions can also be counted from left, in which case the check digit is multiplied by 10, to check validity: 0×1 + 2×2 + 0×3 + 1×4 + 5×5 + 3×6 + 0×7 + 8×8 + 2×9 + 1×10 = 143 ≡ 0 (mod 11). 402:
characters, which are alphanumerics minus vowels and the letter 'l' (ell). This restriction helps when generating opaque strings that are unlikely to form words by accident and will not contain both O and 0, or l and 1. Having a prime radix of R=29, the betanumeric repertoire permits the algorithm to
195:
with 10, so changing any digit changes the check digit; using a coefficient that is divisible by 2 or 5 would lose information (because 5×0 = 5×2 = 5×4 = 5×6 = 5×8 = 0 modulo 10) and thus not catch some single-digit errors. Using different weights on neighboring numbers means that most transpositions
199:
The ISBN-10 code instead uses modulo 11, which is prime, and all the number positions have different weights 1, 2, ... 10. This system thus detects all single-digit substitution and transposition errors (including jump transpositions), but at the cost of the check digit possibly being 10,
403:
guarantee detection of single-character and transposition errors for strings less than R=29 characters in length (beyond which it provides a slightly weaker check). The algorithm generalizes to any character repertoire with a prime radix R and strings less than R characters in length.
145:
In choosing a system, a high probability of catching errors is traded off against implementation difficulty; simple check digit systems are easily understood and implemented by humans but do not catch as many errors as complex ones, which require sophisticated programs to implement.
149:
A desirable feature is that left-padding with zeros should not change the check digit. This allows variable length numbers to be used and the length to be changed. If there is a single check digit added to the original number, the system will not always capture
734:
The last digit of Chinese citizen ID number (second generation) is calculated by modulo 11-2 as specified in Chinese GuoBiao (aka national standard) GB11643-1999 which adopts ISO 7064:1983. 'X' is used if the calculated checking digit is
175:
To illustrate this, for example if the weights for a four digit number were 5, 3, 2, 7 and the number to be coded was 4871, then one would take 5×4 + 3×8 + 2×7 + 7×1 = 65, i.e. 65 modulo 10, and the check digit would be 5, giving 48715.
196:
change the check digit; however, because all weights differ by an even number, this does not catch transpositions of two digits that differ by 5 (0 and 5, 1 and 6, 2 and 7, 3 and 8, 4 and 9), since the 2 and 5 multiply to yield 10.
347:
11 is 0. The digit the farthest to the right (which is multiplied by 1) is the check digit, chosen to make the sum correct. It may need to have the value 10, which is represented as the letter X. For example, take the
290:
To calculate the check digit, take the remainder of (53 / 10), which is also known as (53 modulo 10), and if not 0, subtract from 10. Therefore, the check digit value is 7. i.e. (53 / 10) = 5 remainder 3; 10 - 3 =
262:
Take the remainder of the result divided by 10 (i.e. the modulo 10 operation). If the remainder is equal to 0 then use 0 as the check digit, and if not 0 subtract the remainder from 10 to derive the check
317:
To calculate the check digit, take the remainder of (5 / 10), which is also known as (5 modulo 10), and if not 0, subtract from 10: i.e. (5 / 10) = 0 remainder 5; (10 - 5) = 5. Therefore, the check digit
165:
10. This would catch any single-digit error, as such an error would always change the sum, but does not catch any transposition errors (switching two digits) as re-ordering does not change the sum.
274:
For instance, the UPC-A barcode for a box of tissues is "036000241457". The last digit is the check digit "7", and if the other numbers are correct then the check digit calculation must produce 7.
34:
With a check digit, one can detect simple errors in the input of a series of characters (usually digits) such as a single mistyped digit or some permutations of two successive digits.
154:
errors, such as two replacement errors (12 → 34) though, typically, double errors will be caught 90% of the time (both changes would need to change the output by offsetting amounts).
31:
used to check for errors in computer-generated data. It consists of one or more digits (or letters) computed by an algorithm from the other digits (or letters) in the sequence input.
200:
represented by "X". (An alternative is simply to avoid using the serial numbers which result in an "X" check digit.) ISBN-13 instead uses the GS1 algorithm used in EAN numbers.
1125: 27:
on identification numbers, such as bank account numbers, which are used in an application where they will at least sometimes be input manually. It is analogous to a binary
267:
A GS1 check digit calculator and detailed documentation is online at GS1's website. Another official calculator page shows that the mechanism for GTIN-13 is the same for
365: 343:
is a check digit computed so that multiplying each digit by its position in the number (counting from the right) and taking the sum of these products
486:
number (though this is scheduled to change, such as that the final digit will be chosen freely in new allocations, rather than being a check digit).
256:
Add the digits in the odd-numbered positions from the left (first, third, fifth, etc.—not including the check digit) together and multiply by three.
911: 179:
Systems with weights of 1, 3, 7, or 9, with the weights on neighboring numbers being different, are widely used: for example, 31 31 weights in
211:(1969), which catches all single-digit substitution and transposition errors, and many (but not all) more complex errors. Similar is another 334: 996: 971: 432: 1089: 1133: 708: 259:
Add the digits (up to but not including the check digit) in the even-numbered positions (second, fourth, sixth, etc.) to the result.
749: 1177: 467: 658: 191:. This system detects all single-digit errors and around 90% of transposition errors. 1, 3, 7, and 9 are used because they are 207:(1954), which captures 98% of single-digit transposition errors (it does not detect 90 ↔ 09) and the still more sophisticated 1110: 895: 608: 340: 1030: 490: 353: 220: 95: 77: 497: 483: 386:
and works with variable length strings of letters and digits, called extended digits. It is widely used with the
567: 73: 24: 639: 554: 508: 463:
Also used in the Norwegian KID (customer identification number) numbers used in bank giros (credit transfer),
632: 522: 241: 69: 1158:
Identification numbers and check digit schemes (a mathematical explanation of various check digit schemes)
784: 543: 188: 1068: 915: 601:
The Spanish fiscal identification number (número de identificación fiscal, NIF) (based on modulo 23).
395: 249: 58: 936: 223:) and/or to use a wider range of characters in the check digit, for example letters plus numbers. 724: 184: 62: 1000: 268: 245: 237: 180: 975: 374:
code found underneath a book's barcode. Its check digit is generated the same way as the UPC.
950: 712: 697: 383: 1100: 885: 504: 563:
patient identification numbers used in Arizona and Florida include a trailing check digit.
8: 446: 382:
The NOID Check Digit Algorithm (NCDA), in use since 2004, is designed for application in
116: 857: 1050:
David Bressoud, Stan Wagon, "Computational Number Theory", 2000, Key College Publishing
806: 701: 208: 295:
Another example: to calculate the check digit for the following food item "01010101010
891: 830: 349: 890:. Classroom Resource Materials. Mathematical Association of America. pp. 4–6. 767: 643: 344: 212: 192: 162: 399: 881: 763: 682:
bank account numbers. Serbia sometimes also uses modulo 11, for reference number.
581: 475:
Last check digit in EAN/UPC serialisation of Global Trade Identification Number (
187:
numbers (GS1 algorithm), and the 371 371 371 weights used in United States bank
812: 800: 728: 654: 580:
The Guatemalan Tax Number (NIT – Número de Identificación Tributaria) based on
457: 387: 216: 204: 1171: 391: 1022: 618: 172:
of the digits, modulo 10, with different weights for each number position.
169: 158: 774: 711:(IPOS) has confirmed a new format for application numbers of registrable 605: 560: 453: 366:
International Standard Book Number § ISBN-13 check digit calculation
157:
A very simple check digit method would be to take the sum of all digits (
777: 595: 425: 28: 836: 742: 716: 668: 547: 109: 47: 825: 231: 739: 686: 675: 665: 529: 720: 679: 625: 615: 371: 1061:"OpenFIGI: Unlock the Power of Efficiency with Open Symbology" 335:
International Standard Book Number § ISBN-10 check digits
693: 635:(JMBG). (but not all of them, due to errors or non-residency) 536: 1060: 629: 476: 439: 421: 1126:"New Format for Singapore IP Application Numbers at IPOS" 727:). It will include a check character calculated with the 611:(BSN) (national identifier) uses the modulo 11 algorithm. 141:
phonetic errors, such as 60 → 16 ("sixty" to "sixteen")
119:. In order of complexity, these include the following: 700:
has a trailing 12th digit that is calculated with the
479:). It applies to GTIN-8, GTIN-12, GTIN-13 and GTIN-14. 989: 858:"What is Check Digit? - Definition from Techopedia" 390:scheme and somewhat used with schemes, such as the 1023:"noid - Nice Opaque Identifier Generator commands" 999:. International ISBN Agency. 2005. Archived from 972:"Check Digit Calculator, at GS1 US official site" 406: 1169: 874: 657:cattle passport number (cycles from 1 to 7: see 232:UPC, EAN, GLN, GTIN, numbers administered by GS1 1123: 887:Identification Numbers and Check Digit Schemes 370:ISBN 13 (in use January 2007) is equal to the 168:A slightly more complex method is to take the 1117: 1082: 135:jump transpositions errors, such as 132 → 231 964: 278:Add the odd number digits: 0+6+0+2+1+5 = 14. 1161:UPC, EAN, and SCC-14 check digit calculator 433:International Securities Identifying Number 305:Add the odd number digits: 0+0+0+0+0+0 = 0. 287:Add the two results together: 42 + 11 = 53. 284:Add the even number digits: 3+0+0+4+4 = 11. 123:letter/digit errors, such as l → 1 or O → 0 76:. Unsourced material may be challenged and 787:'s Traffic Monitoring System (TMS) number. 16:Error detection for identification numbers 1099:. Autumn 2011. p. 16. Archived from 937:"How to calculate a check digit manually" 709:Intellectual Property Office of Singapore 96:Learn how and when to remove this message 904: 880: 750:vehicle registration plates of Singapore 653:The ninth character in the 14-character 314:Add the two results together: 0 + 5 = 5. 311:Add the even number digits: 1+1+1+1+1=5. 203:More complicated algorithms include the 23:is a form of redundancy check used for 1170: 398:. An extended digit is constrained to 281:Multiply the result by 3: 14 × 3 = 42. 252:is a check digit computed as follows: 689:TAJ number (social insurance number). 574: 129:transposition errors, such as 12 → 21 638:The last two digits of the 11-digit 308:Multiply the result by 3: 0 x 3 = 0. 74:adding citations to reliable sources 41: 696:, the unique identity number named 456:account numbers, calculated by the 339:The final character of a ten-digit 138:jump twin errors, such as 131 → 232 13: 1124:Chong-Yee Khoo (20 January 2014). 943: 489:The third and fourth digits in an 341:International Standard Book Number 126:single-digit errors, such as 1 → 2 112:are generally designed to capture 14: 1189: 1152: 1020: 503:The final character encoded in a 491:International Bank Account Number 221:International Bank Account Number 498:International Standard Text Code 411: 46: 1071:from the original on 2022-08-09 1053: 1033:from the original on 2022-05-22 745:(Personal Identification Code). 659:British Cattle Movement Service 568:Customs & Border Protection 542:The final (ninth) digit of the 525:for the US healthcare industry. 417:The International SEDOL number. 1178:Error detection and correction 1044: 1014: 929: 914:. GS1 US. 2006. Archived from 850: 407:Other examples of check digits 1: 843: 791: 756: 640:Turkish Identification Number 598:uses the modulo 11 algorithm. 588: 555:Vehicle Identification Number 509:Longitudinal redundancy check 1090:"Unique Identification Card" 912:"GS1 Check Digit Calculator" 796:Notable algorithms include: 674:Modulo 97 check digits in a 633:Unique Master Citizen Number 523:National Provider Identifier 515: 242:International Article Number 132:twin errors, such as 11 → 22 7: 1132:. Cantab IP. Archived from 833:– similar modular sum check 819: 773:The seventh character of a 226: 10: 1194: 1164:GS1 check digit calculator 550:used in the United States. 544:ABA routing transit number 452:Modulo 10 check digits in 363: 359: 332: 328: 37: 974:. GS1 US. Archived from 951:"Check Digit Calculator" 566:The eleventh digit of a 438:Object Management Group 250:Global Trade Item Number 183:codes, 13 13 weights in 621:(Identity Card) number. 521:The tenth digit of the 377: 189:routing transit numbers 785:New Zealand locomotive 664:The ninth digit in an 647: 624:The 13th digit of the 614:The ninth digit of an 496:The final digit in an 420:The final digit of an 384:persistent identifiers 269:Global Location Number 246:Global Location Number 238:Universal Product Code 1130:Singapore Patent Blog 713:intellectual property 692:For the residents of 685:The ninth digit in a 671:(national ID number). 553:The ninth digit of a 528:The final digit of a 482:The final digit of a 442:standard final digit. 364:Further information: 333:Further information: 236:The final digit of a 783:The last digit in a 505:magnetic stripe card 117:transcription errors 70:improve this section 997:"ISBN Users Manual" 839:– binary equivalent 748:The last letter on 609:Burgerservicenummer 535:The North American 447:CAS registry number 215:-based method, the 807:Verhoeff algorithm 738:The 11th digit of 725:registered designs 702:Verhoeff algorithm 648:TC Kimlik Numarası 575:In Central America 493:(Modulo 97 check). 445:The International 209:Verhoeff algorithm 897:978-0-88385-720-5 831:Casting out nines 470:of mobile phones. 106: 105: 98: 1185: 1146: 1145: 1143: 1141: 1121: 1115: 1107: 1105: 1094: 1086: 1080: 1079: 1077: 1076: 1057: 1051: 1048: 1042: 1041: 1039: 1038: 1018: 1012: 1011: 1009: 1008: 993: 987: 986: 984: 983: 968: 962: 961: 959: 958: 947: 941: 940: 933: 927: 926: 924: 923: 908: 902: 901: 882:Kirtland, Joseph 878: 872: 871: 869: 868: 854: 213:abstract algebra 101: 94: 90: 87: 81: 50: 42: 1193: 1192: 1188: 1187: 1186: 1184: 1183: 1182: 1168: 1167: 1155: 1150: 1149: 1139: 1137: 1136:on 14 July 2014 1122: 1118: 1103: 1092: 1088: 1087: 1083: 1074: 1072: 1059: 1058: 1054: 1049: 1045: 1036: 1034: 1021:Kunze, John A. 1019: 1015: 1006: 1004: 995: 994: 990: 981: 979: 970: 969: 965: 956: 954: 949: 948: 944: 935: 934: 930: 921: 919: 910: 909: 905: 898: 879: 875: 866: 864: 856: 855: 851: 846: 822: 794: 764:tax file number 762:The Australian 759: 630:Former Yugoslav 591: 577: 518: 449:'s final digit. 414: 409: 380: 368: 362: 337: 331: 234: 229: 102: 91: 85: 82: 67: 51: 40: 25:error detection 17: 12: 11: 5: 1191: 1181: 1180: 1166: 1165: 1162: 1159: 1154: 1153:External links 1151: 1148: 1147: 1116: 1114: 1113: 1106:on 2014-06-26. 1081: 1052: 1043: 1013: 988: 963: 942: 928: 903: 896: 873: 862:Techopedia.com 848: 847: 845: 842: 841: 840: 834: 828: 821: 818: 817: 816: 813:Damm algorithm 810: 804: 801:Luhn algorithm 793: 790: 789: 788: 781: 771: 758: 755: 754: 753: 746: 736: 732: 729:Damm algorithm 705: 690: 683: 672: 662: 651: 636: 622: 612: 602: 599: 590: 587: 586: 585: 576: 573: 572: 571: 564: 558: 551: 540: 533: 526: 517: 514: 513: 512: 507:is a computed 501: 494: 487: 480: 473: 472: 471: 464: 458:Luhn algorithm 450: 443: 436: 429: 418: 413: 410: 408: 405: 388:ARK identifier 379: 376: 361: 358: 330: 327: 326: 325: 315: 312: 309: 306: 293: 292: 288: 285: 282: 279: 265: 264: 260: 257: 233: 230: 228: 225: 217:Damm algorithm 205:Luhn algorithm 143: 142: 139: 136: 133: 130: 127: 124: 104: 103: 54: 52: 45: 39: 36: 15: 9: 6: 4: 3: 2: 1190: 1179: 1176: 1175: 1173: 1163: 1160: 1157: 1156: 1135: 1131: 1127: 1120: 1112: 1111:alternate url 1109: 1108: 1102: 1098: 1091: 1085: 1070: 1066: 1062: 1056: 1047: 1032: 1028: 1024: 1017: 1003:on 2014-04-29 1002: 998: 992: 978:on 2016-11-21 977: 973: 967: 952: 946: 938: 932: 918:on 2008-05-09 917: 913: 907: 899: 893: 889: 888: 883: 877: 863: 859: 853: 849: 838: 835: 832: 829: 827: 824: 823: 814: 811: 808: 805: 802: 799: 798: 797: 786: 782: 779: 776: 772: 769: 765: 761: 760: 751: 747: 744: 741: 737: 733: 730: 726: 722: 718: 714: 710: 706: 703: 699: 695: 691: 688: 684: 681: 677: 673: 670: 667: 663: 660: 656: 652: 649: 645: 641: 637: 634: 631: 627: 623: 620: 617: 613: 610: 607: 603: 600: 597: 593: 592: 583: 579: 578: 570:entry number. 569: 565: 562: 559: 556: 552: 549: 545: 541: 538: 534: 531: 527: 524: 520: 519: 510: 506: 502: 499: 495: 492: 488: 485: 481: 478: 474: 469: 465: 462: 461: 459: 455: 451: 448: 444: 441: 437: 434: 430: 427: 423: 419: 416: 415: 412:International 404: 401: 397: 393: 392:Handle System 389: 385: 375: 373: 367: 357: 355: 354:0-201-53082-1 351: 346: 342: 336: 323: 322: 316: 313: 310: 307: 304: 303: 302: 300: 299: 289: 286: 283: 280: 277: 276: 275: 272: 270: 261: 258: 255: 254: 253: 251: 247: 243: 239: 224: 222: 218: 214: 210: 206: 201: 197: 194: 190: 186: 182: 177: 173: 171: 166: 164: 160: 155: 153: 147: 140: 137: 134: 131: 128: 125: 122: 121: 120: 118: 115: 111: 100: 97: 89: 79: 75: 71: 65: 64: 60: 55:This section 53: 49: 44: 43: 35: 32: 30: 26: 22: 1138:. Retrieved 1134:the original 1129: 1119: 1101:the original 1097:Geek Gazette 1096: 1084: 1073:. Retrieved 1064: 1055: 1046: 1035:. Retrieved 1027:metacpan.org 1026: 1016: 1005:. Retrieved 1001:the original 991: 980:. Retrieved 976:the original 966: 955:. Retrieved 945: 931: 920:. Retrieved 916:the original 906: 886: 876: 865:. Retrieved 861: 852: 795: 619:Teudat Zehut 381: 369: 338: 320: 319: 297: 296: 294: 273: 266: 235: 202: 198: 178: 174: 170:weighted sum 167: 156: 151: 148: 144: 113: 108:Check digit 107: 92: 83: 68:Please help 56: 33: 20: 18: 953:. GS1. 2005 775:New Zealand 715:(IP, e.g., 561:Mayo Clinic 454:credit card 400:betanumeric 324:value is 5. 159:digital sum 21:check digit 1075:2022-10-15 1037:2022-10-15 1007:2008-05-21 982:2012-08-09 957:2008-05-21 922:2008-05-21 867:2022-03-16 844:References 792:Algorithms 778:NHI Number 766:(based on 757:In Oceania 717:trademarks 596:NHS Number 589:In Eurasia 426:IMO Number 110:algorithms 86:April 2010 29:parity bit 837:Check bit 743:Isikukood 687:Hungarian 669:Kennitala 666:Icelandic 548:bank code 516:In the US 57:does not 1172:Category 1069:Archived 1065:OpenFIGI 1031:Archived 884:(2001). 826:Checksum 820:See also 740:Estonian 466:Used in 424:code or 227:Examples 152:multiple 721:patents 698:Aadhaar 680:Serbian 676:Belgian 644:Turkish 626:Serbian 616:Israeli 594:The UK 539:number. 530:POSTNET 435:(ISIN). 360:ISBN 13 329:ISBN 10 193:coprime 78:removed 63:sources 1140:6 July 939:. GS1. 894:  815:(2004) 809:(1969) 803:(1954) 768:modulo 582:modulo 557:(VIN). 372:EAN-13 352:  345:modulo 271:/GLN. 263:digit. 163:modulo 38:Design 1104:(PDF) 1093:(PDF) 694:India 606:Dutch 537:CUSIP 532:code. 114:human 1142:2014 892:ISBN 770:11). 707:The 678:and 628:and 604:The 546:, a 484:DUNS 477:GTIN 468:IMEI 440:FIGI 431:The 422:ISSN 394:and 378:NCDA 350:ISBN 61:any 59:cite 735:10. 584:11. 396:DOI 301:". 248:or 185:EAN 181:UPC 72:by 1174:: 1128:. 1095:. 1067:. 1063:. 1029:. 1025:. 860:. 723:, 719:, 661:). 655:EU 650:). 646:: 460:. 291:7. 244:, 240:, 161:) 19:A 1144:. 1078:. 1040:. 1010:. 985:. 960:. 925:. 900:. 870:. 780:. 752:. 731:. 704:. 642:( 511:. 500:. 428:. 321:x 298:x 99:) 93:( 88:) 84:( 80:. 66:.

Index

error detection
parity bit

cite
sources
improve this section
adding citations to reliable sources
removed
Learn how and when to remove this message
algorithms
transcription errors
digital sum
modulo
weighted sum
UPC
EAN
routing transit numbers
coprime
Luhn algorithm
Verhoeff algorithm
abstract algebra
Damm algorithm
International Bank Account Number
Universal Product Code
International Article Number
Global Location Number
Global Trade Item Number
Global Location Number
International Standard Book Number § ISBN-10 check digits
International Standard Book Number

Text is available under the Creative Commons Attribution-ShareAlike License. Additional terms may apply.