How to use the Prime Number Checker
- Enter a whole number.
- See instantly whether it is prime or composite.
- For composite numbers, read the prime factorization and smallest factor.
How it works
A prime has exactly two divisors: 1 and itself. The checker tests divisibility by 2, 3 and then numbers of the form 6k ± 1 up to √n — if none divide n, it is prime.
The number of divisors comes from the factorization: for p^a × q^b it is (a + 1)(b + 1).
Worked examples
Is 91 prime?
No — 91 = 7 × 13.
360
360 = 2³ × 3² × 5, so it has (3+1)(2+1)(1+1) = 24 divisors.
Limitations and assumptions
- Checks numbers up to 10¹⁵ (one quadrillion).
Frequently asked questions
Is 1 a prime number?
No. A prime must have exactly two different divisors; 1 has only one. 2 is the smallest prime — and the only even one.
Why only test up to the square root?
If n = a × b and both a and b were larger than √n, their product would exceed n — so one factor must be ≤ √n.
Built and reviewed by Guru G
Calculation logic is covered by automated tests against known values. Last reviewed Nov 8, 2026. Found a problem? Let us know — see our editorial policy.