A prime number has exactly two factors: 1 and itself. 2, 3, 5, 7 and 11 are prime; 4, 6, 8 and 9 are not. Numbers that are not prime (other than 1) are called composite. This calculator checks any whole number up to 10¹² and shows its factors.
How to use the prime number calculator
Enter a whole number. You will see whether it is prime, its prime factorisation, all its factors and the nearest prime numbers.
How a number is checked
Divide the number by 2 and then by every odd number up to its square root. If none divides it exactly, it is prime. You only need to go up to the square root, because any larger factor would pair with a smaller one you have already tried.
Examples
- 97: no number from 2 to 9 divides it, so it is prime. Its only factors are 1 and 97. The primes around it are 89 and 101.
- 84 = 2² × 3 × 7, so it is composite. It has 12 factors: 1, 2, 3, 4, 6, 7, 12, 14, 21, 28, 42 and 84.
Prime numbers up to 100
2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97. That is 25 primes.
FAQ
Is 1 a prime number?
No. A prime must have exactly two different factors, and 1 has only one. 1 is neither prime nor composite.
Is 2 the only even prime?
Yes. Every other even number can be divided by 2, so it has more than two factors.
How do I find the number of factors?
Write the prime factorisation, add 1 to each power and multiply. For 84 = 2² × 3¹ × 7¹, that is (2 + 1) × (1 + 1) × (1 + 1) = 12 factors.