EAN-13 Check Digit: Calculate the 13th Digit by Hand

PublishedToolBarcode Generator

Contents
  1. The 13th digit is not product information
  2. How to check it by hand, no tool needed
  3. What the leading 880 means
  4. Errors the check won't catch
  5. The short version
  6. Frequently asked questions

Of the 13 digits in the EAN-13 barcode on a product, the last one is not product information. It's a check digit — a number you calculate from the first 12 digits and attach to them.

So when you copy down 13 digits, you can check whether you mistyped something without a calculator. A few multiplications and one subtraction is all it takes.

Summary ① Multiply the first 12 digits by 1, 3, 1, 3… from the left and add them up. Then subtract that sum from the nearest multiple of 10 that is greater than or equal to it, and you get the 13th digit. ② The leading three digits 880 do not indicate country of origin — they mean the GS1 member organization that issued the number is in Korea. ③ When two adjacent digits differ by 5 and you swap them, the check digit comes out the same, so this check won't catch it.

The 13th digit is not product information

An EAN-13 number has three main parts: the GS1 prefix at the front, the company and product identification digits after that, and a single check digit at the very end.

How many digits the company code takes depends on the type of issuance, so there's no point in trying to read the middle block by eye. The last digit, on the other hand, follows one fixed rule.

The reason this digit exists is simple: if a scanner misreads a digit or a person copies one down wrong, the math falls apart and the mistake shows up immediately.

How to check it by hand, no tool needed

The calculation has three steps. As an example, let's walk through the case where the first 12 digits are 880123456789. This number is only for explaining the calculation and has nothing to do with any specific product.

Step 1: Split into odd and even positions

Multiply the 1st, 3rd, 5th… digits from the left by 1, and the 2nd, 4th, 6th… digits by 3. With 12 digits, that gives six of each.

  • Odd positions (1st, 3rd, 5th, 7th, 9th, 11th): 8, 0, 2, 4, 6, 8 → sum 28
  • Even positions (2nd, 4th, 6th, 8th, 10th, 12th): 8, 1, 3, 5, 7, 9 → sum 33

Step 2: Multiply the even-position sum by 3 and add

33 times 3 is 99. Add the odd-position sum of 28 and you get 127.

Multiplying digit by digit and adding 12 times gives the same result. Grouping them like this makes the mental math much faster.

Step 3: Round up to a multiple of 10 and subtract

The nearest multiple of 10 that is greater than or equal to 127 is 130. Subtract 127 from 130 and you get 3.

That 3 is the check digit, and the completed 13 digits are 8801234567893. If the ones digit of the total is already 0, the check digit is 0, not 10.

You can check any number this way. For example, if the first 12 digits are 123456789012, the odd-position sum is 26 and the even-position sum is 22, so 26 + 66 = 92, and 100 − 92 = 8.

The trouble is that it's easy to slip one place while counting positions, and mistakes pile up when you check several numbers in a row.

Check it with our tool. In the barcode format, choose EAN-13 (Product) and enter just 12 digits in the data field — the 13th digit is added automatically and shown under the barcode. If you enter all 13 digits and the check digit doesn't match, no barcode is drawn and a message appears saying the format isn't valid.

Barcode Generator

The barcode is drawn right in your browser — no install, no sign-up — and the numbers you type are never sent to a server.

What the leading 880 means

People often see a number starting with 880 and read it as "made in Korea." That's not quite right.

The leading digits point to the GS1 member organization that issued the number. 880 means the number was issued by Korea's GS1 member organization (the distribution and logistics institute under the Korea Chamber of Commerce and Industry), and South Korea has been assigned both the 880 and 881 ranges.

GS1 states officially that the prefix does not indicate country of origin, because a company that receives a number can make its products anywhere in the world. To find the country of origin, check the origin marking on the packaging, not the barcode.

The reverse is also true. Even a product made in Korea won't start with 880 if the selling company got its number from a GS1 member organization in another country.

Ranges used for something other than countries

Not every prefix points to a country. Some ranges were set aside for other uses from the start.

Leading digitsUse
020–029, 200–299Restricted distribution numbers valid only within a store or region
977Serials (ISSN)
978–979Books (ISBN)
980Refund receipts

Sometimes the barcode on a label a grocery store prints after weighing an item starts with 2 — that number only works inside that store and means nothing anywhere else. The barcode on the back cover of a book starts with 978 for the same reason.

Errors the check won't catch

One check digit can't catch every error. There are cases it structurally misses.

If you write one digit as a different number, the total always changes, so it's always caught. The problem is when you swap two adjacent digits.

When the weights 1 and 3 trade places, the total changes by twice the difference between the two digits. So if the two digits differ by 5, the total changes by exactly 10, the remainder after dividing by 10 stays the same, and the check digit comes out identical.

Type of mistakeCaught by the check?
A digit written as a different numberAlways caught
Two adjacent digits swapped, difference not 5Caught
Two adjacent digits swapped, difference of 5 (e.g. 2 and 7)Not caught
Too few or too many digitsNot 13 digits, so it fails on format

In other words, passing the check digit doesn't mean "this is correct" — it means "this isn't one of the common errors." It can't replace comparing the number against the original by eye.

The short version

  • The 13th digit of an EAN-13 isn't product information — it's a check digit calculated from the first 12 digits.
  • To calculate it, find odd-position sum + (even-position sum × 3), then subtract that value from the nearest multiple of 10 that is greater than or equal to it.
  • If the ones digit of the total is 0, the check digit is 0.
  • The leading 880 doesn't mean country of origin — it means the issuing GS1 member organization is in Korea, and 881 is assigned as well.
  • 020–029 and 200–299 are numbers valid only within a store, 977 is for serials, and 978–979 is for books.
  • A swap of two adjacent digits that differ by 5 won't be caught by this check.
Barcode Generator

The barcode is drawn right in your browser — no install, no sign-up — and the numbers you type are never sent to a server.

Frequently asked questions

I only have 12 digits: how do I fill in the 13th?

Calculate it and add it on. Add up all the digits in odd positions, add up all the digits in even positions and multiply that by 3, then add the two results. Subtract that total from the nearest multiple of 10 that is greater than or equal to it, and you have the 13th digit. If you enter 12 digits in the tool's data field, it adds the extra digit automatically using the same rule.

I entered 13 digits and no barcode appears.

That's what happens when the check digit doesn't match. EAN-13 only accepts a number as valid if the 13th digit agrees with the first 12, so if one digit is off, no barcode is drawn and a message appears instead saying the format isn't valid. Recalculate from the first 12 digits and compare the last digit — that shows you where the problem is.

Does a number starting with 880 mean the product was made in Korea?

No. The leading digits only point to the GS1 member organization that issued the number, and GS1 also states that the prefix doesn't indicate country of origin. A company with an 880 number can produce in an overseas factory, and a product made in Korea can carry another country's number. Check the origin marking on the packaging to find out where it was made.

What's the difference between EAN-13 and UPC-A?

The number of digits. EAN-13 has 13 digits and UPC-A has 12, and adding a 0 to the front of a UPC-A number gives you the EAN-13 form. The check digit is calculated the same way in both, so you can generate either one in the tool just by changing the format — and for UPC-A, entering 11 digits adds the last digit automatically.

This article was adapted from our Korean original. Read the Korean original

Related articles

  1. Fantasy Name Generator: Why Elves and Orcs Sound DifferentHow sound rules shape elf, orc, dwarf, and human names, including the real English roots behind suffixes like -ton, -ford, -smith, and -son.
  2. Random Draw Fairness: How to Check for Bias YourselfRepeat the same draw many times and compare the counts. See whether one name or number keeps coming up, and how modulo bias works.
  3. .gitignore Not Working: Untrack Files Git Already TracksWhy .gitignore keeps letting files through, two commands that tell tracking problems from pattern problems, and how git rm --cached fixes it.
  4. SHA-256 Hash Generator: How to Verify Data IntegritySee what SHA-256 actually computes, why a one-character change flips the whole hash, and how to check a text hash in your browser.
  5. HTML Email Signature Images Not Showing: Why and How to FixLearn why logos and photos in HTML email signatures get blocked or fail to load, and how to build a signature that displays safely.
  6. Invoice vs. Quote: When to Send Each OneAn estimate comes before the contract, an invoice after the work. See how issue timing separates the two, what each document needs, and how to total tax.

Related tools