How the check digit is calculated
Every UPC, EAN, GTIN-14 and SSCC ends in a digit worked out from the ones before it. The method is the same for all of them.
- Take the number without its check digit.
- Starting from the right, multiply the digits by 3, 1, 3, 1 and so on.
- Add up the results.
- The check digit is whatever brings that sum up to the next multiple of 10. If the sum already ends in 0, the check digit is 0.
Worked example: UPC 03600029145
From the right, the digits 5, 4, 1, 9, 2, 0, 0, 0, 6, 3, 0 are multiplied by 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3. That gives 15 + 4 + 3 + 9 + 6 + 0 + 0 + 0 + 18 + 3 + 0 = 58. The next multiple of 10 is 60, so the check digit is 2 and the full UPC is 036000291452.
Starting from the right is the detail people miss. It is why the same rule works for 8, 12, 13, 14 and 18 digit numbers without changing anything: the digit next to the check digit is always multiplied by 3.
Which lengths this calculator accepts
| You enter | It is treated as | Result |
|---|---|---|
| 7 digits | EAN-8 without check digit | Calculates the 8th |
| 8 digits | Complete EAN-8 | Verifies it |
| 11 digits | UPC-A without check digit | Calculates the 12th |
| 12 digits | Complete UPC-A, or EAN-13 without check digit | Shows both readings |
| 13 digits | Complete EAN-13 | Verifies it |
| 14 digits | Complete GTIN-14 | Verifies it |
| 17 or 18 digits | SSCC | Calculates or verifies |
| 9 or 10 characters | ISBN-10 | Calculates or verifies, modulo 11 |
Twelve digits is the one ambiguous length, because it could be a finished UPC or the start of an EAN-13. The calculator shows both answers so you can pick the one that matches your number. For a 13-digit case number that needs its 14th digit, use the ITF-14 generator, which adds it and draws the carton barcode.
What a check digit catches, and what it misses
The check digit exists to catch typing and scanning errors. It is good at some and blind to others.
- Any single wrong digit: always caught.
- Two neighbouring digits swapped: caught in most cases. It is missed when the two digits differ by exactly 5, such as 1 and 6, or 2 and 7.
- Two separate errors: sometimes cancel out and slip through.
- A made-up number: passes one time in ten by chance.
So a pass means "probably typed correctly". It does not mean the number is registered, in use, or yours. Whether a number is accepted by a retailer is a separate question, covered in the guide on whether you need a GS1 UPC.
Why ISBN-10 can end in X
ISBN-10 uses a different scheme. The nine digits are multiplied by 10, 9, 8 down to 2, the results are added, and the check character is whatever makes the total divisible by 11. That can come out as 10, which does not fit in one digit, so it is written as X. ISBN-13 dropped this and uses the standard 3, 1 method, which is why converting an ISBN-10 to ISBN-13 changes the last character. The ISBN barcode generator does the conversion for you.
Leading zeros and spreadsheets
If a UPC that should have 12 digits shows up with 11, a spreadsheet has probably treated it as a number and dropped the zero at the front. Put the zero back before checking. To stop it happening, format the column as text before pasting. Once the numbers are clean, the UPC generator or the bulk barcode generator will draw them.