Hubbry Logo
International Article NumberInternational Article NumberMain
Open search
International Article Number
Community hub
International Article Number
logo
8 pages, 0 posts
0 subscribers
Be the first to start a discussion here.
Be the first to start a discussion here.
International Article Number
International Article Number
from Wikipedia
GTIN-13 number encoded in EAN-13 barcode. The first digit is always placed outside the symbol; additionally a right ">" indicator is used to indicate a "Quiet Zone" that is necessary for barcode scanners to work properly. Presented GS1 code (590) is assigned to Poland.

International Article Number, also known as European Article Number (EAN), 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 (GTIN) 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 (UPC-A) 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

[edit]

The 13-digit EAN-13 number consists of four components:[1]

  • GS1 prefix – 3 digits [2]
  • Manufacturer code – variable length
  • Product code – variable length
  • Check digit

GS1 prefix

[edit]

The first three digits of the EAN-13 (GS1 Prefix) usually identify the GS1 Member Organization which the manufacturer has joined (not necessarily where the product is actually made).[3] Note that EAN-13 codes beginning with 0 are actually 12-digit UPC codes with prepended 0 digit. In recent years,[when?] more products sold by retailers outside the United States and Canada have been using EAN-13 codes beginning with 0, since they were generated by GS1-US.

The 020-029 GS1 Prefixes are worth a special mention. GS1 defines this as being available for retailer internal use (or internal use by other types of business). Some retailers use this for proprietary (own brand or unbranded) 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 (PEIB) or may be retailer assigned. Retailers who have historically used UPC barcodes tend to use GS1 prefixes starting with "02" for store-packaged products.[citation needed]

The EAN "country code" 978 (and later 979) has been allocated since the 1980s to reserve a Unique Country Code (UCC) prefix for EAN identifiers of published books, regardless of country of origin, so that the EAN space can catalog books by ISBNs[4] 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 (ISMN) and the prefix 977 indicates International Standard Serial Number (ISSN).

Manufacturer code

[edit]

The manufacturer code is a unique code 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, as the UCC has done until recently, means that each manufacturer can have up to 99,999 product codes.(9,999 for 3 digit GS1 prefix's) 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.[5]

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

[edit]

The product code is assigned by the manufacturer. The product code immediately follows manufacturer code. The total length of manufacturer code plus product code should be 9 or 10 digits depending on the length of country code (2–3 digits).

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; however it happens that a registered book or serial never gets published and sold.

Check digit

[edit]

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 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 (all cases, where the difference between adjacent digits is not 5).

Calculation of checksum digit

[edit]

The checksum is calculated as sum of products – taking an alternating weight value (3 or 1) 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 (i.e. the additive inverse of the checksum, modulo 10).[6] See ISBN-13 check digit calculation for a more extensive description and algorithm. The Global Location Number (GLN) also uses the same method.

Position – weight

[edit]

The weight at a specific position in the EAN code is alternating (3 or 1) in a way, that the final data digit has a weight of 3 (and thus the check digit has a weight of 1).

All Global Trade Item Number (GTIN) and Serial Shipping Container Code (SSCC) codes meet the next rule:

Numbering the positions from the right (code aligned to 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 (GTIN-8, GTIN-12, GTIN-13, GTIN-14):

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

[edit]
  • For EAN-13 barcode 400638133393x, where x is the unknown check digit, (Stabilo Point 88 Art. No. 88/57), the check digit calculation is:
position 12 11 10 9 8 7 6 5 4 3 2 1
first 12 digits of barcode 4 0 0 6 3 8 1 3 3 3 9 3
weight 1 3 1 3 1 3 1 3 1 3 1 3
partial sum 4 0 0 18 3 24 1 9 3 9 9 9
checksum 89
The nearest multiple of 10 that is equal to or higher than the checksum, is 90. Subtract them: 90 - 89 = 1, which is the check digit x of the barcode.
  • For EAN-8 barcode 7351353x, where x is the unknown check digit, the check digit calculation is:
position 7 6 5 4 3 2 1
first 7 digits of barcode 7 3 5 1 3 5 3
weight 3 1 3 1 3 1 3
partial sum 21 3 15 1 9 5 9
checksum 63
The nearest multiple of 10 that is equal to or higher than the checksum, is 70. Subtract them: 70 - 63 = 7, which is the check digit x of the barcode.

Binary encoding of data digits into EAN-13 barcode

[edit]

The GTIN numbers, encoded to UPC-A, EAN-8 and EAN-13, all use similar encoding. The encoded data is usually repeated in plain text below the barcode.

Barcode structure

[edit]
Encoding EAN-13
Encoding L-digits
Encoding G-digits
Encoding R-digits

The barcode consists of 95 areas (also called modules[citation needed]) of equal width. Each area can be either white (represented here as 0) or black (represented as 1). From left to right:

  • 3 areas for the start marker (101)
  • 42 areas (seven per digit) to encode digits 2–7, and to encode digit 1 indirectly, as described in the following section
  • 5 areas for the center marker (01010)
  • 42 areas (seven per digit) to encode digits 8–13
  • 3 areas for the end marker (101)

Encoding of the digits

[edit]

To encode the 13-digit EAN-13 number, the digits are split into 3 groups; the first digit, the first group of 6 and the last group of 6. The first group of 6 is encoded using a pattern whereby each digit has two possible encodings, one of which has even parity (denoted with letter G) and one of which has odd parity (denoted with letter L). The first digit is not represented directly by a pattern of bars and spaces, but is encoded indirectly, by selecting a pattern of choices between these two encodings for the first group of 6 digits, according to the table below. All digits in the last group of 6 digits are encoded using a single pattern RRRRRR, the one also used for UPC.

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.

Structure of EAN-13
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:

Structure of EAN-8
First group of 4 digits Last group of 4 digits
LLLL RRRR
Encoding of the digits
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 (logical operator: negation) 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.

EAN-13 barcode example

[edit]
EAN-13 barcode. A green bar indicates the black bars and white spaces that encode a digit.
  • C1, C3: Start/end marker.
  • C2: Marker for the center of the barcode.
  • 6 digits in the left group: 003994.
  • 6 digits in the right group (the last digit is the check digit): 155486.
  • A digit is encoded in seven areas, by two black bars and two white spaces. Each black bar or white space can have a width between 1 and 4 areas.
  • Parity for the digits from left and right group: OEOOEE EEEEEE (O = Odd parity, E = Even parity).
  • The first digit in the EAN code: the combination of parities of the digits in the left group indirectly encodes the first digit 4.

The complete EAN-13 code is thus: 4 003994 155486.

Scanning part of an EAN-13 barcode.

Decoding

[edit]

By utilizing the barcode's center marker, a scanner can decode an International Article Number (EAN) by scanning one half of the barcode at a time through a helical scan at a 45-degree angle. This method reconstructs the full code from partial scans, useful when the barcode is obscured or damaged. Error detection algorithms, such as checksum verification, play a crucial role by identifying and correcting scanning errors, ensuring accurate decoding. Additionally, modern scanners often employ omnidirectional scanning, enhancing their ability to read barcodes at various angles.

These scanners also leverage the symmetrical structure of EAN-13, allowing decoding from either direction. Error detection algorithms, like the Luhn algorithm, commonly used in checksum calculations, verify the integrity of the data scanned. If errors are detected, the scanner can either alert the user or attempt correction, improving the reliability of scanning in dynamic or less-than-ideal conditions.

Japanese Article Number

[edit]

Japanese Article Number (JAN) is a barcode standard compatible with the EAN. It is a subset of EAN. Use of the JAN standard began in 1978. Originally, JAN was issued a flag code (EAN's number system) of 49. In 1992, JAN was newly issued an additional flag code of 45. In January 2001 the manufacturer code changed to 7 digits (9 digits including the flag code) for new companies.[7]

See also

[edit]

References

[edit]
[edit]
Revisions and contributorsEdit on WikipediaRead on Wikipedia
from Grokipedia
The International Article Number (EAN), also known as the European Article Number, is a globally recognized standard for encoding product identification numbers into barcodes, utilizing a 13-digit numeric to uniquely identify and items in retail and operations. This system enables efficient scanning at points of sale, inventory management, and by providing a consistent method for product lookup and tracking. Developed in 1977 by the European Article Numbering Association (later reorganized as the International Article Numbering Association) as a superset of the U.S.-based (UPC) system, the EAN was created to facilitate product identification outside and promote cross-border compatibility in global commerce. In 2005, the International Article Numbering Association merged with the Uniform Code Council to form , the current governing body, which integrated EAN into the broader framework to standardize identification keys worldwide. Today, EAN barcodes are the most widely used of all symbologies, appearing on billions of products annually and supporting seamless data exchange across industries. The structure of an EAN-13 code begins with a 2- or 3-digit prefix indicating the country or region where the company is registered with member organizations (e.g., 300–379 for France), not necessarily the country of manufacture, followed by a 9- to 10-digit company and product code assigned by the manufacturer, and ending with a for error detection. Encoded in a linear symbology with alternating black and white bars of varying widths, it is scannable by standard or imaging readers and remains compatible with legacy UPC-A codes through a leading zero conversion. While primarily associated with retail, EAN variants like (for smaller packages) and extensions for books () extend its application, underscoring its role in enhancing efficiency and reducing errors in global logistics.

Overview

Definition and Purpose

The International Article Number (EAN), also known as the European Article Number in its original form, is a standardized 13-digit numeric symbology designed for the unique identification of items, such as products, in global commerce. It encodes a (GTIN-13) and is represented as a linear that can be scanned by optical readers. An 8-digit variant, , exists for smaller packages where space is limited, maintaining the same principles of identification. Now managed internationally by , the system ensures consistent product numbering across supply chains, independent of manufacturers or retailers. The primary purpose of the EAN is to enable automated identification and data exchange in retail, , and inventory management, allowing seamless tracking of from production to point-of-sale. By providing a universal identifier, it supports among diverse systems, facilitating efficient scanning and information sharing worldwide without reliance on codes. This is essential for global trade, where products move across borders and require consistent recognition by scanners and databases. Key benefits include reduced errors at checkout through precise product lookup, enhanced supply chain efficiency via accurate , and smooth integration with point-of-sale (POS) systems that automate transactions and pricing. For example, in retail environments, EAN scanning minimizes manual entry mistakes, speeding up processes and improving . Overall, it promotes and operational reliability, contributing to lower costs and higher accuracy in . Originating in 1970s Europe, the EAN was developed as a compatible extension to the Universal Product Code (UPC) used in the United States, addressing the need for an international numbering system in expanding markets.

History and Development

The International Article Number (EAN) system originated in the mid-1970s as an extension of the Universal Product Code (UPC), which had been developed in the United States, to enable international product identification by adding a country prefix to the existing 12-digit structure. This adaptation addressed the need for a standardized numbering system beyond North America, allowing for global trade efficiency. The European Article Numbering Association (EAN International), the precursor to GS1, was formally established in 1977 in Brussels, Belgium, as a not-for-profit organization to coordinate the development and implementation of the EAN standard across Europe and beyond. The first practical use of the EAN-13 barcode occurred on October 2, 1979, when a box of Melrose tea bags was scanned at a supermarket in , , initiating its deployment in retail environments. In parallel, Japan adopted a localized variant known as the Japanese Article Number (JAN) system in 1978, becoming the first Asian country to implement EAN-compatible barcodes and facilitating its integration into domestic supply chains. By the 1980s, the EAN system rapidly expanded globally, with adoption in , , , and other regions, as national organizations joined EAN International to assign country prefixes and promote standardized scanning in retail and logistics. Key milestones in the system's evolution included the 2005 merger of EAN International and the Uniform Code Council (UCC) to form , a unified global standards body operating in over 150 countries. This merger also marked the "Sunrise Date" for the full integration of EAN into the (GTIN) framework, ensuring seamless compatibility between EAN-13, UPC-A, and other GTIN variants for worldwide product identification. In the , has advanced toward digital enhancements, such as the 2020 introduction of the GS1 Digital Link standard, which enables QR codes to encode GTINs and additional data, though the linear EAN barcode remains the dominant format for point-of-sale scanning, with billions of daily uses. As of 2023, announced the Sunrise 2027 initiative to support the global transition to 2D barcodes, such as QR codes using GS1 Digital Link, at retail points of sale by the end of 2027, enhancing data capacity and consumer engagement while maintaining compatibility with existing systems.

Standards and Organization

GS1 and Global Standards

GS1 is a global, non-profit dedicated to developing and disseminating standards for and product identification, including the International Article Number (EAN) system. Founded in 2005 through the merger of EAN International and the Uniform Code Council, GS1 coordinates over 110 member organizations across more than 120 countries, enabling businesses worldwide to adopt uniform identification practices. In relation to the EAN, serves as the central authority for assigning company prefixes, which form the initial digits of EAN codes and ensure unique product identification globally. These prefixes are allocated to companies via national or regional member organizations, requiring membership and licensing fees to maintain compliance with standards. This decentralized yet coordinated approach guarantees , allowing EAN barcodes to function seamlessly in without duplication or conflict. GS1 maintains the technical specifications for EAN through its foundational document, the GS1 General Specifications, which outlines rules for barcode encoding, data carriers, and identification keys. The latest version, Release 25.0 published in January 2025, enhances clarity on digital linkages and supports evolving technologies by integrating EAN data with web-based systems. Compliance with these specifications is mandatory for GS1 members to ensure EAN codes meet quality benchmarks for scanning reliability and data accuracy. Recent updates to standards have increasingly incorporated EAN into broader ecosystems, particularly for (RFID) and (IoT) applications, facilitating real-time tracking and data sharing by 2025. For instance, the Digital Link standard embeds EAN identifiers into URLs, enabling machine-readable connections between physical products and digital information platforms. This evolution underscores 's role in adapting EAN for modern supply chains, where physical barcodes complement automated identification technologies.

Relation to GTIN and UPC

The Universal Product Code (UPC), specifically the UPC-A variant, is a 12-digit identifier primarily developed for and used in , particularly the and , to streamline retail point-of-sale scanning. In contrast, the International Article Number (EAN), most commonly in its 13-digit EAN-13 form, extends this system by adding a leading digit that serves as a country or regional prefix, such as 0 or 1 for products originating from the or . This design ensures , as an EAN-13 code starting with 0 or 1 effectively embeds a UPC-A code, allowing existing UPC scanners to interpret it correctly by ignoring or adjusting for the prefix during decoding. The EAN-13 is formally classified as a (GTIN-13) within the broader GTIN framework managed by , which unifies product identification across global supply chains. GTINs encompass multiple formats—GTIN-8, GTIN-12 (equivalent to UPC-A), GTIN-13 (equivalent to EAN-13), and GTIN-14—to support diverse product packaging levels and without requiring format alterations for data exchange. This standardization facilitates seamless compatibility in logistics and inventory systems, where a single GTIN can be encoded in various symbologies like EAN/UPC, enabling efficient sharing of product information worldwide. While UPC-A remains dominant in the and Canadian retail sectors, EAN-13 is the preferred standard internationally for its explicit support of global prefixes and broader adoption outside . Both systems have been integrated under oversight since the 2005 merger of the Uniform Code Council (UCC) and EAN International, which harmonized their standards to promote unified global implementation. This convergence ensures that products bearing either code can be scanned and processed interchangeably in most modern retail environments, enhancing cross-border commerce efficiency.

Structure and Composition

Components of EAN-13

The EAN-13 format encodes a 13-digit (GTIN-13) used to uniquely identify trade items in global supply chains. This structure divides the digits into key components: a prefix, a company prefix, an item reference, and a . The design ensures uniqueness while allowing flexibility for varying company sizes and product assortments. The prefix comprises the initial 2 or 3 digits and designates the member organization, typically corresponding to a or geographical where the issuing company is registered. For instance, the range 300–379 is allocated to (e.g., 3xx), 400–440 to , while 000–019 applies to the and , often integrating with the UPC system by prefixing a leading to 12-digit UPC codes. This prefix indicates the country of registration with GS1 and facilitates international without directly indicating the product's manufacturing location, which may differ. Following the GS1 prefix, the company prefix is a variable-length code assigned by the local GS1 member organization to the brand owner or manufacturer, identifying the entity responsible for the product. Its length typically ranges from 4 to 8 digits (resulting in a total company prefix of 6 to 10 digits when combined with the GS1 prefix), depending on the number of unique items the company requires to identify; shorter prefixes allow for more products, while longer ones suit smaller assortments. For example, a 6-digit company prefix (common in ) provides space for up to 1 million item references. The item reference occupies the remaining digits before the check digit (typically 2 to 6 digits) and is assigned by the company to specify a particular product variant, such as differences in , , flavor, or . Its inversely varies with the company prefix to maintain a fixed total of 12 digits for these elements; for a 7-digit company prefix, the item reference would be 5 digits, enabling the company to distinguish up to variants. This allocation ensures precise identification within the company's portfolio. The final component, the check digit (the 13th digit), serves as a single verification numeral derived from the preceding 12 digits to detect common scanning or entry errors. It is computed using a standardized weighted sum modulo 10 method. Overall, the fixed 13-digit length of EAN-13 balances global consistency with adaptability, as the variable partitioning of the company prefix and item reference accommodates diverse business needs without altering the total structure.

Variants Including EAN-8 and JAN

The is a compact 8-digit variant of the system, developed for trade items where packaging space is insufficient for the EAN-13 barcode. It encodes a (GTIN-8), consisting of a 2- or 3-digit prefix assigned to national organizations, followed by a 4- or 5-digit item reference number, and a single calculated using the same modulo-10 weighted sum method as the EAN-13. This format is reserved for small consumer products and is rarely assigned due to limited numbering capacity, with usage primarily limited to items like , , and pharmaceuticals sold at retail point-of-sale. The Japanese Article Number (JAN) represents a localized adaptation of the EAN-13 for the Japanese market, utilizing prefixes beginning with 45 or 49 to denote origin in . Introduced when joined the EAN Association (now ) in 1978 with the initial prefix 49, it was expanded in 1992 to include 45 for additional capacity; the structure mirrors the EAN-13, comprising a prefix, company prefix, item reference, and . Managed exclusively by , JAN codes are the standard identifier for consumer goods in Japanese retail and distribution, effectively mandatory for products entering the to ensure compatibility with point-of-sale systems. JAN also accommodates book identification through integration with the International Standard Book Number () system, where a 10-digit ISBN (excluding its check digit) is prefixed with 978 or 979 to form a 13-digit GTIN-13, followed by a recalculated EAN check digit for barcode encoding. Unlike some regional systems, there is no distinct EAN-12 format; 12-digit codes align with the UPC-A standard used mainly in .

Checksum Calculation

Weighted Sum Method

The weighted sum method is a modulo-10 used to calculate the for the EAN-13 code, ensuring the integrity of the 13-digit identifier by verifying the first 12 digits through weighted . This approach applies alternating weights of 3 and 1 to the digits, starting from the right, to produce a sum that determines the final . Positions for weighting are numbered from right to left across the first 12 digits, with position 1 assigned to the rightmost digit (excluding the check digit position). Odd-numbered positions (1, 3, 5, etc.) are multiplied by 3, while even-numbered positions (2, 4, 6, etc.) are multiplied by 1. This right-to-left orientation aligns with the standard convention for GTIN-13 computation as defined by GS1. The check digit is derived from the following formula: S=i=112diwiS = \sum_{i=1}^{12} d_i \cdot w_i where did_i is the digit in position ii (right to left), and wi=3w_i = 3 if ii is odd, wi=1w_i = 1 if ii is even. The check digit cc is then: c=(10(Smod10))mod10c = (10 - (S \mod 10)) \mod 10 This ensures the total sum including the check digit is congruent to 0 10. The method excels in error detection, reliably identifying all single-digit substitution errors and most adjacent digit transpositions, thereby validating code accuracy during scanning or manual entry. It achieves 100% detection for single-digit errors, enhancing reliability in applications.

Calculation Examples

To illustrate the application of the weighted sum method for calculating the EAN check digit, the following worked examples demonstrate the process step by step for both EAN-13 and formats. These examples use the standard modulo-10 algorithm, where the weighted sum of the first 12 (for EAN-13) or 7 (for ) digits is computed with alternating multipliers of 3 and 1 starting from the rightmost digit (multiplied by 3), and the check digit is then determined as (10 - (sum mod 10)) mod 10 to ensure the total weighted sum of all digits (including the check digit multiplied by 1) is a multiple of 10.

Example 1: EAN-13 Check Digit Calculation

Consider the first 12 digits of a product code: 210987654321. The is calculated as follows:
  1. Assign multipliers starting from the right: the rightmost digit (1) is multiplied by 3, the next left (2) by 1, then 3, 1, and so on, alternating.
Position (left to right)DigitMultiplierWeighted Value
1212
2133
3010
49327
5818
67321
7616
85315
9414
10339
11212
12133
  1. Sum the weighted values: 2 + 3 + 0 + 27 + 8 + 21 + 6 + 15 + 4 + 9 + 2 + 3 = 100.
  2. Compute the : 100 mod 10 = 0.
  3. Check digit = (10 - 0) mod 10 = 10 mod 10 = 0.
Thus, the complete EAN-13 code is 210987654320. To verify, include the check digit (0 multiplied by 1) in the total weighted sum: 100 + 0 = 100, which is divisible by 10 (100 mod 10 = 0).

Example 2: EAN-8 Check Digit Calculation

For smaller packages, EAN-8 uses the first 7 digits, such as 7654321. The process mirrors EAN-13 but with fewer digits:
  1. Assign multipliers from the right: rightmost digit (1) by 3, next (2) by 1, alternating.
Position (left to right)DigitMultiplierWeighted Value
17321
2616
35315
4414
5339
6212
7133
  1. Sum the weighted values: 21 + 6 + 15 + 4 + 9 + 2 + 3 = 60.
  2. Compute the : 60 mod 10 = 0.
  3. Check digit = (10 - 0) mod 10 = 0.
The complete EAN-8 code is 76543210. Verification: total weighted sum including check digit (0 × 1) is 60 + 0 = 60, divisible by 10.

Example 3: Detecting Errors with Check Digit Validation

The also serves to detect common errors, such as transcription mistakes. Using the EAN-13 example above, suppose the code is entered incorrectly as 2109876543211 ( changed to 1). Compute the full weighted sum, now including the erroneous multiplied by 1 from the right:
  • Weighted sum of first 12 digits: 100 (as before).
  • Check digit contribution: 1 × 1 = 1.
  • Total: 100 + 1 = 101.
  • 101 mod 10 = 1 (not 0), indicating the code is invalid.
This failure confirms the error, as a valid code's total weighted sum must be divisible by 10. Such validation is essential for accurate scanning and inventory management. For practical use beyond manual calculation, online tools like the Check Digit Calculator allow users to input partial codes and automatically compute the while displaying the steps. These resources emphasize the manual process for understanding but streamline verification in professional settings.

Barcode Encoding

Overall Structure

The International Article Number (EAN) barcode is a linear one-dimensional symbology designed for encoding product identification numbers in retail environments. The EAN-13 format, the primary variant, features a structured layout of alternating black bars and white spaces that represent a 13-digit (GTIN). This layout ensures reliable scanning by point-of-sale devices and includes essential elements for synchronization and error prevention. The entire symbol is typically printed with a human-readable interpretation (HRI) of the full GTIN beneath the bars for manual verification. The first digit is printed to the left of the bars but not encoded within them. At its core, the EAN-13 anatomy comprises a left guard pattern at the start, followed by the left data area encoding the second through seventh digits using a of odd (L) and even (G) parity patterns based on the first digit, a center guard pattern separating the data sections, the right data area encoding the eighth through thirteenth digits (including the ) using even parity patterns (R-codes), and a right guard pattern at the end. The guard patterns are fixed sequences of narrow bars and spaces—specifically, three narrow elements for the left and right guards (binary 101) and five for the center guard (binary 01010)—that signal the scanner's starting point, , and stopping point, while also indicating scan direction to support omnidirectional reading from any angle across the symbol. This design, defined in the General Specifications and ISO/IEC 15420, allows for efficient processing in high-volume retail scanning without requiring precise alignment. To maintain scannability, the symbol must adhere to precise dimensional standards. The nominal X-dimension, representing the width of the narrowest bar or space (one module), is 0.33 mm, providing a baseline for magnification ratios between 80% and 200% in point-of-sale applications. The nominal bar height for EAN-13 is 25.93 mm at 100% , measured from the base to the top of the bars (excluding extensions on guard patterns), with minimum heights scaling by magnification (e.g., 20.74 mm at 80%), ensuring sufficient contrast and resolution for or scanners. Quiet zones, blank areas devoid of any printing or markings, flank the and must extend a minimum of 11X on the left (approximately 3.63 mm) and 7X on the right (approximately 2.31 mm) at nominal size to isolate the from surrounding text or graphics, preventing misreads. These specifications, as outlined in the General Specifications, guarantee compatibility across global supply chains and scanning technologies.

Digit Encoding Patterns

In the EAN-13 barcode symbology, each of the 12 data digits (excluding the , which is encoded separately) is represented by a unique 7-module binary pattern consisting of bars and s, where each module is a unit of width defined by the X-dimension. The left-hand side digits use either odd-parity encodings (L-codes, starting with a and containing an odd number of bars) or even-parity encodings (G-codes, starting with a and containing an even number of bars), while all right-hand side digits use even-parity encodings (R-codes, starting with a bar and ending with a , with an even number of bars). These patterns ensure reliable scanning by distinguishing the symbol's orientation and position. The encoding is defined in ISO/IEC 15420, as incorporated in the General Specifications. The complete set of encoding patterns comprises 20 distinct codes: 10 L-codes, 10 G-codes, and 10 R-codes. The following table lists the binary representations (where 0 denotes space and 1 denotes bar) for digits 0 through 9 in each encoding type:
DigitL-codeG-codeR-code
0000110101001111110010
1001100101100111100110
2001001100110111101100
3011110101000011000010
4010001100111011011100
5011000101110011001110
6010111100001011010000
7011101100100011000100
8011011100010011001000
9000101100101111110100
These patterns are standardized to minimize errors in optical scanning, with L and R providing complementary parities for directional decoding. For the left-hand side, the first (leftmost) digit is always encoded using an , and its value determines the parity (A through E) applied to the subsequent five left digits, enabling the scanner to identify the starting point without an explicit binary flag. The patterns are assigned as follows: A (all L) for first digit 0 or 1; B (LGLGLG) for 2 or 3; C (LGLGGL) for 4; D (LGGGLG) for 5; and E (GLGLGL) for 6–9. The six right-hand digits are always encoded using R-codes, ensuring consistent even-parity representation on that side. This pairing scheme allows omnidirectional scanning while maintaining compact encoding. Optional add-on symbols, such as 2-digit or 5-digit extensions, can be appended to the main EAN-13 symbol to encode supplemental data like prices or issue numbers; these use simplified L- and patterns without R-codes, starting with a specific guard pattern.

Encoding and Decoding Example

To illustrate the encoding process for an EAN-13 barcode, consider the number 5901234123457. The first digit, 5, is encoded outside the barcode symbol to the left and determines the parity pattern for the subsequent six digits on the left side, which follows the OEEEOE configuration (odd parity for the first, fifth positions; even parity for the second, third, fourth, and sixth) corresponding to pattern D (LGGGLG). The left-side digits are thus encoded as follows using standard EAN patterns: 9 (odd: 0001011), 0 (even: 0100111), 1 (even: 0110011), 2 (even: 0011011), 3 (odd: 0111101), and 4 (even: 0011101). The right-side digits use fixed right-parity encodings: 1 (1100110), 2 (1101100), 3 (1000010), 4 (1011100), 5 (1001110), and 7 (1000100). The complete binary representation begins with the left guard pattern (101), followed by the 42-module left data (00010110100111011001100110110101111010011101), the center guard (01010), the 42-module right data (11001101101100100001010111001001111000100), and ends with the right guard (101). This yields the full 95-module binary string: 10100010110100111011001100110110101111010011101010011100110110010000101011100100111000100101. In a rendered barcode, this translates to a series of alternating bars and spaces, where 1 represents a bar and 0 a white space, starting and ending with quiet zones for scanner alignment; the left guard appears as a narrow bar-space-bar, the center as bar-space-bar-space-bar to separate sides, and the overall height typically includes human-readable digits below for verification. Decoding an EAN-13 involves scanning the bars to identify the 95 modules, starting from the left guard pattern (101) to orient the reader. The modules between the left and center guards (01010) are grouped into six 7-module sets, each matched against left odd or even patterns to determine the digits and their parities; the parity sequence (e.g., OEEEOE) then infers the first digit (5 in this case). The modules after the center guard are similarly grouped and matched to right patterns for the final six digits. The full 13-digit number is reconstructed, and the is verified using the standard weighted sum method to ensure integrity. Interpretation relies on tools like barcode scanners or software libraries (e.g., OpenCV-based decoders) that measure bar widths relative to a module unit, often assuming X-dimension (module width) around 0.33 for standard prints; the center guard distinctly separates left and right sides to prevent reversal errors. Common decoding errors include misreads from poor print quality, such as smudged bars causing parity mismatches or skewed scans inverting odd/even interpretations, which can be mitigated by multiple scan attempts or error correction in the software. For EAN-8 variants, the process is analogous but abbreviated, encoding only eight digits in 67 modules with fixed odd parity on the left and right parity on the right, omitting variable first-digit patterns for simplicity.

References

Add your contribution
Related Hubs
User Avatar
No comments yet.