International Article Number
International Article Number, also known as the European Article Number , is a global standard that defines a barcode format and a unique numbering system used in retail and trade. It helps identify specific types of retail products based on their packaging and manufacturer, making it easier to track and manage products in international trade.
Originally developed to simplify product identification in stores, the EAN system has been integrated into the broader Global Trade Item Number standard. While GTIN can be expressed with any barcode format, the EAN barcode format remains the most widely recognized one used in inventory control, wholesale transactions, and accounting processes.
The most widely used version is EAN-13, an extension of the earlier 12-digit Universal Product Code with an optional numeric prefix indicating the country of registration. In cases where space is limited on packaging, the shorter EAN-8 format is used. To append supplemental information, such as periodical issue numbers and food item prices, EAN-2 and EAN-5 are also used.
Composition
The 13-digit EAN-13 number consists of four components:- GS1 prefix – 3 digits
- Manufacturer code – variable length
- Product code – variable length
- Check digit
GS1 prefix
GS1 defines the prefixes 020-029 as being available for retailer internal use. Some retailers use this for proprietary products, although many retailers obtain their own manufacturer's code for their own brands. Other retailers use at least part of this prefix for products which are packaged in store, for example, items weighed and served over a counter for a customer. In these cases, the barcode may encode a price, quantity or weight along with a product identifier – in a retailer defined way. The product identifier may be one assigned by the Produce Electronic Identification Board or may be retailer assigned. Retailers who have historically used UPC barcodes tend to use GS1 prefixes starting with "02" for store-packaged products.
The EAN "country code" 978 has been allocated since the 1980s to reserve a Unique Country Code prefix for EAN identifiers of published books, regardless of country of origin, so that the EAN space can catalog books by ISBNs rather than maintaining a redundant parallel numbering system. This is informally known as "Bookland". The prefix 979 with first digit 0 is used for International Standard Music Number and the prefix 977 indicates International Standard Serial Number.
Manufacturer code
The manufacturer code is a unique value assigned to each manufacturer by the numbering authority indicated by the GS1 Prefix. All products produced by a given company will use the same manufacturer code. EAN-13 uses what are called "variable-length manufacturer codes". Assigning fixed-length 5-digit manufacturer codes means that each manufacturer can have up to 99,999 product codes, or 9,999 for 3 digit GS1 prefixes. Many manufacturers do not have that many products, which means hundreds or even thousands of potential product codes are being wasted on manufacturers that only have a few products. Thus if a potential manufacturer knows that it is only going to produce a few products, EAN-13 may issue it a longer manufacturer code, leaving less space for the product code. This results in more efficient use of the available manufacturer and product codes.In ISBN and ISSN, this component is used to identify the language in which the publication was issued and managed by a transnational agency covering several countries, or to identify the country where the legal deposits are made by a publisher registered with a national agency, and it is further subdivided any allocating subblocks for publishers; many countries have several prefixes allocated in the ISSN and ISBN registries.
Product code
The product code is assigned by the manufacturer. The product code immediately follows the manufacturer code. The total length of the manufacturer code plus the product code should be 9 or 10 digits depending on the length of the country code.In ISBN, ISMN and ISSN, it uniquely identifies the publication from the same publisher; it should be used and allocated by the registered publisher in order to avoid creating gaps.
Check digit
The check digit is an additional digit used to verify that a barcode has been scanned correctly. It is computed modulo 10, where the weights in the checksum calculation alternate between 3 and 1. In particular, since the weights are relatively prime to 10, the EAN-13 system will detect all single digit errors. It also recognizes 90% of transposition errors.Calculation of checksum digit
The checksum is calculated as sum of products – taking an alternating weight value times the value of each data digit. The checksum digit is the digit which must be added to this checksum to get a number divisible by 10. See ISBN-13 check digit calculation for a more extensive description and algorithm. The Global Location Number also uses the same method.Position – weight
The weight at a specific position in the EAN code is alternating in a way, that the final data digit has a weight of 3.All Global Trade Item Number and Serial Shipping Container Code codes meet the next rule:
Numbering the positions from the right, the odd data digits are always weight of 3 and the even data digits are always weight of 1, regardless of the length of the code.
Weights for 18-digit SSCC code and GTINs :
| position | 17 | 16 | 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 |
| weight | 3 | 1 | 3 | 1 | 3 | 1 | 3 | 1 | 3 | 1 | 3 | 1 | 3 | 1 | 3 | 1 | 3 |
Weights for EAN-13 code:
| position | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 |
| weight | 1 | 3 | 1 | 3 | 1 | 3 | 1 | 3 | 1 | 3 | 1 | 3 |
Weights for EAN-8 code:
| position | 7 | 6 | 5 | 4 | 3 | 2 | 1 |
| weight | 3 | 1 | 3 | 1 | 3 | 1 | 3 |
Calculation examples
- For EAN-13 barcode 400638133393x, where x is the unknown check digit,, the check digit calculation is:
- For EAN-8 barcode 7351353x, where x is the unknown check digit, the check digit calculation is:
Binary encoding of data digits into EAN-13 barcode
Barcode structure
The barcode consists of 95 areas of equal width. Each area can be either white or black. From left to right:- 3 areas for the start marker
- 42 areas to encode digits 2–7, and to encode digit 1 indirectly, as described in the following section
- 5 areas for the center marker
- 42 areas to encode digits 8–13
- 3 areas for the end marker
Encoding of the digits
If the first digit is zero, all digits in the first group of 6 are encoded using the pattern LLLLLL used for UPC; therefore, a UPC barcode is also an EAN-13 barcode with the first digit set to zero.
| First digit | First group of 6 digits | Last group of 6 digits |
0 | LLLLLL | RRRRRR |
1 | LLGLGG | RRRRRR |
2 | LLGGLG | RRRRRR |
3 | LLGGGL | RRRRRR |
4 | LGLLGG | RRRRRR |
5 | LGGLLG | RRRRRR |
6 | LGGGLL | RRRRRR |
7 | LGLGLG | RRRRRR |
8 | LGLGGL | RRRRRR |
9 | LGGLGL | RRRRRR |
This encoding guarantees that the first group always starts with an L-code, which has odd parity, and that the second group always starts with an R-code, which has even parity. Thus, it does not matter whether the barcode is scanned from the left or from the right, as the scanning software can use this parity to identify the start and end of the code.
EAN-8 barcodes encode all digits directly, using this scheme:
| First group of 4 digits | Last group of 4 digits |
LLLL | RRRR |
| Digit | L-code | G-code | R-code |
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 |
Note: Entries in the R-column are bitwise complements of the respective entries in the L-column. Entries in the G-column are the entries in the R-column in reverse bit order. See pictures of all codes against a colored background.
A run of one or more black areas is known as a "bar", and a run of one or more white areas is known as a "space". As can be seen in the table, each digit's encoding comprises two bars and two spaces, and the maximum width of a bar or space is four areas.