Prime Number Checker
Type a number and find out instantly whether it is prime. The check runs on your device - nothing is ever uploaded.
Runs entirely on your device - nothing is ever uploaded.
More tools
- Factor Calculator List every factor and the prime factorization. Get started
- LCM Calculator Least common multiple of any numbers. Get started
- Quadratic Formula Calculator Roots in exact radicals, discriminant, and vertex. Get started
- GCF Calculator Greatest common factor of any numbers. Get started
- Integral Calculator Antiderivatives with the technique behind every step. Get started
- LCM/GCF Calculator Least common multiple and greatest common factor. Get started
- Derivative Calculator Differentiate with steps, up to the second derivative. Get started
- Chinese Remainder Theorem Calculator Solve x ≡ a (mod m) systems, with full steps. Get started
How to use Prime Number Checker
- Type any whole number, as large as 15 digits.
- See immediately whether it is prime.
- For composite numbers, read the smallest factor and the full factorization.
What it is for
Prime tests come up in homework, cryptography, and hash functions. This tool tells you straight away whether a number divides only by one and itself, and shows the evidence when it does not.
How it works
The checker trial-divides by 2, 3, 5 and then candidates of the form 6k plus or minus 1 up to the square root, which is exact for every input. Composite numbers also show their complete prime factorization.
What makes a number prime
A prime divides evenly only by 1 and itself: 2, 3, 5, 7, 11, 13 are the first of them, and 2 is the only even prime. To test a number you only need trial divisors up to its square root - if none divide it, no larger divisor can exist either. For 97, testing 2, 3, 5, 7 finds nothing, and 11² = 121 already exceeds 97, so 97 is prime. By contrast 91 falls to 7 × 13, which the checker reports with the full factorization.
Why primes matter
Every whole number factors uniquely into primes, which makes them the atoms of arithmetic - and the locks of the internet. RSA encryption multiplies two giant primes that anyone can see, while factoring the product back apart is infeasible; hash tables and random generators lean on prime sizes to spread values evenly. Homework uses smaller specimens, but the test here is the same trial division, exact to 15 digits.