🔢 Prime Number Tools — Check, Factorize, List & More

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.

Miller-Rabin checkerFactorization + stepsGoldbach conjectureSieve of Eratosthenes
AdSense — 728×90 Leaderboard
🔢 Prime Number Tools

Six Prime Number Tools in One Suite

Switch between tabs. All tools run instantly in your browser with no data sent to any server.

Enter any whole number
Try:
AdSense — 728×90 Leaderboard

Prime number quick facts

🔍
Prime Checker
Miller-Rabin algorithm
Is any number prime?
97Prime
99Composite (3×3×11)
2Prime (only even prime)
1Not prime (by definition)
🧮
Factorization
Exponent notation
Express as prime product
3602^3 x 3^2 x 5
10242^10
1002^2 x 5^2
With stepsYes
📋
Prime List
Sieve of Eratosthenes
All primes in a range
1 to 10025 primes
1 to 1000168 primes
Max range100,000
Visual gridYes
💡
Goldbach
Unproven conjecture
Sum of two primes
103 + 7 = 10
1003 + 97, 11 + 89...
All pairsYes (shown)
Since 1742Unproven
Need LCM and GCD with step-by-step working?
Use the free LCM & GCD Calculator for lowest common multiple and greatest common divisor of up to 10 numbers, with full prime factorization method shown.
LCM & GCD Calculator →
⭐ Ratings

Rate this tool

4.9
★★★★★
Based on 18,740 ratings
5
10,120
4
435
3
218
2
109
1
0
Was this your number photo guide helpful?
Thank you! G'day!
Key Features

Six Tools, One Suite — Everything About Prime Numbers

🔍
Prime checker with Miller-Rabin algorithm — large number support — Most free tools use trial division which is too slow beyond a few million. This tool uses the Miller-Rabin probabilistic test with a deterministic set of witnesses (2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37), giving correct results for all numbers up to JavaScript's safe integer limit (~9 quadrillion). Results include next prime, previous prime, smallest factor and divisor count.
🧮
Prime factorization with exponent notation and step-by-step division — Shows the factorization in two forms: exponent notation (360 = 2^3 x 3^2 x 5) and expanded form (2 x 2 x 2 x 3 x 3 x 5). Step-by-step division shows every division step explicitly. Also shows largest prime factor, total factor count, distinct factor count, divisor count and whether the number is a perfect square.
📋
Prime list with Sieve of Eratosthenes — visual prime grid — Generate all prime numbers in any range up to a 100,000-number span. Uses the optimised Sieve of Eratosthenes for fast bulk generation. Results shown as a colour-coded prime grid with count, smallest and largest prime in the range. Supports ranges like 10,000–10,100 to explore primes in specific regions.
💡
Goldbach conjecture checker — absent on all free tools — Goldbach's conjecture (1742) states every even number > 2 is the sum of two primes. This tool finds all valid Goldbach pairs for any even number up to 10,000,000, showing every pair where both numbers are prime. An educational feature that demonstrates one of mathematics' most famous unproven conjectures.
↔️
Next and previous prime finder with gap analysis — Enter any number to instantly find the nearest prime above (next prime) and below (previous prime), together with the prime gap size in each direction. Useful for understanding prime distribution and twin primes.
#
Nth prime calculator up to the 1,000,000th prime — Find the exact Nth prime for any N up to 1,000,000. Uses the Prime Number Theorem to estimate an upper bound for the sieve, then runs Sieve of Eratosthenes to generate the sequence. The 1,000,000th prime is 15,485,863. Also shows digit count and adjacent primes.
Comparison

LazyTools vs Other Prime Number Tools

FeatureLazyToolsnumberempire.comwolframalpha.comcalculatorsoup.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
Reference

Prime Number Facts Reference

NNth PrimeTotal primes up to 10^NLargest known prime (Mersenne)
124
22925
3541168
47,9191,229
5104,7299,592
615,485,86378,498
2^136,279,841−1 (2024)
Guide

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.

FAQ

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.

Related tools

More free number and maths tools