Prime Number Checker
All Factors
How to Use This Checker
Type any whole number into the input field and press Check. The tool instantly tells you whether the number is prime or composite. If it is composite, you will also see all its factors displayed as animated bubbles. Try entering numbers like 17, 49, or 97 to see how they differ.
What Makes a Number Prime
A prime number has exactly two factors: 1 and itself. That is the whole definition. 7 is prime because the only numbers that divide evenly into 7 are 1 and 7. 8 is not prime because you can also divide it by 2 and 4.
The number 1 is not prime. It only has one factor, which is itself. Prime numbers must have exactly two factors. The number 2 is the only even prime. Every other even number is divisible by 2, so it has more than two factors.
Prime Numbers Up to 100
| Range | Prime Numbers |
|---|---|
| 1 to 20 | 2, 3, 5, 7, 11, 13, 17, 19 |
| 21 to 50 | 23, 29, 31, 37, 41, 43, 47 |
| 51 to 100 | 53, 59, 61, 67, 71, 73, 79, 83, 89, 97 |
How to Test for Primality
To check if n is prime, test whether any number from 2 up to the square root of n divides it evenly. You only need to go to the square root because any factor bigger than that would be paired with one smaller than it, and you would have found that one already.
To test 37: the square root of 37 is about 6.08, so you only check 2, 3, 4, 5, and 6. None of them divide 37 evenly, so 37 is prime. Testing stops early, which makes the process fast.
Prime Factorization
Every composite number can be broken down into prime numbers multiplied together. This is called prime factorization. For example, 60 = 2 × 2 × 3 × 5. A factor tree helps you find this: start with the number and split it into two factors, then split each of those until all the pieces are prime.
The Fundamental Theorem of Arithmetic says this breakdown is always unique. No matter how you get there, 60 always factors down to 2 × 2 × 3 × 5.
Common Mistakes to Avoid
- Thinking 1 is prime. It is not. Prime numbers must have exactly two factors, and 1 only has one.
- Forgetting that 2 is prime. It is the only even prime number.
- Stopping a primality test too early. You must check all numbers up to the square root.
- Confusing factors with multiples. Factors divide evenly into a number. Multiples are the products of that number.