Prime Number Checker
Check whether a number is prime and see its smallest factor and full prime factorization if it is not.
Prime Number Checker
Check whether a number is prime and see its smallest factor and full prime factorization if it is not.
How to use the Prime Number Checker
- Enter a whole number greater than 1.
- Click Calculate.
Formula
A prime number has exactly two divisors: 1 and itself.
Test divisibility up to √n.
Example
97 is prime (no divisors other than 1 and 97).
100 = 2² × 5²
Step-by-step calculation
- Test divisibility by 2, 3, 5, 7, ... up to √97 ≈ 9.8.
- No divisor found → 97 is prime.
- For 100: smallest factor is 2. 100 = 2×2×5×5 = 2² × 5².
Real-world uses
- Cryptography and security.
- Number theory studies.
- Factoring and divisibility checks.
Common mistakes
- Entering 0 or 1 (neither is prime by definition).
- Thinking all odd numbers are prime (9 = 3×3 is not).
- Assuming large numbers are hard to check — trial division up to √n is efficient.
Frequently asked questions
Is 1 a prime number?
No. By mathematical definition, 1 has exactly one divisor, not two. Primes must have exactly two.
What is the largest prime I can check?
Numbers up to about 9 quadrillion (9×10¹⁵) are checked efficiently.
What is prime factorization?
Expressing a composite number as a product of prime factors. For example, 12 = 2² × 3.