Mathematics glossary

Wilson's theorem

Taught in
  • Olympiad · IOQM

Wilson's theorem says that a whole number p greater than 1 is prime exactly when p divides (p - 1) factorial plus 1.

Mohit Sardana
Chief Architect

Here n! (read n factorial) means 1 × 2 × 3 × ... × n. So 4! = 24 and 6! = 720. In the language of congruence, the theorem says (p - 1)! ≡ -1 (mod p) when p is prime.

The rule works both ways. If p is prime, the remainder is always p - 1. If p is not prime, it never is. So in theory it is a full test for primes. In practice factorials grow far too fast for large numbers. Its real use is in proofs and remainder questions.

A small example

  • p = 5: 4! + 1 = 24 + 1 = 25, and 25 = 5 × 5. It works, and 5 is prime.
  • p = 7: 6! + 1 = 720 + 1 = 721, and 721 = 7 × 103. It works, and 7 is prime.
  • p = 6: 5! + 1 = 120 + 1 = 121. Since 121 = 6 × 20 + 1, 6 does not divide it. And 6 is not prime.

A question may ask for the remainder of 10! on division by 11. Since 11 is prime, 10! ≡ -1 (mod 11). So the remainder is 11 - 1 = 10.

Where it fits

This goes beyond the Class 10 board syllabus. HBCSE's syllabus for the Mathematical Olympiad names it under number theory. The Mathematics Teachers' Association (India), MTA(I), conducts IOQM, the first stage of the Mathematical Olympiad Programme that HBCSE organises for NBHM.

Sources

Facts last checked against these sources on 30 September 2026.

About the author

Mohit Sardana

Chief Architect

An engineer (B.Tech, Computer Science) with over 20 years of preparing students for entrance exams, including as Dean at FIITJEE and Vice-President at Aakash. He is the chief architect of the TRUpreBoards evaluation engine.

Mohit Sardana on LinkedIn

Keep reading

All terms →
CBSEDecoding the CBSE Class 10 Maths 2025 paper6 min read

See where your child's marks go.

Get one paper marked the way a board examiner would, and read the mark-loss report for yourself.

Get a paper evaluated