Prime Number Tools Check, Factorize, List & More
Six prime number tools in one suite. Check if any number is prime using the Miller-Rabin algorithm. Get the prime factorization with step-by-step division. Generate primes in a range using the Sieve of Eratosthenes. Find the next or previous prime. Calculate the Nth prime. Test Goldbach's conjecture on any even number. All free, browser-side, no login.
Six Prime Number Tools in One Suite
Switch between tabs. All tools run instantly in your browser with no data sent to any server.
Prime number quick facts
Rate this tool
Six Tools, One Suite — Everything About Prime Numbers
LazyTools vs Other Prime Number Tools
| Feature | LazyTools | numberempire.com | wolframalpha.com | calculatorsoup.com |
|---|---|---|---|---|
| Prime checker | ✅ Miller-Rabin | ⚠ Trial division | ✅ Yes | ⚠ Limited |
| Large number support | ✅ Up to 10^15 | ❌ Small only | ✅ Yes | ❌ Limited |
| Prime factorization + steps | ✅ Yes | ✅ Yes | ⚠ Paid | ✅ Yes |
| Prime list in range | ✅ Yes (sieve) | ✅ Yes | ⚠ Limited | ⚠ Limited |
| Nth prime calculator | ✅ Up to 1M | ❌ No | ⚠ Paid | ❌ No |
| Goldbach conjecture checker | ✅ Yes (all pairs) | ❌ No | ⚠ Paid | ❌ No |
| Free, no account | ✅ Yes | ✅ Yes | ❌ Paywalled | ✅ Yes |
| All tools in one page | ✅ Yes | ❌ Separate pages | ❌ Separate | ❌ Separate |
Prime Number Facts Reference
| N | Nth Prime | Total primes up to 10^N | Largest known prime (Mersenne) |
|---|---|---|---|
| 1 | 2 | 4 | — |
| 2 | 29 | 25 | — |
| 3 | 541 | 168 | — |
| 4 | 7,919 | 1,229 | — |
| 5 | 104,729 | 9,592 | — |
| 6 | 15,485,863 | 78,498 | — |
| — | — | — | 2^136,279,841−1 (2024) |
Prime Numbers — From Definition to Goldbach and Beyond
What is a prime number?
A prime number is a positive integer greater than 1 that has exactly two distinct positive divisors: 1 and itself. The first few primes are 2, 3, 5, 7, 11, 13, 17, 19, 23, 29. The number 2 is the only even prime — all other even numbers are divisible by 2 and therefore composite. The number 1 is excluded from the primes by definition to preserve the uniqueness of prime factorization: if 1 were prime, the factorization of 12 could be written as 2^2 x 3 or 1 x 2^2 x 3 or 1^100 x 2^2 x 3, destroying the uniqueness guaranteed by the Fundamental Theorem of Arithmetic.
The Miller-Rabin primality test
Trial division (checking all divisors up to the square root) is fine for small numbers but becomes impractical for large ones: checking a 15-digit number would require testing up to 30 million potential factors. The Miller-Rabin probabilistic test is vastly faster. It works by expressing n-1 as 2^r x d, then checking modular exponentiations against "witness" values. A single round is probabilistic, but using the witnesses {2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37} together gives a deterministic result for all n < 3.3 x 10^24. This tool uses BigInt arithmetic for precise modular multiplication, enabling accurate primality testing for large numbers.
The Sieve of Eratosthenes
The Sieve of Eratosthenes (c.240 BC) generates all primes up to a limit n. Start with a Boolean array of size n+1, all set to true. Mark 0 and 1 as non-prime. For each prime p starting at 2, mark all multiples of p (starting at p^2) as non-prime. Continue until p^2 > n. All remaining unmarked numbers are prime. The algorithm's time complexity is O(n log log n) and it is highly cache-efficient for generating large prime lists in a range.
Goldbach's conjecture — the oldest unsolved problem
Christian Goldbach wrote to Leonhard Euler in 1742 proposing that every integer greater than 2 can be expressed as the sum of three primes (in the notation of the time, where 1 was considered prime). Euler refined it to the modern form: every even integer greater than 2 is the sum of two primes. Despite being verified for every even number up to 4 x 10^18 and representing one of the most numerically tested conjectures in mathematics, no proof has been found in over 280 years. It remains one of the most famous open problems in pure mathematics.
Frequently Asked Questions
A prime is divisible only by 1 and itself. For small numbers, check all divisors up to the square root. For large numbers, this tool uses the Miller-Rabin test with deterministic witnesses for fast, accurate results up to 10^15.
Prime factorization expresses a composite number as a product of primes. Every composite number has exactly one prime factorization (Fundamental Theorem of Arithmetic). Example: 360 = 2^3 x 3^2 x 5. Use the Factorize tab to see step-by-step division.
No. 1 has only one divisor (itself), but primes require exactly two distinct divisors. Excluding 1 from the primes preserves the uniqueness of prime factorization. 2 is the smallest and only even prime.
Goldbach's conjecture (1742) states every even integer > 2 is the sum of two primes. Example: 100 = 3+97 = 11+89 = 17+83 = 29+71 = 41+59 = 47+53. It has been verified up to 4 x 10^18 but never proved. Use the Goldbach tab to find all pairs for any even number.
1st prime: 2. 10th: 29. 100th: 541. 1000th: 7919. 10,000th: 104,729. 1,000,000th: 15,485,863. Use the Nth Prime tab to find any prime up to the 1,000,000th.
Enter any number in the Is it Prime? tab and click Check. Shows whether the number is prime, its prime factors if composite, next and previous prime, and divisor count. Uses Miller-Rabin for accuracy on large numbers. Free, no account.
Use the List Primes tab. Enter a start and end value (max span 100,000). The tool uses the Sieve of Eratosthenes to generate all primes in the range and displays them as a visual grid with count, smallest and largest prime shown.
An ancient algorithm (c.240 BC) for finding all primes up to a limit. Mark every multiple of each prime as composite, starting from 2. Remaining unmarked numbers are prime. Efficient (O(n log log n)) and used by this tool to generate prime lists in a range.