Prime Number Checker
Check whether a number is prime, see its prime factors and find the next and previous primes.
Numbers from 0 to 2^64 are supported.
What is a prime number?
A prime is a natural number greater than 1 that is divisible only by 1 and itself: 2, 3, 5, 7, 11, 13… Primes are the building blocks of mathematics and the foundation of modern encryption such as RSA.
What the tool does
- Checks whether a number is prime
- Factorises composite numbers (e.g. 360 = 2³ × 3² × 5)
- Finds the next and previous prime
Fast for big numbers
It uses a deterministic Miller–Rabin test and Pollard's rho factorisation, so even 19-digit numbers are answered instantly. Useful for homework, olympiad practice and programming contests.
How to use Prime Number Checker
- Enter the number to check.
- See instantly whether it's prime.
- If not, review its prime factorisation.
- Look at the next and previous primes.
Why use this tool?
Gives exact results even for huge numbers without trial division by hand.
FAQ
Is 1 a prime number?
No. By definition a prime has exactly two distinct divisors; 1 has only one.
Why is 2 the only even prime?
Every other even number is divisible by 2 and so has at least three divisors.
What is the largest prime?
There are infinitely many primes; the largest known ones are Mersenne primes with millions of digits.
Related tools
Number Base Converter
Convert between binary, octal, decimal, hexadecimal and any base from 2 to 36; e.g. 255 = FF.
Open toolRandom Number Generator
Generate one or thousands of random numbers in a range, with or without repeats, sorted or shuffled.
Open toolRoman Numeral Converter
Convert numbers to Roman numerals and back (2026 → MMXXVI); invalid numerals are flagged instantly.
Open toolMean, Median and Mode Calculator
Paste a list of numbers and get count, sum, mean, median, mode, min, max and range instantly.
Open tool