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
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
| Range | Primes | Count |
|---|---|---|
| 1 to 10 | 2, 3, 5, 7 | 4 |
| 11 to 20 | 11, 13, 17, 19 | 4 |
| 21 to 30 | 23, 29 | 2 |
| 31 to 40 | 31, 37 | 2 |
| 41 to 50 | 41, 43, 47 | 3 |
| 51 to 60 | 53, 59 | 2 |
| 61 to 70 | 61, 67 | 2 |
| 71 to 80 | 71, 73, 79 | 3 |
| 81 to 90 | 83, 89 | 2 |
| 91 to 100 | 97 | 1 |
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
| Number | Smallest prime factor | What the tool shows |
|---|---|---|
| 51 | 3 | 51 = 3 × 17 |
| 57 | 3 | 57 = 3 × 19 |
| 87 | 3 | 87 = 3 × 29 |
| 91 | 7 | 91 = 7 × 13 |
| 119 | 7 | 119 = 7 × 17 |
| 133 | 7 | 133 = 7 × 19 |
| 143 | 11 | 143 = 11 × 13 |
| 221 | 13 | 221 = 13 × 17 |
| 323 | 17 | 323 = 17 × 19 |
| 437 | 19 | 437 = 19 × 23 |
| 899 | 29 | 899 = 29 × 31 |
| 1001 | 7 | 1001 = 7 × 143 |
| 9991 | 97 | 9991 = 97 × 103 |
| 10403 | 101 | 10403 = 101 × 103 |
| 1000001 | 101 | 1000001 = 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
| Number | Result |
|---|---|
| 0 | Neither prime nor composite |
| 1 | Neither prime nor composite |
| 2 | Prime |
| 561 | Composite: 3 × 187 |
| 1729 | Composite: 7 × 247 |
| 7919 | Prime |
| 1000000007 | Prime |
| 2147483647 | Prime |
| 4294967297 | Composite: 641 × 6700417 |
| 999999999989 | Prime |
7919 is the 1,000th prime, 2147483647 is 2^31 − 1 and 4294967297 is 2^32 + 1.
How to use this tool
- Type a whole number as digits, with a minus sign in front if it is negative. Leading zeros are ignored.
- Read the result: prime, composite with its smallest prime factor, or neither for 0 and 1.
- 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 toolsLCM and GCD Calculator
GCD (also called GCF or HCF) and LCM of 2 to 10 whole numbers, with the Euclidean steps and the prime factors of each number shown.
Prime Factorization Calculator
Prime factorization of any whole number from 2 to 999,999,999,999, shown as a product and as powers: 360 = 2^3 × 3^2 × 5.
Decimal to Fraction
Convert a decimal to a fraction in lowest terms and see the working: 0.75 = 3/4, 2.75 = 11/4 or 2 3/4, and 0.333… (3 repeating) = 1/3.
Mixed Number Calculator
Add, subtract, multiply or divide two mixed numbers. The answer comes as a mixed number, an improper fraction and a decimal, with each step written out.
Arithmetic Sequence Calculator
Arithmetic sequence nth term aₙ = a₁ + (n − 1)d and sum Sₙ of the first n terms, with the first 20 terms listed and the position of any value.
Basic Calculator
Basic calculator for + − × ÷ in the standard order of operations (2 + 3 × 4 = 14), with % and memory keys, ^ for powers and the result as a fraction.