What is a prime number?
A prime number is a whole number greater than 1 that can only be divided exactly by 1 and itself: 2, 3, 5, 7, 11, 13 and so on. Every other whole number above 1 is composite and can be broken down into primes in exactly one way.
Primes are the building blocks of arithmetic and the basis of the encryption that protects online banking. Students use a checker for homework on factors and divisibility, and puzzle fans to test large numbers. Along with the yes or no answer, this tool gives the full prime factorisation, how many divisors the number has, and the closest primes either side.
How to use the Prime Number Checker
1.Type a whole number
Any number up to about nine quadrillion.
2.Read the verdict
Prime or not, with the prime factorisation.
3.See the neighbours
The nearest primes below and above are shown too.
Example: is 221 prime?
221 looks prime, as it isn't divisible by 2, 3, 5, 7 or 11, but:
- Prime?
- No
- Prime factorisation
- 13 × 17
- Number of divisors
- 4
- Nearest primes
- 211 and 223
221 is the product of two primes, 13 and 17, so it is composite.
How primality is tested
A number is prime if it has exactly two divisors: 1 and itself. The checker tries dividing by 2 and then by odd numbers up to the square root, because any factor larger than the square root pairs with one smaller than it.
The factorisation also gives the number of divisors: add one to each prime's power and multiply. 221 = 13 × 17, so it has (1+1)(1+1) = 4 divisors: 1, 13, 17 and 221.
Frequently asked questions
Is 1 a prime number?
No. A prime needs exactly two different divisors, and 1 has only one.
Is 2 prime?
Yes. It's the only even prime number.
What is prime factorisation?
Writing a number as a product of primes, such as 360 = 2³ × 3² × 5. Every whole number above 1 has exactly one.
How big a number can it check?
Up to 9,007,199,254,740,991, the largest whole number a browser handles exactly. The nearest primes are shown for numbers up to a trillion.
Related tools
GCD and LCM Calculator
Greatest common divisor (HCF) and least common multiple of numbers.
Number Base Converter
Convert numbers between binary, octal, decimal, hex and any base to 36.
Random Number Generator
Random whole or decimal numbers in any range, with or without repeats.
Ratio Calculator
Solve A : B = C : ?, simplify a ratio or split a total in a ratio.
Average Calculator (Mean, Median, Mode)
Mean, median, mode, range and sum of a list of numbers.
Weighted Average Calculator
Average values that count for different amounts, like graded coursework.