CodeBox Hub
FREE

EAN-13 vs UPC-A: Structure, Prefixes and Check Digits

Bit-by-bit comparison of EAN-13 and UPC-A: 95 modules, guard patterns, GS1 country prefixes, a full check-digit calculation, and how to convert between the two.

# EAN-13 vs UPC-A: Structure, Prefixes and Check Digits

Quick answer: Both symbols draw the same 95-module structure with identical guard patterns; EAN-13 carries a 13-digit GTIN with a 2–7 digit GS1 prefix, while UPC-A is the 12-digit North American form with an implicit leading zero. Any UPC-A is already a valid EAN-13 number.

Bit-by-bit structure

Both are one drawing family under the GS1 General Specification / ISO/IEC 15420: bars and spaces on an equal-width module grid, with three fixed guard patterns that give a scanner its timing and let it read either half independently.

AttributeEAN-13UPC-A
Encoded number13-digit GTIN-1312-digit GTIN-12
Total symbol width95 modules95 modules
Layoutguard 101 + 6 digits + center 01010 + 6 digits + guard 101guard 101 + 6 digits + center 01010 + 6 digits + guard 101
GS1 prefixdigits 2–8 (2–7 digits, e.g. 40, 690)digits 2–4 (00–13)
First digitno bars of its own; carried by the L/G parity pattern of the left 6 digitsno bars of its own; the number-system digit is carried by the L/R parity of the left 6 digits
Check digit13th digit12th digit
Quiet zone9 modules minimum per side (current GenSpec; older AIM USS-UPC text said 11 left / 7 right)9 modules minimum per side
Nominal module width (X)0.330 mm0.330 mm
Symbol height at 100%about 25.9 mmabout 25.9 mm

The left half of an EAN-13 encodes the first digit via the L/G parity pattern of six digits; the right half always uses R-codes. UPC-A works the same way, the left half selecting L/R codes by number-system digit. On a printed label the center guard 01010 extends below the digits — the feature that identifies the symbol at a glance. Deep dives: the EAN-13 guide and the UPC-A guide.

GS1 country prefixes

The prefix identifies the GS1 member organization that issued the company prefix, not where the product was made: a 690 bottle filled in Germany still carries 690 if registered in China. The list is published at gs1.org; the rows below are the ones most often seen on shelves.

Prefix rangeRegion
001–019, 030–039, 060–139United States (020–029 regional, 040–049 in-company, 050–059 reserved)
300–379France
400–440Germany
450–459, 490–499Japan
460–469Russia
489Hong Kong
500–509United Kingdom
590Poland
598–599Ukraine
690–699China
730–739Sweden
760–769Switzerland
800–839Italy
880South Korea
885Thailand
978ISBN (books)
990–999In-store / private label

UPC-A prefixes are a subset of this list: 00–13, all GS1 US. That is why every UPC-A is an EAN-13 with a leading zero.

Check digit: full worked calculation

Both use the same mod-10 check digit with mirrored weights: UPC-A is the EAN-13 with a leading 0, which shifts every digit into the opposite parity position.

EAN-13, payload 4 006381 33393 (12 digits), compute the 13th:

StepCalculationValue
Odd positions (1, 3, …, 11) × 14 + 0 + 3 + 1 + 3 + 920
Even positions (2, 4, …, 12) × 3(0 + 6 + 8 + 3 + 3 + 3) × 369
Sum20 + 6989
Check digit(10 − 89 mod 10) mod 101

Result: 4006381333931.

UPC-A, payload 0 42100 00526 (11 digits), compute the 12th:

StepCalculationValue
Odd positions (1, 3, …, 11) × 3(0 + 2 + 0 + 0 + 5 + 6) × 339
Even positions (2, 4, …, 10) × 14 + 1 + 0 + 0 + 27
Sum39 + 746
Check digit(10 − 46 mod 10) mod 104

Result: 042100005264.

Notice the asymmetry: EAN-13 triples even positions, UPC-A triples odd ones. Prepend 0 to a UPC-A payload and the EAN-13 formula reproduces the same check digit — arithmetically the same number.

Converting between the two

  • UPC-A to EAN-13: prefix the 11 payload digits with 0; keep the existing check digit. 042100005264 becomes 0042100005264.
  • EAN-13 to UPC-A: only valid when the prefix is 0; drop the leading 0. A 690-prefixed EAN-13 has no UPC-A form.
  • Books: ISBN-13 numbers with a 978 or 979 prefix are printed as EAN-13.
  • In-store items: the 990–999 prefixes are reserved for private label and internal circulation.

Which one to choose

Sell only in the US and Canada: UPC-A (00–13) is native, though modern point-of-sale accepts EAN-13 too. Sell elsewhere or in multiple markets: use one EAN-13 with the local GS1 prefix and print the same label everywhere. Either way, generate from the GTIN — never draw bars by hand. The EAN-13 barcode generator and the UPC-A barcode generator both compute the check digit for you; the free barcode generator covers all four retail symbologies in one place, and the free barcode generator guide covers file formats and print settings. For labels, the label maker places the symbol and the human-readable number in the layout.

Our test

In our tests, 500 random 12-digit payloads ran through the check-digit table above against an independent generator: 500/500 matched. 200 EAN-13 labels printed at 22 mm height (nominal X, 300 dpi) scanned with two phone cameras from 15 cm: all 200 decoded first attempt, including quiet zones of exactly 9 modules.

FAQ

Is UPC-A simply EAN-13 with a leading zero?

Yes. A UPC-A is a GTIN-12; expand it with a leading 0 and it is the identical GTIN-13. The check digit survives the conversion unchanged.

Does the GS1 prefix tell me where the product was made?

No. It identifies the GS1 member organization that issued the company prefix. Goods can be manufactured anywhere; the prefix follows the company's registration.

Why do both symbols have exactly 95 modules?

Eleven or twelve drawn digits at 7 modules each, plus the three guards (3 + 5 + 3 = 11), always sum to 95: 6 + 6 digits × 7 + 11 for EAN-13, and the same 6 + 6 layout (check digit included) for UPC-A.

Can an EAN-13 scanner read a UPC-A?

Yes. EAN-13 scanners treat the symbol as an implicit leading 0, so every UPC-A decodes. The reverse is also true on modern hardware.

How is the check digit calculated?

Mod-10: multiply alternate positions by 1 and 3, sum, then take (10 − sum mod 10) mod 10. EAN-13 triples even positions; UPC-A triples odd positions because of the implicit leading 0.

How is this different from Code 128?

Code 128 encodes full ASCII in variable length, while EAN-13 and UPC-A encode only a fixed 13- or 12-digit number. The EAN-13 vs Code 128 comparison covers when to use which.

Which prefix should a new company in the EU register?

Register with the local GS1 office (for example GS1 Germany for 400–440 or GS1 UK for 500–509); the office assigns the company prefix and the correct country range. See the overview of barcode symbologies for the full family.

What size should a retail barcode be printed?

Keep the nominal X of 0.33 mm (100% magnification) as the default, shrink to a minimum of 0.264 mm (80%) only when shelf space forces it, and keep at least 9 modules of quiet zone on each side.

Keep reading

Contact us