Prime Number Checker
About this tool
About Prime Number Checker
Type a whole number and find out at once whether it is prime. If it is not, you see its smallest divisor and its full prime factorization written with exponents, such as 360 = 2³ × 3² × 5. The checker also gives the number of divisors, the sum of divisors, whether the number is even or odd, and the previous and next prime numbers, which is handy for hashing, cryptography exercises and homework. It works on exact big integers up to 10^24 (25 digits), far beyond what ordinary calculators handle. Primality is decided with a deterministic Miller–Rabin test that is proven correct in this range, not a probabilistic guess, and factors are found with trial division followed by Pollard's rho method. In the rare case a huge factor cannot be split quickly, the tool says so instead of showing a wrong answer. All of it runs in your browser.
Built and maintained by Abhi JainUpdated
How to Check if a Number Is Prime
- 1
Enter the number
Type a whole number into Number. Commas and spaces are ignored.
- 2
Read the verdict
The result says Prime or Not prime, and shows a divisor if it is not.
- 3
Explore the details
Check the prime factorization, number of divisors and the previous and next prime.
Prime Number Checker: questions and answers
What is a prime number?
A whole number greater than 1 whose only divisors are 1 and itself. The first primes are 2, 3, 5, 7, 11 and 13.
Is 1 a prime number?
No. A prime must have exactly two different divisors, and 1 has only one. 0 and 1 are neither prime nor composite.
How do you check if a number is prime by hand?
Try dividing it by every prime up to its square root. If none divides evenly, it is prime. For 97, √97 ≈ 9.8, and 2, 3, 5 and 7 do not divide it, so 97 is prime.
What is prime factorization?
Writing a number as a product of primes, which is unique for every whole number above 1. For example 1,001 = 7 × 11 × 13.
Is 2 the only even prime?
Yes. Every other even number is divisible by 2, so it has at least three divisors.
Related Tools
- GCD and LCM CalculatorGreatest common divisor (HCF) and least common multiple of two or more numbers, with Euclid's steps.
- Factorial CalculatorExact n! for n up to 25,000, with digit count, trailing zeros and scientific notation.
- Modulo Calculatora mod n with floored, truncated and Euclidean conventions, explained for negative numbers.
- Scientific CalculatorFull scientific calculator with trig in degrees or radians, logs, powers, factorials, memory, history and keyboard input.