Check if any number is prime. This free prime number checker tells you instantly whether a number is prime, and if not, lists its divisors and prime factorization.
Enter a positive whole number. The checker tells you whether it’s prime, and if not, lists its factors and prime factorization.
A prime number has exactly two divisors: 1 and itself. 1 is not prime (only one divisor), and the smallest prime is 2 — the only even prime.
How the Prime Number Checker Works
A prime number has exactly two positive divisors: 1 and itself. This checker tests any whole number you enter, and if it isn’t prime, it also lists every divisor and breaks the number down into its prime factorization.
Formula: n is prime if n ≥ 2 and no whole number from 2 up to √n divides n evenly. To find the prime factorization, repeatedly divide n by the smallest prime that fits (2, then 3, then 5, and so on), recording each divisor, until what’s left is 1. To list all divisors, check every integer i from 1 to √n; whenever i divides n evenly, both i and n ÷ i are divisors.
- n — the whole number you enter to check for primality
Example Scenarios
| Number | Prime? | Prime Factorization |
|---|---|---|
| 1 | No | none (1 has no prime factors) |
| 2 | Yes | 2 |
| 29 | Yes | 29 |
| 91 | No | 7 × 13 |
| 97 | Yes | 97 |
| 100 | No | 2² × 5² |
Prime Number Checker FAQ
Is 1 a prime number?
No. A prime number must have exactly two distinct divisors, 1 and itself, but 1 only has one divisor (itself). Because of this, 1 is classified as neither prime nor composite, a special case that this checker flags directly.Why is 2 the only even prime number?
Every even number greater than 2 is divisible by 2 in addition to 1 and itself, which gives it at least three divisors, disqualifying it from being prime. 2 is the only even number where that extra divisor doesn’t create a problem, since 2 divided by 2 just gives back 1.What’s the difference between “divisors” and “prime factorization”?
Divisors are every whole number that divides n evenly, including 1, n itself, and any numbers in between — for example 100 has 9 divisors. Prime factorization is the specific set of prime numbers that multiply together to produce n, such as 2² × 5² for 100.What’s a fast way to check primality by hand?
You only need to test divisibility by whole numbers up to the square root of n, since any factor larger than the square root would have to pair with one smaller than it. Checking 2, 3, and then odd numbers up to √n is enough to confirm or rule out a prime.How many divisors does a prime number have?
Exactly two: 1 and the number itself. This is actually the defining property of a prime number — any number with more than two divisors is composite, and any number with fewer than two divisors (like 1) isn’t considered prime either.Can this checker handle very large numbers?
It works for whole numbers up to 100 trillion using trial division up to the square root of the input. Beyond that range, the numbers get too large to check quickly this way, and the checker will let you know the number is too large.Related Calculators
Prime factorization is the backbone of several other math tools — the GCF calculator and LCM calculator both rely on breaking numbers into their prime factors, and the fraction simplifier uses the same idea to reduce fractions to lowest terms.