A prime input
104729 is prime: no integer from 2 through its square-root bound divides it evenly.
Check whether a whole number is prime using exact integer arithmetic. For a composite number, the result includes the smallest prime divisor and a matching factor pair, giving you a concrete reason the number is not prime.
Calculations run locally in your browser. This tool does not upload the numbers you enter.
Enter a whole integer from 0 through 1,000,000,000,000 without commas or scientific notation.
Select Calculate to run the exact check. A composite result includes a factor pair.
Load the example to check 104729, clear the input to start again, or copy and download your result.
104729 is prime: no integer from 2 through its square-root bound divides it evenly.
221 is composite. Its smallest prime divisor is 13, and 13 × 17 = 221.
If a positive integer has a nontrivial factor pair, at least one of the factors cannot exceed its square root. The checker tests 2 and 3 first, then possible divisors of the forms 6k − 1 and 6k + 1. It stops at the first divisor or when the divisor squared exceeds the input.
A prime is an integer greater than 1 with no positive divisors other than 1 and itself. Composite integers have another divisor. Zero and one are neither prime nor composite; they are reported separately rather than being mislabeled as composite.
The input and divisibility operations use JavaScript BigInt, avoiding floating-point rounding of integers. The upper bound limits the trial-division work in your browser. This tool does not make probabilistic guesses or claim to test cryptographic-size candidates.
Two has exactly two positive divisors, 1 and 2. It is also the only even prime.
This checker uses the usual positive-integer definition and accepts zero through one trillion. Negative integers are outside its input range.
Trial division becomes slow for large prime candidates. The stated bound keeps a worst-case check limited to divisors below one million.
No. This is an educational integer checker with a small bound, not a cryptographic prime generator.