Prime Number Calculator
Check whether a whole number is prime or composite with our free Prime Number Calculator.
Enter a number to see whether it is prime, along with its factors and a simple explanation of the result.
Check a Number
Enter a whole number to determine whether it is prime or composite.
Prime Number Result
What Is a Prime Number?
A prime number is a whole number greater than 1 that has exactly two positive factors: 1 and the number itself.
For example, 7 is prime because its only positive factors are 1 and 7.
In contrast, 12 is not prime because it can be divided evenly by 1, 2, 3, 4, 6, and 12.
Prime vs. Composite Numbers
| Number | Type | Factors |
|---|---|---|
| 2 | Prime | 1, 2 |
| 3 | Prime | 1, 3 |
| 5 | Prime | 1, 5 |
| 7 | Prime | 1, 7 |
| 11 | Prime | 1, 11 |
| 12 | Composite | 1, 2, 3, 4, 6, 12 |
| 15 | Composite | 1, 3, 5, 15 |
| 20 | Composite | 1, 2, 4, 5, 10, 20 |
How to Use the Prime Number Calculator
- Enter a whole number greater than 1.
- Click Check Number.
- View whether the number is prime or composite.
- Review the factors and calculation explanation.
- Click Reset to check another number.
Prime Number Examples
Example 1: 13 is prime because its only positive factors are 1 and 13.
Example 2: 29 is prime because it cannot be evenly divided by any whole number other than 1 and 29.
Example 3: 36 is composite because it has several factors, including 2, 3, 4, 6, 9, and 12.
Special Cases
1 is not a prime number. It has only one positive factor, while a prime number must have exactly two.
2 is the only even prime number. Every other even number greater than 2 is divisible by 2 and therefore is composite.
Negative numbers and non-whole numbers are outside the scope of this prime-number calculator.
Frequently Asked Questions
What is the smallest prime number?
The smallest prime number is 2.
Is 1 a prime number?
No. The number 1 has only one positive factor, so it is not considered prime.
Is 2 a prime number?
Yes. 2 has exactly two positive factors: 1 and 2.
Is every odd number prime?
No. Some odd numbers are composite. For example, 9, 15, and 21 are odd but are not prime.
What is a composite number?
A composite number is a whole number greater than 1 that has more than two positive factors.