Prime number checker

Enter a number to test it. 91 is not prime (91 = 7 × 13), while 97 is. The second box finds the nth prime.

No
91 is composite: 91 = 7 × 13
89previous prime
97next prime
7 × 13prime factorization

All facts about 91 →

541
the 100th prime number All facts about 541 →

How to check if a number is prime

  1. Numbers below 2 are not prime; 2 and 3 are.
  2. If it is even (other than 2) or its digit sum is a multiple of 3, it is not prime.
  3. Otherwise try dividing by 5, 7, 11, 13, … up to its square root. If nothing divides evenly, it is prime.

Example: to test 97, √97 ≈ 9.85, so try 2, 3, 5, 7. None divides 97, so 97 is prime.

Numbers that look prime but are not

NumberFactors
513 × 17
573 × 19
873 × 29
917 × 13
1113 × 37
1197 × 17
1337 × 19
14311 × 13
1617 × 23
169132
18711 × 17
20911 × 19
22113 × 17
1,0017 × 11 × 13

Nth prime reference

nnth prime
12
1029
100541
1,0007,919
10,000104,729
100,000NaN
1,000,000NaN

Frequently asked questions

Is 1 a prime number?
No. Primes have exactly two divisors; 1 has one.
Is 2 a prime number?
Yes, and it is the only even prime.
What is the 100th prime?
541.