Prime Number Checker
Is n prime? Trial division up to √n; identifies smallest divisor and nearest primes if composite.
Result
General calculation reads
Amazon affiliateAs an Amazon Associate we may earn from qualifying purchases. This does not add cost for you.
How to use this calculator
- Enter integer.
- Read result + nearest primes.
About this calculator
A prime is a positive integer >1 with exactly two divisors: 1 and itself. The 6k±1 trial-division algorithm tests divisors up to √n: every prime >3 is of form 6k±1, so we skip 2/3 of integers. For n up to 10^15, this finishes in milliseconds. Beyond that, probabilistic tests (Miller-Rabin) are used. Famous primes: 2 (only even), 7 (Mersenne), 25-million-digit primes for crypto.
Frequently asked
Is 1 prime?+
Is 0 prime?+
Why test up to √n?+
Why 6k±1 optimization?+
How many primes?+
Related calculators
More tools you might like
Hand-picked tools that pair well with this one — same audience, same intent.
n = p₁^a₁ × p₂^a₂ × … Trial division to find all prime factors with multiplicity.
lcm(a,b) = |a × b| / gcd(a,b). Smallest number that both a and b divide evenly.
Euclidean algorithm: gcd(a,b) = gcd(b, a mod b). Supports 2-6 integers.
n! = 1 × 2 × … × n. Computes exactly up to 21! (number limit); approximate via Stirling for larger.
Convert decimal ↔ scientific notation. Standard form a × 10^b with 1 ≤ |a| < 10.
Audit a Closing Disclosure (CD) PDF — checks expected form fields are present and lists missing or empty critical fields.