Prime Number Checker
Find out if a number is prime, see its prime factorization and number of divisors, and list every prime up to a limit. It handles whole numbers up to 16 digits and runs in your browser.
Is it a prime number?
Commas and spaces are fine, for example 1,000,003
97 is a prime number.
List of prime numbers
Up to 1,000,000
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
How to check if a number is prime
- Type a whole number. The answer, its prime factorization and its divisor count appear straight away.
- For a composite number, read the smallest factor and the full list of prime factors.
- To see primes in a range, enter a limit in the second box and copy the list.
How primality is tested
A prime has exactly two divisors, 1 and itself. To test a number n, you only need to try divisors up to the square root of n, because any factor larger than that pairs with a smaller one. The checker skips multiples of 2 and 3 and tests the rest, which is quick for numbers up to 16 digits. The list uses the sieve of Eratosthenes: cross out the multiples of each prime and what is left is prime.
Related tools
To simplify a ratio use the ratio calculator. To reduce fractions use the fraction calculator. To pick numbers at random use the random number generator, or find a mean with the average calculator.
See also
- Simplify fractions with the fraction calculator.
- Reduce a ratio to lowest terms with the ratio calculator.
- Pick numbers to test with the random number generator.
- Find a mean or median with the average calculator.
Frequently Asked Questions (FAQ)
A prime number is a whole number greater than 1 whose only divisors are 1 and itself. The first primes are 2, 3, 5, 7, 11, 13 and 17. A number with more divisors, such as 12, is called composite.
Type the number into the checker. It tells you at once whether it is prime. If it is not, it shows the smallest number that divides it and the full prime factorization.
No. A prime has exactly two divisors, and 1 has only one. Excluding 1 keeps every number's prime factorization unique. 0 is not prime either.
Yes. Every other even number is divisible by 2, so it has at least three divisors. That makes 2 the smallest prime and the only even one.
It writes a number as a product of primes. For example 360 = 2 × 2 × 2 × 3 × 3 × 5, or 2³ × 3² × 5. Every whole number above 1 has exactly one such form, apart from the order.
Any whole number up to 9,007,199,254,740,991 (2^53 − 1), which is 16 digits. Beyond that, a browser cannot hold the value exactly. Very large primes may take a moment to confirm.
Enter a limit and the tool lists every prime up to it using the sieve of Eratosthenes. Limits go up to 1,000,000, which has 78,498 primes. The first 2,000 are shown and you can copy the whole list.
No. Everything is calculated in your browser and nothing is uploaded.