
How an EAN-13 barcode is built
The best-known barcode in retail is the EAN-13 with thirteen digits. The bars of different widths stand for these digits, and the number is also printed in plain figures underneath. In the worldwide system, the number itself is called a GTIN (Global Trade Item Number). It is not made up freely but assigned through the responsible organisation of the GS1 system, so that no two products in the world carry the same number.
| Digits | Part | Meaning |
|---|---|---|
| 1–3 | Prefix (760) | Shows the national organisation that issued the number, 760 to 769 for Switzerland. It does not say where the product was made. |
| 4–7 or more | Company number | Identifies the company that received the number. Its length depends on the size of the number block. |
| up to 12 | Item number | Assigned by the company itself for each of its own products and each variant. |
| 13 | Check digit | Calculated from the first twelve digits and reveals reading errors. |
Every variant needs its own number. A T-shirt in three sizes and two colours therefore has six different barcodes. Only then does the till know which item was sold, and only then is the stock level correct for each variant.
How the check digit is calculated
The check digit stops a damaged or mistyped code from passing as a different item. The calculation is simple and can be followed by hand.
- Weight
Multiply the first twelve digits from the left alternately by 1 and 3: the first by 1, the second by 3, the third by 1 and so on.
- Add up
Add all the products. For 760123456789 that gives 7 + 18 + 0 + 3 + 2 + 9 + 4 + 15 + 6 + 21 + 8 + 27 = 120.
- Round up to the next ten
The difference to the next full ten is the check digit. 120 is already a multiple of ten, so the check digit is 0.
- Append
The complete number is 7601234567890. A scanner recalculates it on every read and rejects the code if the check digit does not match.
Barcode or QR code?
A classic barcode is one-dimensional: it is read in one direction and holds only a few characters. A QR code is two-dimensional and stores many times more data in a square, such as a web address or, on the QR-bill (QR-Rechnung), all the payment details including the QR-IBAN and the amount.
| Barcode (EAN-13) | QR code | |
|---|---|---|
| Shape | Bars in a row | Square of dots |
| Amount of data | 13 digits | Up to several thousand characters |
| Typical use | Items at the till and in stock | Payments, web addresses, contact details |
| Read with | Laser scanner, camera | Camera |
Other types of barcode
Besides the EAN-13 there are many other barcodes, used depending on the purpose. For small packaging there is a short form with eight digits. Logistics and industry use codes that can also hold letters, batch numbers or expiry dates.
| Code | Content | Typical use |
|---|---|---|
| EAN-13 / GTIN-13 | 13 digits | Items in retail |
| EAN-8 / GTIN-8 | 8 digits | Very small packaging |
| UPC-A | 12 digits | Items from North America |
| Code 128 | Digits, letters, symbols | Shipping labels, stock, internal numbers |
| GS1-128 | Number plus extra data such as batch or date | Pallets and logistics |
| DataMatrix | Many characters in a small area (2D) | Medicines, components |
For internal purposes such as storage locations or tools, Code 128 is a good choice because it also handles letters and can be read by practically any scanner. What matters is that internal codes do not overlap with official article numbers. If you print labels yourself, test them with your own scanner before the large print run and make sure there is enough contrast and a quiet zone to the left and right of the bars.
Using barcodes in your business
If you supply products to retailers, you need an official GTIN for every item, because the retailers’ till systems work with it. For your own use, for example for storage locations, tools or spare parts in the van, internal numbers that apply only within your business are enough. They must not, however, find their way into retail.
- Goods receipt: Scan the delivery instead of typing up delivery notes, and the stock is booked in correctly.
- Stocktaking: Count the shelves with the scanner, and discrepancies show up immediately.
- Sales and quotes: Find items by their code instead of typing long descriptions, and take the right price from the price list.
- Trades: Record material that goes onto a work report (Rapport) without any ambiguity.
For scanning, a smartphone camera or an inexpensive USB scanner that behaves like a keyboard is often enough today: it types the number into whichever field the cursor is in.
A practical example
Example: a bicycle shop in Biel sets up its stock
The fictitious bicycle shop Muster Velo GmbH in Biel stocks around 900 items, from inner tubes to e-bikes. Most of them already carry a manufacturer’s barcode. The owner records these numbers for each article variant in the programme, for example tyres separately by size.
For service packages she puts together herself and sells only in the shop, she assigns internal numbers and prints her own labels. At the counter she scans the code with a USB scanner straight into the search field and has the right item in front of her, with price and stock level.
Invented example for illustration.
How VoxCRM helps
yesIn VoxCRM, every article variant has its own fields for the article number (SKU) and the barcode. In the product search, typing or scanning a barcode finds the matching variant, and a USB scanner types the number straight into the search field. There is no separate scanning function using the phone camera, and barcodes are not assigned. More under Products and stock.
