EAN-13

EAN-13

Introduction

EAN is designed by the International Article Numbering Association (EAN) in Europe. It is an extension to UPC-A to include the country information. This means that any software or hardware capable of reading an EAN-13 symbol will automatically be able to read an UPC-A symbol. The only difference between UPC-A and EAN-13 is that the number system in UPC-A is a single digit from 0 through 9 whereas an EAN-13 number system consists of two digits ranging form 00 to 99. EAN-13 encodes 12 digits of numeric data along with a trailing check digit, for a total of 13 digits of barcode data. Each country has a numbering authority which assigns manufacturer codes to companies within its jurisdiction. The manufacturer code is still five digits long, as is the product code, and the check digit is calculated in exactly the same way.

Structure of an EAN barcode

An EAN-13 number consists of four areas:
¤ The Number System
¤ The Manufacturer Code
¤ The Product Code
¤ The Check Digit

Normally the number system digit is printed to the left of the barcode, and the check digit to the right. The manufacturer and product codes are printed just below the barcode, separated by the guard bar.

¤ Number System
The number system consists of two digits (sometimes three digits) which identify the country/region numbering authority which assigned the manufacturer code. Any number system which starts with the digit 0 is a UPC-A barcode. The number system list is maintained by EAN organization (www.ean-int.org). Also, the number system for every country/region are listed here.

¤ The Manufacturer Code
The manufacturer code is a unique code assigned to each manufacturer by the numbering authority indicated by the number system code. All products produced by a given company will use the same manufacturer code.

EAN uses what is 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--and many manufacturers don't 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 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.

¤ The Product Code
The product code is assigned by the manufacturer. The product code immediately follows manufacturer code. The total length of manufacturer code plus product code must be exact 10 digits.

¤ The Check Digit
The check digit is used to verify that the barcode is generated or scanned correctly. The check digit is calculated based on the rest of the barcode digits.

Since a scan can produce incorrect data due to inconsistent scanning speed, print imperfections, or a host of other problems, it is useful to verify that the rest of the data in the barcode has been correctly interpreted.

The nominal X dimension is 13 mils. The printable X dimension ranges from 10.4 to 24 mils.

The method of calculating the check digit:
1. From the right to left, start with odd position, assign the odd/even position to each digit.
2. Sum all digits in odd position and multiply the result by 3.
3. Sum all digits in even position.
5. Sum the results of step 3 and step 4.
6 .Divide the result of step 4 by 10. The check digit is the number which adds the remainder to 10.

How to calculate the checksum (Visual Basic function):
Function Append_EAN_Checksum (RawString as String)
Dim Position as Integer
Dim CheckSum as Integer CheckSum = 0
For Position = 2 to 12 step 2
Checksum = Checksum + Val(Mid$(RawString, Position, 1))
Next Position
CheckSum = CheckSum * 3
For Position = 1 to 11 Step 2
CheckSum = CheckSum + Val(Mid$(RawString, Position, 1))
Next Position
CheckSum = CheckSum Mod 10
CheckSum = 10 - CheckSum
If CheckSum = 10 Then
CheckSum = 0
End If
Append_Ean_Checksum = RawString & Format$(CheckSum, "0")
End Function

Encoding

A EAN-13 symbol can be divided into two halves, each consisting of six digits separated by a center guard bar pattern. The whole symbol is surrounded by two guard bar patterns. The same digit has different encoding depends whether it is in the left halve or in the right halve. The encoding pattern for digits in the left halve always starts with a space while the one for digits in the right halve always start with a bar and ends with a space. A EAN-13 symbol has the following structure:
1. Start guard bars, always with a pattern bar+space+bar.
2. Left halve, six digits encoded using the encoding schema A or B;
3. Center guard bars, with a pattern space+bar+space+bar+space.
4. Right halve, six digits encoded using the encoding schema C.
5. Stop guard bars, always with a pattern bar+space+bar.
              <h3><a name="codes"></a>Number System 
                Codes</h3>
                <table width="60%" border="0" cellpadding="0" class="maintext2">
                  <tr> 
                    <td width="19%"><p align="left"><strong>Code</strong></td>
                    <td width="81%"><p align="left"><strong>Country</strong></td>
                  </tr>
                  <tr> 
                    <td width="19%">00 - 09</td>
                    <td width="81%">United States of America</td>
                  </tr>
                  <tr> 
                    <td width="19%">10 - 19</td>
                    <td width="81%">Reserved for UCC (USA) joining EAN</td>
                  </tr>
                  <tr> 
                    <td width="19%">20 - 29</td>
                    <td width="81%">For local use by retailers or distributors</td>
                  </tr>
                  <tr> 
                    <td width="19%">30-37</td>
                    <td width="81%">France</td>
                  </tr>
                  <tr> 
                    <td width="19%">400 - 440</td>
                    <td width="81%">Germany</td>
                  </tr>
                  <tr> 
                    <td width="19%">45</td>
                    <td width="81%">Japan</td>
                  </tr>
                  <tr> 
                    <td width="19%">46</td>
                    <td width="81%">Russian Federation</td>
                  </tr>
                  <tr> 
                    <td width="19%">471</td>
                    <td width="81%">Taiwan</td>
                  </tr>
                  <tr> 
                    <td width="19%">474</td>
                    <td width="81%">Estonia</td>
                  </tr>
                  <tr> 
                    <td width="19%">475</td>
                    <td width="81%">Latvia</td>
                  </tr>
                  <tr> 
                    <td width="19%">477</td>
                    <td width="81%">Lithuania</td>
                  </tr>
                  <tr> 
                    <td width="19%">479</td>
                    <td width="81%">Sri Lanka</td>
                  </tr>
                  <tr> 
                    <td width="19%">480</td>
                    <td width="81%">Philippines</td>
                  </tr>
                  <tr> 
                    <td width="19%">481</td>
                    <td width="81%">Belarus</td>
                  </tr>
                  <tr> 
                    <td width="19%">482</td>
                    <td width="81%">Ukraine</td>
                  </tr>
                  <tr> 
                    <td width="19%">484</td>
                    <td width="81%">Moldova</td>
                  </tr>
                  <tr> 
                    <td width="19%">485</td>
                    <td width="81%">Armenia</td>
                  </tr>
                  <tr> 
                    <td width="19%">486</td>
                    <td width="81%">Georgia</td>
                  </tr>
                  <tr> 
                    <td width="19%">487</td>
                    <td width="81%">Kazakhstan</td>
                  </tr>
                  <tr> 
                    <td width="19%">489</td>
                    <td width="81%">Hong Kong</td>
                  </tr>
                  <tr> 
                    <td width="19%">49</td>
                    <td width="81%">Japan</td>
                  </tr>
                  <tr> 
                    <td width="19%">50</td>
                    <td width="81%">United Kingdom</td>
                  </tr>
                  <tr> 
                    <td width="19%">520</td>
                    <td width="81%">Greece</td>
                  </tr>
                  <tr> 
                    <td width="19%">528</td>
                    <td width="81%">Lebanon</td>
                  </tr>
                  <tr> 
                    <td width="19%">529</td>
                    <td width="81%">Cyprus</td>
                  </tr>
                  <tr> 
                    <td width="19%">531</td>
                    <td width="81%">Macedonia</td>
                  </tr>
                  <tr> 
                    <td width="19%">535</td>
                    <td width="81%">Malta</td>
                  </tr>
                  <tr> 
                    <td width="19%">539</td>
                    <td width="81%">Ireland</td>
                  </tr>
                  <tr> 
                    <td width="19%">54</td>
                    <td width="81%">Belgium and Luxembourg</td>
                  </tr>
                  <tr> 
                    <td width="19%">560</td>
                    <td width="81%">Portugal</td>
                  </tr>
                  <tr> 
                    <td width="19%">569</td>
                    <td width="81%">Iceland</td>
                  </tr>
                  <tr> 
                    <td width="19%">57</td>
                    <td width="81%">Denmark</td>
                  </tr>
                  <tr> 
                    <td width="19%">590</td>
                    <td width="81%">Poland</td>
                  </tr>
                  <tr> 
                    <td width="19%">594</td>
                    <td width="81%">Romania (also Romania use 642 for ARPC barcodes)</td>
                  </tr>
                  <tr> 
                    <td width="19%">599</td>
                    <td width="81%">Hungary</td>
                  </tr>
                  <tr> 
                    <td width="19%">600 - 601</td>
                    <td width="81%">South Africa</td>
                  </tr>
                  <tr> 
                    <td width="19%">609</td>
                    <td width="81%">Mauritius</td>
                  </tr>
                  <tr> 
                    <td width="19%">611</td>
                    <td width="81%">Morocco</td>
                  </tr>
                  <tr> 
                    <td width="19%">613</td>
                    <td width="81%">Algeria</td>
                  </tr>
                  <tr> 
                    <td width="19%">619</td>
                    <td width="81%">Tunisia</td>
                  </tr>
                  <tr> 
                    <td width="19%">622</td>
                    <td width="81%">Egypt</td>
                  </tr>
                  <tr> 
                    <td width="19%">625</td>
                    <td width="81%">Jordan</td>
                  </tr>
                  <tr> 
                    <td width="19%">626</td>
                    <td width="81%">Iran</td>
                  </tr>
                  <tr> 
                    <td width="19%">64</td>
                    <td width="81%">Finland</td>
                  </tr>
                  <tr> 
                    <td width="19%">690 - 692</td>
                    <td width="81%">China</td>
                  </tr>
                  <tr> 
                    <td width="19%">70</td>
                    <td width="81%">Norway</td>
                  </tr>
                  <tr> 
                    <td width="19%">729</td>
                    <td width="81%">Israel</td>
                  </tr>
                  <tr> 
                    <td width="19%">73</td>
                    <td width="81%">Sweden</td>
                  </tr>
                  <tr> 
                    <td width="19%">740 - 745</td>
                    <td width="81%">Guatemala, El Salvador, Honduras, Nicaragua, 
                      Costa Rica, Panama</td>
                  </tr>
                  <tr> 
                    <td width="19%">746</td>
                    <td width="81%">Republica Dominicana</td>
                  </tr>
                  <tr> 
                    <td width="19%">750</td>
                    <td width="81%">Mexico</td>
                  </tr>
                  <tr> 
                    <td width="19%">759</td>
                    <td width="81%">Venezuela</td>
                  </tr>
                  <tr> 
                    <td width="19%">76</td>
                    <td width="81%">Switzerland</td>
                  </tr>
                  <tr> 
                    <td width="19%">770</td>
                    <td width="81%">Colombia</td>
                  </tr>
                  <tr> 
                    <td width="19%">773</td>
                    <td width="81%">Uruguay</td>
                  </tr>
                  <tr> 
                    <td width="19%">775</td>
                    <td width="81%">Peru</td>
                  </tr>
                  <tr> 
                    <td width="19%">777</td>
                    <td width="81%">Bolivia</td>
                  </tr>
                  <tr> 
                    <td width="19%">779</td>
                    <td width="81%">Argentina</td>
                  </tr>
                  <tr> 
                    <td width="19%">780</td>
                    <td width="81%">Chile</td>
                  </tr>
                  <tr> 
                    <td width="19%">784</td>
                    <td width="81%">Paraguay</td>
                  </tr>
                  <tr> 
                    <td width="19%">785</td>
                    <td width="81%">Peru</td>
                  </tr>
                  <tr> 
                    <td width="19%">786</td>
                    <td width="81%">Ecuador</td>
                  </tr>
                  <tr> 
                    <td width="19%">789</td>
                    <td width="81%">Brazil</td>
                  </tr>
                  <tr> 
                    <td width="19%">80 - 83</td>
                    <td width="81%">Italy</td>
                  </tr>
                  <tr> 
                    <td width="19%">84</td>
                    <td width="81%">Spain</td>
                  </tr>
                  <tr> 
                    <td width="19%">850</td>
                    <td width="81%">Cuba</td>
                  </tr>
                  <tr> 
                    <td width="19%">858</td>
                    <td width="81%">Slovokia</td>
                  </tr>
                  <tr> 
                    <td width="19%">859</td>
                    <td width="81%">Czech</td>
                  </tr>
                  <tr> 
                    <td width="19%">860</td>
                    <td width="81%">Yugoslavia</td>
                  </tr>
                  <tr> 
                    <td width="19%">869</td>
                    <td width="81%">Turkey</td>
                  </tr>
                  <tr> 
                    <td width="19%">87</td>
                    <td width="81%">Netherlands</td>
                  </tr>
                  <tr> 
                    <td width="19%">880</td>
                    <td width="81%">South Korea</td>
                  </tr>
                  <tr> 
                    <td width="19%">885</td>
                    <td width="81%">Thailand</td>
                  </tr>
                  <tr> 
                    <td width="19%">888</td>
                    <td width="81%">Singapore</td>
                  </tr>
                  <tr> 
                    <td width="19%">890</td>
                    <td width="81%">India</td>
                  </tr>
                  <tr> 
                    <td width="19%">893</td>
                    <td width="81%">Vietnam</td>
                  </tr>
                  <tr> 
                    <td width="19%">899</td>
                    <td width="81%">Indonesia</td>
                  </tr>
                  <tr> 
                    <td width="19%">90 - 91</td>
                    <td width="81%">Austria</td>
                  </tr>
                  <tr> 
                    <td width="19%">93</td>
                    <td width="81%">Australia</td>
                  </tr>
                  <tr> 
                    <td width="19%">94</td>
                    <td width="81%">New Zealand</td>
                  </tr>
                  <tr> 
                    <td width="19%">955</td>
                    <td width="81%">Malaysia</td>
                  </tr>
                  <tr> 
                    <td width="19%">959</td>
                    <td width="81%">Papua New Guinea</td>
                  </tr>
                  <tr> 
                    <td width="19%">977</td>
                    <td width="81%">Periodicals (ISSN)</td>
                  </tr>
                  <tr> 
                    <td width="19%">978</td>
                    <td width="81%">Books (ISBN)</td>
                  </tr>
                  <tr> 
                    <td width="19%">979</td>
                    <td width="81%">Music (ISMN)</td>
                  </tr>
                  <tr> 
                    <td width="19%">980</td>
                    <td width="81%">Refund receipts</td>
                  </tr>
                  <tr> 
                    <td width="19%">99</td>
                    <td width="81%">Coupons</td>
                  </tr>
                </table>
                <h3>External Links</h3>
              <div class="maintext5"><a href="http://www.gs1.org" target="_blank">GS1 Global</a> <br>
                <a href="http://www.gs1.ro" target="_blank">GS1 Romania</a> <br>
                <br>
         </div>
            </td>
          </tr>
        </table> </td>
    </tr>
  </table></td>