Skip to main content
CalcChef

Prime Number Checker

Type a whole number below 3.3 × 10^24 to see whether it is prime. A composite gets its smallest prime factor, and the five primes on either side are listed. How it works

Use the Prime Number Checker

Works for whole numbers below 3317044064679887385961981 (about 3.3 × 10^24, up to 25 digits). Digits only; leading zeros are ignored.

Verdict
Prime
17 is prime

Its only positive divisors are 1 and itself.

Previous 5 prime numbers

  • 13
  • 11
  • 7
  • 5
  • 3

Next 5 prime numbers

  • 19
  • 23
  • 29
  • 31
  • 37

The 25 primes below 100

  • 2
  • 3
  • 5
  • 7
  • 11
  • 13
  • 17
  • 19
  • 23
  • 29
  • 31
  • 37
  • 41
  • 43
  • 47
  • 53
  • 59
  • 61
  • 67
  • 71
  • 73
  • 79
  • 83
  • 89
  • 97

About the Prime Number Checker

17 is prime, and 91 is not: 91 = 7 × 13. This prime number checker says whether any whole number below 3.3 × 10^24 is prime, gives the smallest prime factor of a composite number and lists the five primes before it and the five after it.

Prime numbers below 100

RangePrimesCount
1 to 102, 3, 5, 74
11 to 2011, 13, 17, 194
21 to 3023, 292
31 to 4031, 372
41 to 5041, 43, 473
51 to 6053, 592
61 to 7061, 672
71 to 8071, 73, 793
81 to 9083, 892
91 to 100971

There are 25 primes below 100, 168 below 1,000 and 1,229 below 10,000.

Composite numbers that look prime, with their smallest prime factor

NumberSmallest prime factorWhat the tool shows
51351 = 3 × 17
57357 = 3 × 19
87387 = 3 × 29
91791 = 7 × 13
1197119 = 7 × 17
1337133 = 7 × 19
14311143 = 11 × 13
22113221 = 13 × 17
32317323 = 17 × 19
43719437 = 19 × 23
89929899 = 29 × 31
100171001 = 7 × 143
9991979991 = 97 × 103
1040310110403 = 101 × 103
10000011011000001 = 101 × 9901

The tool gives the smallest prime factor and what is left over, which may itself be composite: 143 = 11 × 13, so 1001 = 7 × 11 × 13.

Numbers people check

NumberResult
0Neither prime nor composite
1Neither prime nor composite
2Prime
561Composite: 3 × 187
1729Composite: 7 × 247
7919Prime
1000000007Prime
2147483647Prime
4294967297Composite: 641 × 6700417
999999999989Prime

7919 is the 1,000th prime, 2147483647 is 2^31 − 1 and 4294967297 is 2^32 + 1.

How to use this tool

  1. Type a whole number as digits, with a minus sign in front if it is negative. Leading zeros are ignored.
  2. Read the result: prime, composite with its smallest prime factor, or neither for 0 and 1.
  3. Look under the result for the 5 primes below your number and the next 5 above it.

Frequently asked questions

Is 1 a prime number?
No. A prime has exactly two positive divisors, 1 and itself, and 1 has only one. 1 is neither prime nor composite, and the same goes for 0. The smallest prime is 2, which is also the only even prime.
Is 91 a prime number?
No. 91 = 7 × 13. It looks prime because it is odd and passes the quick checks for 3 and 5. Other numbers of the same kind are 51 = 3 × 17, 57 = 3 × 19, 87 = 3 × 29 and 119 = 7 × 17.
Can a negative number be prime?
Not under the usual definition, which only counts whole numbers greater than 1. Type -7 and the checker answers that -7 is not prime, and it calls no negative number composite either. Drop the sign to test 7, which is prime.
How do I check whether a number is prime by hand?
Try dividing by each prime up to the square root of the number. If none divides it, the number is prime. For 221 the square root is a little under 15, so the primes to try are 2, 3, 5, 7, 11 and 13, and 13 works: 221 = 13 × 17.
How large a number can it check?
Any whole number below 3,317,044,064,679,887,385,961,981, which is about 3.3 × 10^24 and has 25 digits. Up to that limit the answer is a proof, not a probability. Type the digits without commas: 2147483647 and 1000000007 are both prime.
Why does it say composite without giving a factor?
The primality test can prove a number composite without finding its factors. The factor search then tries divisors up to 1,000,000. A number whose prime factors are all larger, such as 1000036000099 = 1000003 × 1000033, is reported as composite with a note that no factor was found.

Related Tools

View all tools