Real World Maths Busters

The Maths Behind Everyday Life

The story, the formula and a worked example — see exactly where this maths shows up in the world around you.

Back to all stories
Technology 3 min read

How every book's number checks itself

A weighted sum across 13 digits catches typos before a wrong book is ordered.

Every modern book carries a 13-digit ISBN whose final digit is a check digit. Like a barcode, it uses a weighted sum so that a mistyped ISBN almost always fails the test.

Alternating weights of 1 and 3

Multiply the digits alternately by 1 and 3, sum them, and choose the check digit that makes the total divisible by 10.

d=(10−(S mod 10)) mod 10d = (10 - (S \bmod 10)) \bmod 10

ISBN-13 check digit

Worked example

Say the weighted sum of the first 12 digits is 94.

Compute the check digit

  1. 1

    Sum mod 10

    94 mod 10=494 \bmod 10 = 4
  2. 2

    Check digit

    (10−4) mod 10=6(10 - 4) \bmod 10 = 6
Answer

The check digit 6 makes the full weighted sum a multiple of 10.

The formula behind it

ISBN Check

d=(10−(S mod 10)) mod 10d = (10 - (S \bmod 10)) \bmod 10

The takeaway

ISBN-13 uses a 1-3 weighted sum so that most typos break divisibility by 10 and are caught before the order ships.

Back to all stories