Subscribe now

Mathematics

Barcodes: How they could be your latest mathematical party trick

Barcodes contain a checksum – an ingenious use of mathematics that even lends itself to a fun way to surprise your friends, says Katie Steckles

By Katie Steckles

5 February 2025

Barcodes on Magazines

Shutterstock/Scott Rothstein

Sometimes there are hidden patterns in numbers you might not immediately notice. One example of this is in barcodes, the sequences of digits we use to identify products.

Try it yourself – find an object with a 13-digit barcode. (If you are in the US, a 12-digit barcode will also work, if you imagine an extra 0 on the front of it.) Books won’t work, since they use a slightly different system, but magazines do, so you can use a copy of New Scientist. Add together the first, third, and fifth digits and so on, to get the sum of…

Sign up to our weekly newsletter

Receive a weekly dose of discovery in your inbox! We'll also keep you up to date with New Scientist events and special offers.

Sign up

To continue reading, subscribe today with our introductory offers

Piano Exit Overlay Banner Mobile Piano Exit Overlay Banner Desktop