If you plan to sell physical items in global retail markets, you will need to print EAN-13 barcodes. EAN stands for European Article Number (now officially known as the International Article Number).
In this article, we explain the structure of EAN-13 codes, how to calculate the vital 13th check digit, and how to create the barcode graphics.
The Anatomy of an EAN-13 Barcode
An EAN-13 code is not just a random string of 13 numbers. Every digit block has a strict meaning:
Prefix (3 digits) + Manufacturer Code (4-5 digits) + Product ID (4-5 digits) + Checksum (1 digit)
- GS1 Country Prefix (First 3 digits): Indicates the GS1 member organization where the company registered (e.g.,
500-509for the United Kingdom,690-699for China,300-379for France). - Company/Manufacturer Code: Issued to your business by GS1.
- Item Reference Number: Allocated by you to identify the specific product variation (size, color, weight).
- Checksum (Last digit): A mathematically calculated digit to verify the scan code is error-free.
How to Calculate the EAN-13 Checksum
The final 13th digit is calculated using a Modulo-10 weighted formula:
Step-by-Step Example (using 400638133393 as the 12 input digits):
- Sum the Odd-Positioned Digits:
- Positions 1, 3, 5, 7, 9, 11
- $4 + 0 + 3 + 1 + 3 + 9 = 20$
- Sum the Even-Positioned Digits and Multiply by 3:
- Positions 2, 4, 6, 8, 10, 12
- $0 + 6 + 8 + 3 + 3 + 3 = 23$
- $23 \times 3 = 69$
- Add the Two Results:
- $20 + 69 = 89$
- Calculate Checksum:
- Find the next multiple of 10 equal to or greater than 89, which is 90.
- Subtract the sum from this multiple: $90 - 89 = 1$.
- The checksum digit is 1. The complete EAN-13 code is 4006381333931.
How to Generate EAN-13 Graphics
Instead of performing math calculations by hand, you can use our smart EAN-13 Barcode Generator:
- Type your 12 digits into the input field.
- Our tool automatically computes the correct 13th checksum digit and generates your high-resolution barcode preview.
- If you type 13 digits, we verify your last digit. If it is mathematically incorrect, we warn you and auto-correct it.
- Download the final graphic as PNG or SVG vectors.
Frequently Asked Questions (FAQ)
What happens if I use an incorrect checksum in my barcode?
Scanning cash registers will beep with a “Format Error” or fail to scan entirely. Every retail store’s scanning database validates the checksum. Our generator helps protect you by auto-correcting any invalid user-provided checksums.
Are EAN-13 codes and barcodes identical?
The EAN-13 “code” is the literal sequence of 13 numeric digits. The “barcode” is the physical, printed black and white parallel stripes that can be optically decoded by a scanning gun.
Can EAN-13 codes have alphabetic letters?
No. The EAN-13 barcode standard strictly encodes digits from 0 to 9 only. If you need alphanumeric support, you should choose the Code 128 Barcode Generator.