Lang
Math & Number Tools Checker
Prime Number Checker: Is This Number Prime?
Check whether a number is prime, composite, or neither, with divisibility logic, examples, and explanations for math homework and number theory.
Analyze a number
See whether it is prime, why, its factors, and nearby primes in one place.
Prime factorization
The factors multiply back to the original number.
Factor tree steps
Explore primes in a range
Choose two endpoints to see every prime, a count, a visual distribution and the largest gap.
Where the primes are
Each bar counts primes in one tenth of the selected range. The final partial segment is included.
Prime number grid
Showing the first 100 numbers of the range.
Advanced prime checks
Mersenne prime check
A number of the form 2^p − 1 is not necessarily prime. This test verifies the number itself.
Large-number prime test
Exact deterministic Miller–Rabin test for unsigned 64-bit integers.
What makes a number prime
A prime number is a whole number greater than 1 with exactly two positive factors: 1 and itself.
- 2 is the only even prime number.
- 1 is not prime and not composite.
- A composite number has more than two positive factors.
How prime checking works
A practical prime test checks divisibility only up to the square root of the number.
- If a factor exists above the square root, a paired factor exists below it.
- Even numbers greater than 2 are not prime.
- Numbers ending in 5 are not prime unless the number is 5.
Prime checker examples
Use examples to understand the result, not just the final yes or no.
- 17 is prime because only 1 and 17 divide it evenly.
- 21 is composite because 3 x 7 = 21.
- 97 is prime because no integer from 2 to sqrt(97) divides it.
Related calculators
These number tools support factors, divisibility, and math homework.
Prime Number Checker FAQ
What is a prime number?
A prime number is a whole number greater than 1 with exactly two positive factors: 1 and itself.
Is 1 a prime number?
No. 1 is not prime and not composite.
Is 2 prime?
Yes. 2 is prime and it is the only even prime number.
How do I check if a number is prime?
Test whether it has any divisors from 2 up to the square root of the number.
What is a composite number?
A composite number is a whole number greater than 1 with more than two positive factors.
Math & Statistics directory
Need another math or statistics tool?
Browse the full math and statistics calculator collection for percentages, algebra, geometry, probability, z-scores, confidence intervals, regression, correlation, percentiles, matrices, and number conversions.
Focused prime number pages
Use this direct-answer page when the question is simply whether a number is prime or composite.
