Skip to content
Data & NetSuite utilities

UPC check digit calculator — UPC-A, EAN-13, ITF-14

Calculate or validate the GS1 mod-10 check digit for UPC-A, EAN-13 and ITF-14 barcodes, with the weighted-sum arithmetic shown step by step.

Free · no signup · runs in your browserUpdated
Short answer

The GS1 check digit is found by weighting each data digit 3 or 1, starting with 3 at the rightmost digit, summing the products, then subtracting the total's last digit from 10. For UPC-A 03600029145 the weighted sum is 58, so the check digit is 2 and the full code is 036000291452. EAN-13 and ITF-14 use the same rule.

This UPC check digit calculator computes the GS1 mod-10 check digit for UPC-A, EAN-13 and ITF-14, and shows every step of the weighted sum so you can verify it by hand. Enter the digits without the check digit — 11 for UPC-A, 12 for EAN-13, 13 for ITF-14 — and it returns the check digit and the complete code.

Switch to validate mode to test a barcode you already have. Paste the full code, spaces and hyphens included, and it recomputes the check digit from the body and tells you whether the last digit agrees.

Your numbers

Mode

UPC-A needs 11 digits in, and returns the 12th.

Spaces and hyphens are ignored. Keep leading zeros — they change every weight in the sum.

Result

UPC-A check digit
2

Complete code 036000291452

Complete UPC-A
036000291452
SymbologyUPC-A · 12 digits
Data digits entered11
Sum of the ×3 positions14 × 3 = 42
Sum of the ×1 positions16
Weighted total58
Check digit2
pos 1 2 3 4 5 6 7 8 9 10 11
digit 0 3 6 0 0 0 2 9 1 4 5
weight 3 1 3 1 3 1 3 1 3 1 3
product 0 3 18 0 0 0 6 9 3 4 15
digits weighted ×3 sum to 14, so 14 × 3 = 42
digits weighted ×1 sum to 16
weighted total = 42 + 16 = 58
58 mod 10 = 8
check digit = (10 − 8) mod 10 = 2
UPC-A = 036000291452
The weighted total is 58, which ends in 8, so the check digit is 2 and the complete UPC-A is 036000291452. The check digit is part of the code, so store and print all 12 digits together.

Everything is computed in your browser. Nothing you type is sent anywhere or stored.

The formula

Check digit = (10 − (Σ(digit × weight) mod 10)) mod 10
digit
Each data digit of the code, excluding the check digit itself.
weight
3 for the rightmost data digit, then alternating 1, 3, 1, 3 as you move left.
Σ
The sum of every digit multiplied by its weight.
mod 10
The remainder after dividing by 10. The outer mod 10 is what turns a sum ending in 0 into a check digit of 0 rather than 10.

Weights are assigned from the right, not the left. That is why UPC-A gives its first digit a weight of 3 and EAN-13 gives its first digit a weight of 1 — the two codes have a different number of data digits, so the alternation lands differently. Padding a UPC-A to 13 digits with a leading zero produces the same check digit, which is why a GTIN can be stored in one field.

Worked example

Symbology
UPC-A (12 digits)
Digits entered
03600029145
Result
Check digit 2 · 036000291452

Weights run 3, 1, 3, 1 … from the right, so the odd positions of an 11-digit UPC-A body get 3. The ×3 digits are 0, 6, 0, 2, 1, 5 — a subtotal of 14, or 42 after weighting. The ×1 digits are 3, 0, 0, 9, 4, giving 16. The weighted total is 58, 58 mod 10 = 8, and (10 − 8) mod 10 = 2. The complete barcode is 036000291452.

How the UPC check digit calculator works

  1. 1.Drop the check digit if the code already has one, leaving the data digits.
  2. 2.Working from the right-hand data digit leftwards, give the digits weights of 3, 1, 3, 1 and so on.
  3. 3.Multiply each digit by its weight and add the products together.
  4. 4.Take the remainder of that total on division by 10.
  5. 5.Subtract the remainder from 10, then take that result modulo 10 so a remainder of 0 gives a check digit of 0 rather than 10.

The direction is the only thing people get wrong. Assigning weights left to right works by accident for UPC-A, because 11 data digits put a 3 at both ends, and then fails silently for EAN-13, where the first digit carries a weight of 1.

Digit counts by symbology

SymbologyTotal digitsDigits you enterTypical use
UPC-A1211Retail consumer units in the US and Canada.
EAN-131312Retail consumer units in the rest of the world; ISBN-13 for books.
ITF-141413Shipping cases and pallets — the outer carton, not the item inside it.
One check digit each, same algorithm, different body length. The weight alternation always starts at 3 on the right.

The three are related rather than separate. A UPC-A padded with a leading zero is a valid 13-digit GTIN with the same check digit, and an ITF-14 is usually that GTIN with a packaging indicator digit in front and a freshly computed check digit on the end. The consumer unit 036000291452 becomes the case code 10036000291459.

Worked example: 036000291452

PositionDigitWeightProduct
1030
2313
36318
4010
5030
6010
7236
8919
9133
10414
115315
Total58
UPC-A body 03600029145. Weighted total 58, so the check digit is (10 − 8) mod 10 = 2.

What the check digit catches, and what it misses

  • Every single-digit error. Change any one digit and the weighted total moves by 1 to 27, never by a multiple of 10, so the check always fails. This is the case it was designed for.
  • Most adjacent transpositions, but not all. Swapping two neighbouring digits shifts the total by twice their difference. When the digits differ by exactly 5 — a 1 and a 6, a 3 and an 8 — the shift is a multiple of 10 and the swap passes undetected.
  • Nothing about ownership. A code can be arithmetically perfect and still belong to another company, or to nobody. The GS1 company prefix inside it is what determines that, and it is not something the check digit can test.
  • Nothing about duplicates. Two different items in your item master can carry the same valid GTIN. That is a data-quality query, not a check-digit problem.

Once you have thousands of items, the useful question is not "is this one valid" but "which of mine are not". That is a query over the item master: blank GTINs, wrong lengths, non-numeric characters, failed check digits, duplicates across items. With you ask for it in words and get the SuiteQL shown alongside the answer. Pair it with the unit of measure converter when the case code and the case quantity need to agree.

Frequently asked questions

How do you calculate a UPC check digit?

Weight the 11 data digits 3, 1, 3, 1 … starting from the right, add the products, take the remainder on division by 10, then subtract that from 10 and take modulo 10 again. For 03600029145 the weighted total is 58, the remainder is 8, and the check digit is 2, giving 036000291452.

What is the difference between UPC-A and EAN-13?

Length and geography. UPC-A is 12 digits and dominates North American retail; EAN-13 is 13 and is used elsewhere. They are the same numbering system: a UPC-A with a leading zero added is a valid EAN-13 with an identical check digit, which is why both fit in one GTIN field.

How is the ITF-14 check digit calculated?

Identically to UPC-A and EAN-13, over 13 data digits instead of 11 or 12. Weight from the right with 3, 1, 3, 1 …, sum, and take (10 − sum mod 10) mod 10. ITF-14 marks the shipping case, so its body is normally a packaging indicator digit followed by the 13-digit GTIN of the item inside.

Why is my barcode scanning as invalid?

Check the length first — a 12-digit code labelled EAN-13 is the most common cause, and adding the leading zero usually fixes it. After that, look for a transposition in the middle digits, or a leading zero stripped by a spreadsheet, which changes the length and therefore every weight in the calculation.

Can a check digit be 0?

Yes. When the weighted total is already a multiple of 10 the remainder is 0, and the outer modulo turns 10 back into 0. That is exactly what the second mod 10 is for. Any implementation that can emit 10 as a check digit has skipped that step and will produce codes that fail elsewhere.

Does the check digit prove the barcode is real?

No. It proves the digits are internally consistent. Whether the code was allocated, to whom, and whether it points at the product in front of you are separate questions answered by the GS1 company prefix and your own item master. Treat a passing check digit as a typo filter, nothing more.

All 50 ERP & finance tools

Stop calculating it by hand. Just ask your ERP.

This calculator needs you to find the inputs first. ERPray pulls them from your own ERP account and computes the answer live — with the exact query shown so you can check it.