Prime Number Checker
Find out whether a whole number is prime, see exactly why, then explore its factors and nearby primes.
Enter a whole number
No divisor other than 1 and 97 exists.
Fast checks
List primes in a range
Train prime intuition
Loading…
Prime, composite, factors and next-prime questions rotate every day.
Prime patterns worth knowing
1 is not prime
A prime has exactly two positive divisors. One has only one.
2 is special
Two is the only even prime. Every larger even integer is composite.
√n is enough
If n = a × b, one factor must be at or below √n. That is why a small divisor proves compositeness quickly.
Primes build integers
Every integer greater than one has a unique prime factorization, apart from order.
How the exact test workssmall factors · deterministic Miller–Rabin · factor witness
Inputs are parsed as JavaScript BigInt, never as floating-point Number. Small prime divisors are checked first. Remaining unsigned 64-bit values use a fixed seven-base Miller–Rabin set known to be deterministic across the entire 64-bit range.
Composite values are factored locally with small-prime division plus Pollard’s rho, so the result can show a concrete factor witness rather than only saying “not prime.” Range exploration uses a segmented sieve and is intentionally capped to keep the interface instant.