Prime Number Checker
Check whether a number is prime or composite with factors, smallest divisor, and clear step-by-step explanation using the square-root test.
Check whether a whole number is prime or composite. See its factors, smallest divisor, and a step-by-step explanation.
Example/result panel
Example: 97 is prime because no integers from 2 to 9 divide 97 exactly.
How Prime Numbers Work
Prime numbers and composite numbers
A prime number has exactly two positive divisors: 1 and itself. A composite number has more than two positive divisors. This checker reports prime/composite status, the smallest divisor, and all factors.
Square-root divisibility test
To test whether n is prime, it is enough to check divisors up to floor(sqrt(n)). If no divisor is found in that range, n is prime.
Why 0 and 1 are not prime
0 and 1 do not have exactly two positive divisors, so they are neither prime nor composite.
Primes from 1 to 100
2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97
Worked examples
- 2 is prime (only divisors: 1 and 2).
- 17 is prime (not divisible by 2, 3, or 4).
- 51 is composite (smallest divisor 3, since 51 = 3 x 17).
- 91 is composite (smallest divisor 7, since 91 = 7 x 13).
- 97 is prime (no divisors up to 9).
- 101 is prime (no divisors up to 10).
FAQ
Want to explore number classes first? Read the guide on types of numbers.
Related tools: GCF and LCM calculator and factorial calculator.
Learn The Concept
Go beyond the answer
Use the calculator for the result, then read the guide if you want the underlying rule, worked examples, and common mistakes.
Types of Numbers Explained: Natural, Whole, Integers, Rational, Irrational, and Real
Learn the main types of numbers with clear definitions, examples, and a comparison table covering natural, whole, integers, decimals, rational, irrational, and real numbers.
Mean, Median, and Mode: When to Use Each (With Examples)
Understand the three measures of central tendency, when each is most appropriate, and how outliers affect them — with worked examples and real-world scenarios.