How to calculate an EAN check digit
- Enter the first 12 digits of an EAN-13, or the first 7 of an EAN-8. The length tells the tool which one.
- Read the check digit and the full EAN, then copy it.
- Look at the working table to see each weight and product.
- Switch to Verify to check a printed EAN, or Bulk for a list.
EAN-13 check digit formula, step by step
Multiply the first 12 digits alternately by 1 and 3 (starting with 1 on the left), add the products, and subtract the total from the next multiple of 10. That difference is the 13th digit.
Worked example with 400638133393:
| Digit | 4 | 0 | 0 | 6 | 3 | 8 | 1 | 3 | 3 | 3 | 9 | 3 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Weight | 1 | 3 | 1 | 3 | 1 | 3 | 1 | 3 | 1 | 3 | 1 | 3 |
| Product | 4 | 0 | 0 | 18 | 3 | 24 | 1 | 9 | 3 | 9 | 9 | 9 |
The sum is 89. The next multiple of 10 is 90, so the check digit is 90 − 89 = 1 and the full EAN-13 is 4006381333931. Its 400 prefix was issued by GS1 Germany (see barcode country codes).
EAN-8 example
For the EAN-8 body 9638507, the weights run 3, 1, 3, 1, 3, 1, 3: 27 + 6 + 9 + 8 + 15 + 0 + 21 = 86. The next multiple of 10 is 90, so the check digit is 4 and the EAN-8 is 96385074. EAN-8 numbers are issued individually by GS1 for packs too small for an EAN-13; numbers starting 0 or 2 are for internal use only.
EAN-13 structure
| Part | Length | In 4006381333931 |
|---|---|---|
| GS1 prefix (issuing office) | 3 digits | 400 (GS1 Germany) |
| Rest of the company prefix | Varies | part of 638133393 |
| Item reference | Varies | part of 638133393 |
| Check digit | 1 digit | 1 |
When you have the full number, the EAN-13 generator makes the barcode and the EAN lookup searches public product databases for it.
Frequently asked questions
What is the EAN-13 check digit?
It is the 13th digit of an EAN-13 barcode. It is calculated from the first 12 digits with weights 1, 3, 1, 3 … from the left, so scanners can detect a misread digit.
How do I calculate an EAN-13 check digit?
Add the digits in odd positions (1st, 3rd … 11th). Add the digits in even positions (2nd … 12th) and multiply that by 3. Add the two totals and subtract from the next multiple of 10. For 400638133393 the total is 89, so the check digit is 1.
Is the EAN-8 check digit calculated the same way?
It uses the same mod 10 rule, but because the number is shorter the weights start with 3 on the left: 3, 1, 3, 1, 3, 1, 3 across the 7 digits. For 9638507 the sum is 86 and the check digit is 4.
Why does EAN-13 weight even positions by 3 when UPC weights odd ones?
Both count the 3s from the right. An EAN-13 has one more digit than a UPC-A, so counting from the left the 3s land on even positions. Put a 0 in front of a UPC-A and you get an EAN-13 with the same check digit.
Can the check digit be 0?
Yes. When the weighted sum is already a multiple of 10, the check digit is 0.
Is EAN the same as GTIN-13?
Yes. EAN-13 is the barcode, GTIN-13 is the number it carries. GS1 renamed the numbering but most people still say EAN.