How the checker works
Last reviewed November 15, 2026
Exact whole numbers
All math uses JavaScript BigInt, so numbers up to 24 digits are handled exactly, without the rounding that ordinary decimals would bring.
Primality
- Numbers below 2 are not prime.
- Divide by each of the 168 primes below 1,000. A match settles it.
- Otherwise run the Miller-Rabin test with the 13 bases 2, 3, 5, … 41. Sorenson and Webster (2017) found that the smallest number that fools all 13 is 3,317,044,064,679,887,385,961,981, about 3.3 × 10²⁴. Every 24-digit number is below that, so the result is a proof, not a probability.
Factoring
Small factors come out by trial division. Anything left that isn't prime is split with Pollard's rho method (Brent's version), repeated until only primes remain. A number made of two large primes of similar size can take a few seconds.
Testing
Automated tests check the count of primes below 100, 1,000 and 10,000 (25, 168 and 1,229), known tricky composites such as the Carmichael number 561 and strong pseudoprimes, large known primes such as 2⁶¹ − 1, and factorizations of products of two 10-digit primes.