TOPICS
Search

UPC


The universal product code (UPC) is a 12-digit number and associated machine-readable bar code used to identify products being purchased in grocery stores. UPCs encode an individual product, but not its price (this part is done by a store's computer after reading the product identifier). The UPC is part of the GS1 system (GS1 US 2018, p. 3). The first and last digits are separated from the others and written in a smaller font size.

The first eleven digits identify the product. In prefix-based allocation, they comprise a company prefix and an item reference whose lengths vary but total eleven digits (GS1 US 2018, p. 11). The last digit is a check digit obtained from

 a_(12)=10-[(3sum_(i=1; i odd)^(11)a_i+sum_(i=2; i even)^(10)a_i) (mod 10)] (mod 10),
(1)

where (mod 10) indicates taking the remainder after dividing by 10. For example, the UPC for Tropicana Pure Premium orange juice is

 0 48500 00102 8,
(2)

where the check digit is

a_(12)=10-{[3(0+8+0+0+1+2)+(4+5+0+0+0)] (mod 10)} (mod 10)
(3)
=10-[42 (mod 10)] (mod 10)
(4)
=10-2 (mod 10)
(5)
=8,
(6)

as expected.


See also

Check Digit, Checksum, Coding Theory, ISBN

Explore with Wolfram|Alpha

References

GS1 US. Standards Guidance for Assigning DIs Using Global Trade Item Numbers (GTINs). Release 1.0, Jul. 27, 2018. https://www.gs1tw.org/twct/web/download/20180809_GS1_Standards.PDF.

Referenced on Wolfram|Alpha

UPC

Cite this as:

Weisstein, Eric W. "UPC." From MathWorld--A Wolfram Resource. https://mathworld.wolfram.com/UPC.html

Subject classifications