Skip to content
Omnikalc

Barcode and ISBN check digit calculator

Compute the last digit of an EAN-13, ISBN-13, UPC-A, EAN-8 or ISBN-10 code from the digits before it, to create a valid barcode or check one that will not scan.

Updated on
Your inputs
Code type

Value out of range

Value out of range

Value out of range

Value out of range

Results

Check digit

2

Append this digit at the end of the code
Weighted sum of the digits
58
Next multiple used for the check
60

What the check digit does

Retail barcodes and ISBNs end with a check digit calculated from the other digits. A scanner recomputes it on every read: if it does not match, the code is rejected. It catches all single-digit errors and most swaps of two adjacent digits.

EAN-13, ISBN-13 and UPC-A

  1. Number the digits from the left.
  2. EAN-13 / ISBN-13: multiply the 1st, 3rd, 5th… digits by 1 and the 2nd, 4th, 6th… by 3. UPC-A: multiply the 1st, 3rd, 5th… by 3 and the others by 1.
  3. Add everything up.
  4. The check digit is what brings the total to the next multiple of 10: (10 − sum mod 10) mod 10.

Example: for 4 0 0 6 3 8 1 3 3 3 9 3, the weighted sum is 89, so the check digit is 1 and the full code is 4006381333931.

A UPC-A code is an EAN-13 with a leading 0, so both methods give the same check digit. For 03600029145 the check digit is 2.

EAN-8

The seven digits are weighted 3, 1, 3, 1, 3, 1, 3. For 7351353 the check digit is 7.

ISBN-10

Older book numbers use a different rule: multiply the digits by 1, 2, 3… 9, add them up, and take the remainder modulo 11. A remainder of 10 is written as X. For 0-306-40615 the check digit is 2. ISBN-13 replaced ISBN-10 in 2007 by adding the prefix 978 and recomputing the check digit with the EAN method.

Prefixes

The first digits of an EAN-13 identify the GS1 organization that issued the company number, not necessarily the country of manufacture:

Prefix Meaning
000–139 Mostly GS1 US (some ranges for in-store use and coupons)
300–379 GS1 France
400–440 GS1 Germany
978–979 Books (ISBN)

Getting real barcodes

To sell products in stores you need company prefixes licensed from GS1 US (or your country’s GS1). Codes you make up may collide with other products. Entering leading zeros is optional: the calculator treats a shorter number as if it started with zeros.

Frequently asked questions

How is an EAN-13 check digit calculated?

Multiply the 12 digits alternately by 1 and 3, add them, and take the amount needed to reach the next multiple of 10. For 400638133393 the check digit is 1.

Is UPC-A the same as EAN-13?

A UPC-A code is an EAN-13 code with a leading zero, so the check digit is identical. The UPC weights simply start with 3 because the leading zero is dropped.

What does X mean in an ISBN-10?

It stands for the value 10. ISBN-10 uses a modulo 11 check, so the check digit can be 0 to 10, and 10 is written as X.

Does the prefix show where a product was made?

No. It shows which national GS1 organization issued the company's number. A company registered with GS1 US can make products anywhere.

Was this calculator helpful?

Thanks for your feedback!

Results are estimates provided for information purposes. They do not replace professional advice.