Prime Number Checker
Check whether a number is prime and see its factors.
Primes found
—
About this tool
Enter one or more whole numbers — separated by commas, spaces, or line breaks — to check which are prime (a number greater than 1 whose only divisors are 1 and itself) and see each one's complete list of factors. The check runs instantly in your browser, whether you paste in a single number or a long list.
How the check works. The tool uses trial division: it tests whether the number is divisible by 2, then by each odd number up to the square root of the input. You only need to test up to the square root, because if a number n has a factor larger than √n, it must also have the matching factor smaller than √n, which would have been found already. If nothing divides it evenly, it's prime.
Worked examples. 97: not divisible by 2, 3, 5, or 7, and √97 ≈ 9.8, so there's nothing left to test — prime. 91: looks prime at a glance, but 7 × 13 = 91, so it's composite. 1: not prime, because the definition requires exactly two distinct divisors and 1 has only one.
The edge cases.
- 1 is neither prime nor composite — it's a unit. Excluding it keeps the fundamental theorem of arithmetic (every integer has one unique prime factorisation) true.
- 2 is prime — the only even prime. Every other even number is divisible by 2.
- 0 and negative numbers are outside the definition, which applies to integers greater than 1. The tool reports them as not prime rather than erroring.
Speed. Trial division is instant for numbers up to many digits. Very large numbers (hundreds of digits, as used in cryptography) need probabilistic tests like Miller–Rabin instead — this tool is built for everyday numbers, homework, and quick checks, not for factoring RSA keys.
Prime factors vs. all factors. The factor list shows every divisor. The prime factorisation is the subset of prime building blocks multiplied together — for 90 that's 2 × 3² × 5. To find the greatest common divisor or least common multiple of two numbers from their factorisations, use the GCD & LCM calculator.
Frequently asked questions
- Is 1 a prime number?
- No. A prime has exactly two distinct divisors (1 and itself). 1 has only one divisor, so it's classed as neither prime nor composite.
- Is 2 prime?
- Yes — it's the smallest prime and the only even one. Every larger even number is divisible by 2.
- What about 0 or negative numbers?
- Primality is defined for integers greater than 1, so 0, 1, and negatives are all reported as not prime.
- How large a number can I check?
- Everyday and multi-digit numbers are instant. Very large numbers slow down because this uses straightforward trial division rather than an advanced primality test.
- Why does 91 (or 51, or 87) come up as not prime?
- They have non-obvious factors: 91 = 7 × 13, 51 = 3 × 17, 87 = 3 × 29. Numbers ending in 1, 3, 7, or 9 aren't automatically prime.
- What's the difference between the factor list and prime factorisation?
- The factor list is every divisor. The prime factorisation is only the prime ones, multiplied (with exponents) to rebuild the number — e.g. 90 = 2 × 3² × 5.
- Can I check more than one number at once?
- Yes — separate numbers with commas, spaces, or line breaks and every one is checked and listed individually, up to 500 numbers per batch. Entries that aren't whole numbers are listed with a reason instead of being silently dropped.