How do you set up barcodes: GTIN-13, the check digit, PLU and weight-embedded barcodes
Who it is forGrocery chain product master data teams, category and pricing, store operations, stock control, till and scale owners
In most chains the barcode setup is master data work done once and forgotten. Yet part of the count variance and till price errors comes straight from it: the same barcode sitting on two item cards, an old card's barcode attached to a product whose pack weight has changed, a PLU record on the scale drifting away from the item in the ERP, or a price-embedded label left on the shelf after a price rise. This guide covers the structure of the GTIN-13 barcode and the check digit calculation, the GS1 and GS1 Türkiye rules for in-store and variable-weight barcodes starting with 2, the role of the PLU record on the scale, how a wrong setup shows up in the stock record and at the till, and a setup checklist.
What does a GTIN-13 (EAN-13) barcode carry?
The number behind the 13-digit barcode scanned at the shelf is the GTIN-13 (Global Trade Item Number); EAN-13 is the name of the barcode symbol that carries it. Under the GS1 General Specifications, a consumer item scanned at the retail point of sale is identified with a GTIN-13, GTIN-12 or GTIN-8. The number has three parts: GS1 company prefix, item reference and check digit.
GS1 Türkiye issues company prefixes of between 7 and 12 digits depending on how many products a company will number: a 7-digit prefix for a company that will number up to 100,000 products, a 12-digit prefix for a company with a single product. GS1 Türkiye asks for item references to be issued without grouping or classification, in sequence, one higher for each new product; no category or supplier information is built into the number.
Company prefixes in Türkiye start with 868 or 869. According to GS1 Türkiye, the prefix does not indicate the product's origin: the number may be assigned by the manufacturer, the distributor or the importer. The practical consequence for a chain is that the GTIN of its own-label packaged product is issued from the chain's or the manufacturer's GS1 company prefix. An internal number starting with 2 is unique only inside the chain and may clash with another product in data shared with a supplier or another system.
When a GTIN changes is also part of the setup. Under the GS1 General Specifications, a change to one of the basic product declarations, such as net content, will usually lead to a new GTIN; GS1's GTIN management rules state that any increase or decrease in the net content declared on the pack requires a new GTIN. A product whose pack drops from 500 grams to 450 grams is opened on a new item card; adding the new barcode to the old card distorts the price per kilogram and the stock value.
| Company prefix | Item reference digits | Products that can be numbered | Structure |
|---|---|---|---|
| 7 digits | 5 | Up to 100,000 | Prefix (7) + item ref (5) + check (1) |
| 8 digits | 4 | Up to 10,000 | Prefix (8) + item ref (4) + check (1) |
| 9 digits | 3 | Up to 1,000 | Prefix (9) + item ref (3) + check (1) |
| 10 digits | 2 | Up to 100 | Prefix (10) + item ref (2) + check (1) |
| 11 digits | 1 | Up to 10 | Prefix (11) + item ref (1) + check (1) |
| 12 digits | — | 1 | Prefix (12) + check (1) |
How is a barcode check digit calculated?
The check digit is the 13th digit of a GTIN-13 and is calculated from the first 12. GS1 Türkiye describes the calculation as the Modulo-10 method; the algorithm in the GS1 General Specifications is the same for all fixed-length GS1 numbers. Barcode scanners and barcode printers do the calculation themselves; for a number keyed in by hand, the till or the ERP has to repeat it.
The calculation has three steps: starting from the left, the first 12 digits are multiplied alternately by 1 and 3, the results are summed, and the sum is subtracted from the nearest multiple of 10 equal to or above it. The difference is the check digit.
This design catches every single-digit keying error, because a change in a digit alters the last digit of the sum whether that digit is multiplied by 1 or by 3. A swap of two adjacent digits is also caught; the only exception is when the two digits differ by 5 (for example 1 and 6), because the sum then changes by exactly 10.
- Weighted sum
N1×1 + N2×3 + N3×1 + N4×3 + … + N11×1 + N12×3- Check digit
(10 − (Weighted sum mod 10)) mod 10Gives the same result as subtracting the sum from the next multiple of 10; if the sum is already a multiple of 10, the check digit is 0.
Barcodes starting with 2: in-store and variable-weight numbers
The GS1 General Specifications set aside numbers starting with 2 as restricted circulation numbers (RCNs). Prefixes 02 and 20-29 are for use within a geographic region as defined by each country's GS1 member organisation; prefix 04 is for use within a company. A restricted circulation number is unique only within the environment where it is defined: a number that identifies one product inside the chain may identify another product in another chain. These numbers are printed only in EAN-8, EAN-13, UPC-A and UPC-E barcodes.
There are two structures for weighed products. The first is GS1 Türkiye's national variable-weight number: prefix 28, a 5-digit item number issued by GS1 Türkiye, a 5-digit weight in grams and a check digit. Products weighed and packed by the manufacturer or distributor arrive with this structure, and the item number is unique within Türkiye. According to GS1 Türkiye, prefix 28 is reserved and may not be used in any in-store or in-warehouse application.
The second is the label printed on the chain's own scale. Here the item number is the chain's own code and either the weight or the price is embedded in the label. The till reads the prefix and decodes the following digits according to the structure defined for that prefix; the prefix and field structure are therefore chosen in consultation with GS1 Türkiye, do not clash with 28 and are written down in a single document across the chain. A single scale working to a different structure can make every label it prints ring up as the wrong product or the wrong quantity at the till.
The price-embedded structure also has a limit at today's price levels. In the structures recommended by the GS1 General Specifications the price field is 4 or 5 digits. A 5-digit field written in kuruş tops out at ₺999.99; a 2-kilogram pack of a cheese costing ₺580 per kilogram does not fit. In the weight-embedded structure the 5-digit gram field goes up to 99.999 kilograms and is enough whatever the price.
GS1's direction is changing too. According to the 2026 release of the General Specifications, GS1 supports an ambition for 2D barcodes to be read at retail points of sale around the world by the end of 2027; because restricted circulation numbers cannot be encoded with application identifiers, they are not permitted in 2D barcodes, and the specification strongly recommends GTIN for both fixed and variable measure fresh food. When scales and tills are replaced, 2D barcode reading should be a requirement from today.
| Structure | Prefix | Fields | Issued by | Note |
|---|---|---|---|---|
| National variable-weight number | 28 | 5-digit item number + 5-digit grams + check digit | GS1 Türkiye | Unique within Türkiye; not for in-store use |
| Scale label, weight embedded | A 2x prefix defined by the chain (not 28) | Item code + weight + check digit | The chain | The till calculates the amount from the current price per kilogram |
| Scale label, price embedded | A 2x prefix defined by the chain (not 28) | Item code + price check digit if used + 4-5 digit price + check digit | The chain | Five digits in kuruş reach ₺999.99 at most |
| Company-internal short code (RCN-8) | 0 or 2 | 6-digit item code + check digit | The chain | Unique only inside the company |
| GTIN + additional data | GS1 company prefix | GTIN + additional data such as weight, amount and date (GS1 DataBar Expanded, 2D) | Manufacturer or chain | The direction GS1 recommends for fresh food |
What does the PLU on a scale do, and which tables must it match?
A PLU (price look-up) is a product record from which the price is looked up in a table. On a store scale the PLU record holds the product's name, price per kilogram, tare, the barcode structure on the label and the item code. The department assistant or the shopper selects the PLU number or a shortcut key on the scale, the scale weighs and prints the label.
The same abbreviation is also used for the small stickers on fruit and vegetables. In this system, run by IFPS (International Federation for Produce Standards), 4-digit codes sit in the 3000-4999 range and indicate conventionally grown produce; for organic produce a 9 is placed in front of the code, giving the 93000-94999 range. Use of IFPS codes is voluntary and they are not the same thing as the chain's scale PLU number; to keep them apart, the scale PLU is tied to the chain's own item code.
Whether a label printed on the scale lands on the right product at the till depends on three tables pointing to the same product: the ERP item card, the scale PLU table and the till item table. If a product newly opened or recoded in the ERP does not reach the scale and the till on the same day, the scale prints labels with the old code and the till reads that code as another product or not at all. Tare also sits in the PLU record; if tare is missing, the shopper pays for the weight of the packaging at the product's price and the stock is reduced by more product than actually left.
- ERP item card: item code, unit (kilogram or each), barcode list, cost
- Scale PLU table: PLU number, item code, price per kilogram, tare, barcode structure, label text
- Till item table: barcode or prefix structure, item code, selling price, unit
- Item code and unit are the same in all three tables; a price change reaches all three at the same time
The price marking rule on tare for loose products and the label-to-till reconciliation are covered in the shelf price versus till price guide.
How does a wrong barcode setup produce count variances?
A barcode error shows up at the count in two ways. If sales land on the wrong product, two products show opposite variances: the product actually sold is on record but not on the shelf; the product the sale was recorded against is on the shelf but not on record. If sales land on the right product but with the wrong quantity, a single product shows a recurring variance in one direction that is usually mistaken for shrinkage.
The hardest error to spot in weighed goods comes from price-embedded labels. If the till software works out the quantity sold by dividing the amount on the label by the current price per kilogram, every pack with an old label still on the shelf on the day the price changes reduces stock by an amount different from its real weight. The difference per pack is small, but it reappears with every price change.
| Error | What happens at the till | How it shows at the count | Prevention |
|---|---|---|---|
| Same barcode on two item cards | The till sells against the first card it finds | Negative variance on one card, positive on the other | One barcode per card; duplicate check in master data |
| Old card's barcode added to a product whose pack weight changed | The new product sells at the old card's price and cost | Units match but a value variance appears; unit cost is distorted | If net content changed, a new GTIN and a new item card |
| Item card in units, scale label in kilograms | A 0.420 kg sale is posted as 1 unit or as 420 units | A variance growing in one direction that looks like shrinkage | Same unit in all three tables; bought by the kilogram, sold by the kilogram |
| Scale PLU tied to an old item code | The sale is recorded against another weighed product | Opposite variances on two weighed products | An item code change reaches the scale the same day |
| Open department key used at the till for an unreadable barcode | The sale goes to a generic card, not the item card | Negative variance on the real product | The department key is limited with a reason code and reported |
| Tare missing from the PLU record | The weight of the packaging is sold as product | Positive variance (more taken off stock than left) | Tare is a mandatory field in the PLU record |
| Price-embedded label left on shelf after a price rise | If quantity is derived from price, too little is taken off stock | Negative variance | Relabelling when the price changes |
How does a barcode setup produce till price errors?
According to the Ministry of Trade's guidance on price labels, if the label price and the till price differ, the price in the consumer's favour applies. The barcode setup is the source of this difference in three ways. The first is the same barcode on two item cards with different prices: the till applies the price of the first card it finds, not of the product the shelf label belongs to. The second is the pack label on weighed goods: when the price changes, the amount on the pack and the amount the till calculates diverge. The third is the price table being updated at different times on the scale and the till: the scale prints labels at the old price while the till sells at the new one.
What these errors have in common is the day of the price change. The daily check of shelf label against till price is covered in the shelf price guide; for weighed goods two steps are added: a record of the time at which changed PLUs reached the scale, and the relabelling of prepacked weighed goods still on the shelf.
- A price change reaches the ERP, the scale and the till at the same time; any change that has not reached the scale is listed
- Prepacked goods for PLUs whose price changed are taken off the shelf and put back with a new label
- A pack that could exceed ₺999.99 in the price-embedded structure is moved to the weight-embedded structure
- Check digit validation is not switched off for manual entry of an unreadable barcode
Barcode setup checklist
The checklist starts in master data and ends on the shop floor. Each step is set up once and then checked again at every price change, every new product listing and every scale replacement.
In Mindpera the count is done with the Mind Stock mobile terminal: with no connection the terminal queues scans on the device, sends them in order when the connection returns, and never processes the same barcode scan twice. The count variance opens by product, location, count team and date; value and unit variances are reported separately, so opposite-variance pairs caused by barcode mix-ups can be searched for in the product-level list. The shelf label against till price check is completed on the shop floor with Mind Ops checklists, and each item opened lands with its owner.
- Tie each barcode to a single item cardThe same GTIN cannot be opened on a second card. Existing duplicates are listed and reduced to one card; case and multipack barcodes are defined as separate cards or with a multiplier.
- Open a new card when net content changesA product whose weight or volume changes arrives with a new GTIN and a new item card. The old card is made inactive once its stock runs out; the new barcode is not added to the old card.
- Write down the prefix and field structureWhich 2x prefix carries embedded weight and which embedded price, the field lengths and the decimal position sit in a single document. Prefix 28 is reserved for GS1 Türkiye's national number.
- Match the three tablesItem code, unit and price are the same on the ERP item card, the scale PLU table and the till item table. A new product or code change reaches all three on the same day.
- Put tare in the PLU recordEvery PLU weighed with packaging has its tare defined; a PLU with an empty tare field does not print labels.
- Keep check digit validation onThe till and the handheld calculate the check digit on a manually keyed number and reject a number that does not match.
- Make barcode scanning mandatory at the countThe count is done by scanning; an unidentified barcode does not stop the count, it goes onto a separate list and on to the master data team.
If the item card, scale and till tables sit in different systems, our team carries out the setup; stock, movement and count data are connected into a single data model.
Frequently asked questions
- How do you calculate a barcode check digit?
- Starting from the left, the first 12 digits are multiplied alternately by 1 and 3 and summed; the sum is subtracted from the nearest multiple of 10 equal to or above it. For GS1 Türkiye's sample number 869123400001 the weighted sum is 56; the next multiple of 10 is 60, so the check digit is 4 and the full number is 8691234000014.
- Does a barcode starting with 869 mean the product was made in Türkiye?
- No. According to GS1 Türkiye, 868 and 869 are the start of the company prefixes issued to companies in Türkiye and do not indicate origin. The number may be assigned by the manufacturer, the distributor or the importer; an imported product may start with 869, and a product made in Türkiye may be numbered with a prefix the manufacturer obtained abroad.
- Why does a weighed product's barcode start with 2?
- GS1 sets aside numbers starting with 2 as restricted circulation numbers; they are unique only within the country or company where they are defined. GS1 Türkiye's national variable-weight structure consists of prefix 28, a 5-digit item number, a 5-digit weight in grams and a check digit. A label printed on a store scale uses a structure defined by the chain, other than 28.
- What is a PLU number on a scale?
- A PLU (price look-up) is a product record from which the price is looked up in a table. On a scale the PLU record holds the product's name, price per kilogram, tare, barcode structure and the item code in the ERP. The IFPS codes on fruit and vegetable stickers (3000-4999, with a 9 in front for organic) are a separate, voluntary system; the scale PLU is tied to the chain's own item code.
- Should you use weight-embedded or price-embedded barcodes?
- For stock accuracy the weight-embedded structure is safer, because the till reads the quantity sold straight from the label. In the price-embedded structure, if the quantity is derived from the price, packs left on the shelf after a price rise take too little off stock; a 5-digit price field written in kuruş also tops out at ₺999.99. In both structures, prepacked weighed goods are relabelled when the price changes.
- Does a product whose pack weight changes need a new barcode?
- Yes. Under GS1's GTIN management rules, any increase or decrease in the net content declared on the pack requires a new GTIN. On the chain's side the right practice is to open a new item card; adding the new barcode to the old card distorts the price per kilogram, the unit cost and the stock value, and the old and new products get mixed up at the count.
Sources
- GS1, General Specifications Standard, Release 26.0 (sections 1.2.2.2.1, 1.2.3.1, 2.1.11, 2.1.12, 4.2.2.2 and 7.9.1) — 2026-01
- GS1 Türkiye, GTIN-13: assigning barcode numbers to products (Turkish; date accessed) — 2026-10-14
- GS1 Türkiye, check digit calculation (Turkish; date accessed) — 2026-10-14
- GS1 Türkiye, the 868 / 869 prefix (Turkish; date accessed) — 2026-10-14
- GS1 Türkiye, numbering variable-weight products (Turkish; date accessed) — 2026-10-14
- GS1 New Zealand, GTIN allocation rules fact sheet (summary of the GTIN Management Standard) — 2016-06-17
- IFPS, PLU Codes User's Guide for Produce Industry — 2023-01
- Ministry of Trade, guidance on price labels (Turkish) — 2026-06-22