Largest N-Digit Prime Number Calculator
Choose the number of decimal digits and search downward from 10ᵈ − 1 to find the greatest prime that still has exactly d digits.
Largest N-Digit Prime Number Calculator inputs
The controls and limits below belong only to this prime calculation.
Largest N-Digit Prime Number Calculator results
How the largest n digit prime number tool works
This page targets one distinct largest-prime search intent. It separates finite answers, known records, probable-prime status and formal proof instead of merging them into a generic prime checker.
Digit bounds define the problem
A d-digit positive integer begins at 10ᵈ⁻¹ and ends at 10ᵈ − 1. The calculator starts at the upper boundary and descends until it finds a prime without crossing the lower boundary.
Two-digit and three-digit answers
The greatest two-digit prime is 97. The greatest three-digit prime is 997. These familiar answers are special cases of the general digit-length method rather than separately memorized rules.
Last-digit elimination
Every prime greater than 5 ends in 1, 3, 7 or 9. The engine skips even candidates and multiples of 5 before stronger tests. It also checks divisibility by a table of small primes.
Certainty for giant results
For results below 2⁶⁴, the implemented Miller–Rabin witness set is deterministic. Longer results are clearly labeled probable primes. Producing a formal certificate for hundreds of digits requires additional specialized proof software.
Why the greatest candidate is often close to 10ᵈ
The expected spacing between primes near x is approximately ln(x), but this is an average, not a guaranteed bound. The search log shows how many candidates were actually rejected.
Safe browser limits
The calculator allows up to 500 digits and a visible candidate cap. Those limits keep the interface responsive while still extending far beyond ordinary school examples.
Largest N-Digit Prime Number Calculator questions
What is the largest two-digit prime?
97.
What is the largest three-digit prime?
997.
Can the calculator find a 100-digit prime?
Yes, but it is reported as a probable prime unless an external formal certificate is produced.
Why can the answer not end in 0, 2, 4, 5, 6 or 8?
Any multi-digit number with those endings is divisible by 2 or 5.