01What is Prime Number Checker?
Is 91 prime? It looks like it should be. It is odd, it doesn't end in 5, and its digits don't add up to a multiple of 3. But 91 is 7 × 13. This checker answers questions like that instantly, and it keeps working long after mental arithmetic gives up. There are two modes. Check Number tests one value. Find in Range lists every prime between a From and a To bound. Input is read as a JavaScript BigInt, not a regular Number. Regular numbers lose precision above 2^53, about 9 × 10^15. With BigInt, a 30-digit value is checked exactly as typed. Anything that isn't a digit is stripped as you type, so negatives and decimals can't get in. Here's how the test works. The tool first divides by the thirteen primes from 2 to 41. That settles small numbers and catches most composites straight away. Everything else goes through the Miller-Rabin test, using those same thirteen primes as bases. Published research, listed in the OEIS as sequence A014233, shows that this set of bases gives an exact answer for every number below 3,317,044,064,679,887,385,961,981. That's roughly 3.3 × 10^24. Above that bound nobody has proven the bases are enough. So a pass up there is labelled "a probable prime", while a fail is always a definite composite. When a number is composite, the tool also looks for its smallest factor by trial division, up to one million. For 561 you see "561 is not a prime number (divisible by 3)". If the smallest factor is bigger than one million, you only get the verdict. It won't give you a full factorization. 0 and 1 are reported as not prime, with a short note that primes start at 2. Find in Range checks each number in turn with the same test. To keep the page responsive it stops after 500 primes or a span of one million numbers. When that happens, the count line says the list was cut short. From 1 to 100000, for example, you get the first 500 primes, ending at 3571. All of this runs in your browser tab. The numbers you test are not uploaded anywhere. One honest caveat. This is a handy check for homework, puzzles, test data and hash table sizes. If you need primes for real cryptographic keys, use a vetted crypto library, which also handles random generation and side-channel concerns.
Computer science students learning number theory, developers picking prime moduli or table sizes, and puzzle solvers checking an answer. The tool runs entirely in your browser, so your data never leaves your device.
02How to use Prime Number Checker
- Choose Check Number and type a whole number; non-digit characters are removed as you type.
- Read the verdict, plus the smallest divisor when the number is composite and has one under one million.
- Switch to Find in Range and fill in From and To.
- Read the primes found count and the list below it; a note appears if the list stopped early.
03Worked examples
- Input:
Check 91 - Result:
91 is not a prime number (divisible by 7) - 91 = 7 × 13, an easy one to mistake for prime.
- Input:
Check 561 - Result:
561 is not a prime number (divisible by 3) - The smallest Carmichael number. Miller-Rabin catches it.
- Input:
Check 9007199254740993 - Result:
9007199254740993 is not a prime number (divisible by 3) - That is 2^53 + 1, beyond exact Number range, handled as BigInt.
- Input:
Check 2305843009213693951 - Result:
2305843009213693951 is a prime number - The Mersenne prime 2^61 − 1, below the proven bound so not marked probable.
- Input:
Check 1 - Result:
1 is not a prime number (primes start at 2) - Input:
Range 90 to 110 - Result:
97, 101, 103, 107, 109 - Count line reads 5 primes found.
04Common use cases
- Checking whether a number from a homework problem or puzzle is prime
- Confirming that a modulus you picked for a hash function or test fixture is actually prime
- Finding a prime hash table size just above a target capacity with Find in Range
- Testing Mersenne numbers such as 2^61 − 1 (2305843009213693951) without precision loss
- Spotting the trap in values like 9007199254740993, which a plain JavaScript Number can't even store
- Producing a short list of primes for unit test data
05Tips
- 9007199254740993 is 2^53 + 1. A plain Number rounds it to 2^53, but this tool reads it as BigInt and finds it divisible by 3.
- 561 is a Carmichael number that fools the simple Fermat test. Miller-Rabin rejects it, which is why the tool uses it.
- For hash tables, search a range just above your expected size and pick the first prime listed.
- No divisor shown for a composite just means its smallest factor is above one million. The composite verdict is still certain.
- Range mode caps at 500 primes, so narrow the bounds if you need primes near a large value.
06Related concepts
Miller-Rabin test, BigInt, Carmichael numbers, Trial division, Mersenne primes.
Frequently Asked Questions
What is Prime Number Checker?
Prime Number Checker is a free, browser-based developer tool on AIDToolStack. Check if a number is prime and find all primes in a given range. It requires no installation or sign-up and works entirely in your browser.
Is Prime Number Checker free to use?
Yes. No sign-up, no fees and no usage cap.
Does Prime Number Checker store my data?
No. It runs in your browser; nothing is uploaded.