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.
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.
| 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 |
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.
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.