Enter a whole number to check if it is prime or not. If it isn’t prime, you also get 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 to Check if a Number Is Prime or Not
Try dividing it by every whole number from 2 up to its square root. If none divides evenly, it is prime. For 97, the square root is about 9.85, so you test 2, 3, 5 and 7; none fits, so 97 is prime. For 91, 7 divides it, so it is not.
- Find the square root: √91 ≈ 9.54.
- Test 2, 3, 5 and 7 (the primes up to 9.54).
- 91 ÷ 7 = 13 exactly, so 91 is composite: 7 × 13.
What the Checker Does
It tests any whole number you enter against the rule that a prime has exactly two positive divisors, 1 and itself. If the number isn’t prime, it also lists every divisor and breaks the number 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² |
Quick Checks Before You Type
A few filters rule out most numbers in seconds, and the divisor list is often the more useful part of the answer. A number’s smallest prime factor tells you straight away how to start simplifying a fraction.
- Enter whole numbers only. Primality is defined for integers greater than 1, so 0, 1, negatives and decimals are never prime.
- Any even number above 2, and any number above 5 ending in 5, fails straight away.
- If the digits add up to a multiple of 3, so does the number. Is 51 a prime number or a composite number? Its digits add to 6, so it is 3 × 17.
To check if a large number is prime by hand, you still only test up to its square root, which is the classic trial-division method. The tool runs that for numbers up to 100 trillion. It is not a cryptography tool, though; the primes used in encryption run to hundreds of digits. For the theory, see the prime number article on Wikipedia.
Common questions about prime numbers
Is 91 a prime number or not?
No. 91 = 7 × 13, so it is composite. It catches people out because it is odd, does not end in 5 and its digits don’t add up to a multiple of 3.Is 1 a prime number? Why or why not?
No. A prime number must have exactly two distinct divisors, 1 and itself, but 1 only has one divisor. So 1 is neither prime nor composite, a special case the checker flags directly.Is 51 a prime number or a composite number?
51 is composite, because 51 = 3 × 17. Its digits add to 6, a multiple of 3, which is the quick giveaway. The same trick shows 57 = 3 × 19.How do you check if a large number is prime?
You only need to test divisibility up to the square root of n, since any larger factor pairs with a smaller one. This checker uses that trial division for whole numbers up to 100 trillion and tells you when a number is too large.Why is 2 the only even prime number?
Every even number greater than 2 is divisible by 2 as well as by 1 and itself, which gives it at least three divisors. 2 is the only even number where that extra divisor doesn’t exist.What’s the difference between divisors and prime factorization?
Divisors are every whole number that divides n evenly, including 1 and n, so 100 has 9 divisors. Prime factorization is the set of primes that multiply to make n, such as 2² × 5² for 100.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.