GTIN-8 / EAN-8 Check Digit Calculator

Check or generate the check digit of an EAN-8 barcode.

Result

Check digit computed
4
96385074

How it is calculated

Only digits are read; spaces and dashes are stripped. The code must then have exactly 7 or 8 digits, otherwise there is no result. The first 7 digits are weighted alternately 3, 1, 3, 1, 3, 1, 3 from the left and added: sum = 3·d1 + d2 + 3·d3 + d4 + 3·d5 + d6 + 3·d7. The check digit is (10 − sum mod 10) mod 10, the amount that brings the sum up to the next multiple of 10. With 7 digits the tool returns the check digit and the full 8-digit code. With 8 digits it compares your last digit with the computed one and reports Valid or Invalid. A valid check digit only proves the number is well formed, not that the product is registered.

Worked example

Take the 7 digits 9638507. Multiply alternately by 3 and 1: 27, 6, 9, 8, 15, 0, 21. They add up to 86. Then 86 mod 10 = 6, and 10 − 6 = 4. The full barcode is 96385074. Entering 96385074 afterwards reports Valid, while changing the last digit to 5 reports Invalid.

Try this example →

Common mistakes

  • Applying the EAN-13 weighting (1 first, then 3). For EAN-8 the first digit is multiplied by 3.
  • Including the check digit in the sum when computing it. Only the first 7 digits are used.
  • Entering 12 or 13 digits of an EAN-13 or UPC-A code. Only 7 or 8 digits are accepted.
  • Assuming a valid check digit means the barcode is registered. It only shows that no digit was mistyped in a typical way.
  • Typing an 8-digit code with a missing or extra digit and reading the result as a failed check, when the count itself is wrong.

About this calculator

This calculator validates or completes a GTIN-8/EAN-8 barcode using its check digit algorithm: each of the first 7 digits is multiplied alternately by 3 and 1, the products are summed, and the check digit is whatever value makes that sum a multiple of 10. It's the short-format sibling of the more common 13-digit EAN, used on packaging too small for a full barcode.

Retailers, packaging designers, and developers building point-of-sale or inventory systems use it to confirm a scanned EAN-8 is valid or to generate the correct check digit for a new small-package barcode. Enter 8 digits to validate, or 7 digits to compute the missing check digit.

Was this helpful?

You can pick up to 3 reactions.

Comments (0)

  • Be the first to comment.

Popular calculators

All Calculators