Anatomy of a EAN-13 Barcode
European EAN-13 Barcode Background
The EAN-13 barcode is composed of 13 digits, which are made up of the following sections: the first 2 or 3 digits are the country code, the next 5 to 7 digits are the manufacturer code, the next 3 to 5 digits are the product code, and the last digit is the checksum digit.
The figure below shows a typical EAN-13 barcode.

Country Code
The Country Code is a 2 or 3 digit number, which is used to identify the country that assigned the manufacturer code. All EAN-13 barcodes that begin with "0" are UPC-A barcodes. The following table contains the Country Codes:
| 00-13: USA & Canada | 20-29: In-Store Functions | 30-37: France |
| 40-44: Germany | 45: Japan (also 49) | 46: Russian Federation |
| 471: Taiwan | 474: Estonia | 475: Latvia |
| 477: Lithuania | 479: Sri Lanka | 480: Philippines |
| 482: Ukraine | 484: Moldova | 485: Armenia |
| 486: Georgia | 487: Kazakhstan | 489: Hong Kong |
| 49: Japan (JAN-13) | 50: United Kingdom | 520: Greece |
| 528: Lebanon | 529: Cyprus | 531: Macedonia |
| 535: Malta | 539: Ireland | 54: Belgium & Luxembourg |
| 560: Portugal | 569: Iceland | 57: Denmark |
| 590: Poland | 594: Romania | 599: Hungary |
| 600 & 601: South Africa | 609: Mauritius | 611: Morocco |
| 613: Algeria | 619: Tunisia | 622: Egypt |
| 625: Jordan | 626: Iran | 64: Finland |
| 690-692: China | 70: Norway | 729: Israel |
| 73: Sweden | 740: Guatemala | 741: El Salvador |
| 742: Honduras | 743: Nicaragua | 744: Costa Rica |
| 746: Dominican Republic | 750: Mexico | 759: Venezuela |
| 76: Switzerland | 770: Colombia | 773: Uruguay |
| 775: Peru | 777: Bolivia | 779: Argentina |
| 780: Chile | 784: Paraguay | 785: Peru |
| 786: Ecuador | 789: Brazil | 80 - 83: Italy |
| 84: Spain | 850: Cuba | 858: Slovakia |
| 859: Czech Republic | 860: Yugloslavia | 869: Turkey |
| 87: Netherlands | 880: South Korea | 885: Thailand |
| 888: Singapore | 890: India | 893: Vietnam |
| 899: Indonesia | 90 & 91: Austria | 93: Australia |
| 94: New Zealand | 955: Malaysia | 977: International Standard Serial Number for Periodicals (ISSN) |
| 978: International Standard Book Numbering (ISBN) | 979: International Standard Music Number (ISMN) | 980: Refund receipts |
| 981 & 982: Common Currency Coupons | 99: Coupons | |
Manufacturer Code
The EAN Manufacturer Code is a variable length number. Typically, 5 digit codes are assigned to companies, however, some companies do not produce enough products to warrant a 5 digit product code, and in such cases the EAN will issue Manufacturer Codes longer than 5 digits.
Product Code
The manufacturer is free to assign its own product codes, but they must make sure that each product code is unique within their product codes. The product codes can be as few as 3 digits long, or as long as 5 digits depending on the length of the country and manufacturer codes.
Checksum Digit
The checksum digit is calculated using the country code, manufacturer's code, and the product code. The odd numbers starting with the right most digits are multiplied by 3 and added to the sum, while the even numbers are simply added to the sum. The reason for the EAN-13 check sum being calculated in reverse order (starting with the right most digit and considering it as being odd instead of even) is for compatibility with UPC-A barcodes. The modulus of 10 is then taken of the summed total. This is subtracted from 10, and the modulus of 10 is taken again.
| For example: EAN-13 001234567890 |
| Country Code : 00 |
| Manufacturer's Code : 12345 |
| Product Code : 67890 |
The last or right most digit is '0' and is considered odd, so multiply it by 3, the second right most digit '9' is even so just add it, etc... |
(0 * 3) + 9 + (8 * 3) + 7 + (6 * 3) + 5 + (4 * 3) + 3 + (2 * 3) + 1 + (0 * 3) + 0 = 85 |
85 % 10 = 5 |
| ( ( 10 - 5 ) % 10 ) = 5 |
Symbol Size
The specifications for the EAN-13 barcode specify the nominal size as 37.29mm wide and 25.93mm high. Based upon this nominal size, the EAN-13 barcode can be scaled by a magnification factor of 0.8 to 2.0. Scaling the barcode will produce a barcode between the minimal allowable size of 29.83mm wide by 20.74mm high and the maximum allowable size of 74.58mm wide and 51.86mm high.
Digit Patterns
Each digit in a EAN-13 bar code is composed of a series of two spaces and two bars. Each digit is drawn within a space that is 7 modules wide. In addition to the 13 digits, which make up a EAN-13 barcode, the barcode symbol also has two quite zones, a lead block, a separator, and a trailing block. Each quite zone is 9 modules wide, the lead and trailing blocks are a series of lines and spaces in the format of bar, space, bar. The separator is signified by the sequence space / bar / space / bar / space.
|
where '0' represents space and '1' denotes a bar. |
In addition to the special symbol patterns listed above, the EAN-13 barcode symbol uses three distinct digit patterns as well, the Left Digit Odd Parity pattern, the Left Digit Even Parity pattern and the Right Digit pattern. The Left Digit patterns start with spaces, and the Right Digit pattern starts with bars (see table below).
| Number | Left Digits | Right Digits | |
|---|---|---|---|
| Odd Parity | Even Parity | ||
| 0 | 0001101 | 0100111 | 1110010 |
| 1 | 0011001 | 0110011 | 1100110 |
| 2 | 0010011 | 0011011 | 1101100 |
| 3 | 0111101 | 0100001 | 1000010 |
| 4 | 0100011 | 0011101 | 1011100 |
| 5 | 0110001 | 0111001 | 1001110 |
| 6 | 0101111 | 0000101 | 1010000 |
| 7 | 0111011 | 0010001 | 1000100 |
| 8 | 0110111 | 0001001 | 1001000 |
| 9 | 0001011 | 0010111 | 1110100 |
where a '0' denotes a space and '1' represents a bar.
The first digit of the Country Code is used to determine the parity of each digit of the Manufacturer's Code, see the Determining Number Parity section. The Right Digit pattern is typically used to draw the product code and the checksum digit. However, it will be used to render part of the manufacturer's code if the country code is greater than 2, or if the manufacturer's code is greater than 5.
Determining Number Parity
The first digit of the Country Code in an EAN-13 barcode is not encoded, it is used to determine the parity of the digits in the manufacturer code. The second digit of the country code is always odd and the manufacturer's code will have three left-hand numbers that use even parity and two that use odd parity, except a UPC-A compatible barcode which uses all odd parity. The table below outlines the parity for the numbers in the Manufacturer's Code.
| First Country Code Digit | Parity | |||||
|---|---|---|---|---|---|---|
| Second Country Code Digit | Manufacturer Code Digits | |||||
| 1 | 2 | 3 | 4 | 5 | ||
| 0 (UPC-A) | Odd | Odd | Odd | Odd | Odd | Odd |
| 1 | Odd | Odd | Even | Odd | Even | Even |
| 2 | Odd | Odd | Even | Even | Odd | Even |
| 3 | Odd | Odd | Even | Even | Even | Odd |
| 4 | Odd | Even | Odd | Odd | Even | Even |
| 5 | Odd | Even | Even | Odd | Odd | Even |
| 6 | Odd | Even | Even | Even | Odd | Odd |
| 7 | Odd | Even | Odd | Even | Odd | Even |
| 8 | Odd | Even | Odd | Even | Even | Odd |
| 9 | Odd | Even | Even | Odd | Even | Odd |
For example, if the country code is 75 then based upon the 1st country code digit and the above table, the 2nd digit of the country code, 5, would be Odd. The 1st digit of the Manufacturer Code would use the Even pattern, the 2nd digit would use the Odd pattern, the 3rd digit would use the Even pattern, the 4th would be Odd, and finally the 5th digit would use the Even pattern.
