CRAFTAI.IN

Barcodes · Tested numerical examples

UPC-A check digit: calculate, verify and print a barcode

If a barcode tool rejects a UPC-A number, the final check digit is often the first thing to inspect. This guide demonstrates the calculation with two repeatable examples, an interactive local checker, and a realistic print-verification checklist.

Published 15 November 2026 · CraftAI editorial team · Calculation cross-checked with GS1 US guidance

Open UPC-A barcode generator →

What are the 12 digits for?

UPC-A is a barcode symbol that encodes a twelve-digit GTIN-12. Its last digit is a check digit: it helps detect common typing or scanning errors. The preceding eleven digits are part of the assigned identification number. A correct check digit does not give you ownership of the identifier. Getting twelve digits that pass arithmetic validation is different from obtaining a legitimately assigned number for retail use.

Interactive check-digit test — processed in your browser

Enter exactly 11 digits to calculate the twelfth; enter 12 to verify the existing final digit. Leading zeros are important, so type the number as text. This calculator sends no form input to our server.

Choose Calculate / verify to check the sample.

Calculate a UPC-A check digit by hand

  1. Take the first 11 digits, retaining any initial zero.
  2. Add the digits in positions 1, 3, 5, 7, 9 and 11 (count from the left), then multiply their sum by 3.
  3. Add the digits in positions 2, 4, 6, 8 and 10.
  4. Add those two subtotals. Find the smallest digit from 0 to 9 that makes the total a multiple of 10. That digit is position 12.
Example A: 01234567890 → 012345678905

Odd positions: 0 + 2 + 4 + 6 + 8 + 0 = 20; multiplied by three = 60. Even positions: 1 + 3 + 5 + 7 + 9 = 25. Total = 85, so the check digit is 5, bringing the total to 90.

Try 012345678905 in the checker to verify the complete twelve-digit value. The sample is educational; do not reuse it as a product identifier.

Example B: GS1's published arithmetic example

First eleven digits: 61414121022. Odd-position digits add to 18, multiplied by three = 54. The even-position digits add to 6. Total = 60, so the last digit is 0. The complete checksum-valid code is 614141210220.

Why does a valid number still fail at checkout?

A barcode image may have the right digits but still be unreadable due to low resolution, poor contrast, insufficient quiet space around the bars, distortion during resizing, a reflective surface or inadequate print quality. Equally, a syntactically correct number might not be recognised in a retailer's inventory. The mathematical checksum neither tests scanner performance nor confirms that an item exists in a store database.

Practical physical label checklist

Three common mistakes

Discarding the leading zero

Spreadsheet applications can turn 012345678905 into 12345678905 when a column is treated as a number. Format the field as text before importing or exporting barcode identifiers.

Using 11 digits as though they're a complete UPC-A

Eleven digits are enough to calculate a check digit, but the complete GTIN-12 contains twelve. CraftAI's barcode generator expects a properly formatted value according to its on-page requirements; use this guide's checker to identify the missing digit first.

Assuming a barcode generator registers a product

It cannot. Creating bars is an encoding operation, not an assignment, licensing or inventory-registration process. Businesses should consult the relevant GS1 organisation for allocation requirements.

Check the source and try a different format

Calculation reference: GS1 US: How to calculate a check digit (PDF). For 13-digit data see CraftAI's EAN-13 barcode generator; to test an existing symbol, use a compatible hardware scanner or barcode-reading application. This tutorial explains the check-digit arithmetic, not all GS1 allocation or print specifications.

Generate a UPC-A symbol →

Continue with a working CraftAI tool

Use the relevant browser-based utility, check its instructions and verify the result before relying on it. Report incorrect outputs with a reproducible example; don't include confidential inputs in reports.

More practical guides · How we test tools · Report a problem

Built on Hatchable