Find the prime factorisation of a whole number, with the divisor count and sum, using Pollard’s rho for large factors.
Prime Checker
Check whether a number is prime, distinguishing a proof from strong evidence and naming a factor when it is composite.
- Free
- No sign-up
- Runs in your browser
Input
A whole number. Very large values are supported.
Try an example
Ready
Everything happens on this device. No upload, no account, no network request.
How to use this tool
- 1
Enter a whole number.
- 2
The verdict says whether it is proven or probable, and names the smallest factor found when the number is composite.
Questions about Prime Checker
Is the answer certain?
For any number below 3.3 x 10^24, yes - it is a proof. Miller-Rabin with the first thirteen primes as witnesses has been verified to have no composite counterexample below that bound, so passing it is conclusive. Above the bound the same test is overwhelming evidence but not a proof, and the result says "strong probable prime" rather than "prime". A composite verdict is always certain at any size, because a single failing witness proves compositeness outright.
Why is 1 not prime?
A prime has exactly two distinct positive divisors. 1 has one. The exclusion is not arbitrary bookkeeping: if 1 counted as prime then 12 could be written as 2 x 2 x 3 or 1 x 2 x 2 x 3 or 1 x 1 x 2 x 2 x 3, and the uniqueness of prime factorisation - the fundamental theorem of arithmetic - would be lost.
What is a Carmichael number?
A composite that passes the simpler Fermat test for every base coprime to it. 561, 1105 and 1729 are the first three. A tool built on the Fermat test calls all of them prime. Miller-Rabin is used here precisely because it is not fooled by them, and the test suite checks all seven of the smallest.
Is my data sent anywhere?
No. This runs as JavaScript in your browser tab: there is no network request carrying your numbers, nothing reaches a server log, and it keeps working with your connection off. You can confirm it in the browser’s network panel.
Does the Prime Checker work offline?
Yes. Once the page has loaded it runs entirely as JavaScript on your own device, so the Prime Checker keeps working with the network switched off and nothing is ever sent to a server.
Related tools
Other tools you might reach for next.
Find the greatest common divisor of two or more whole numbers, with Euclid's steps and the Bezout coefficients.
Find the least common multiple of two or more whole numbers, exactly.
Evaluate an expression with exact fraction arithmetic, trigonometry, logarithms and factorials, reporting whether the result is exact.
Reduce a fraction to lowest terms, with its mixed number and exact decimal form including any repeating block.
Add two fractions exactly, showing the common denominator step and reducing the result.
Subtract one fraction from another exactly, showing the common denominator step.
Multiply two fractions exactly, multiplying across and reducing the result.