Exact browser-local math

Prime Number Calculator

Determine whether a supported integer is prime or composite. Prime numbers are integers greater than one with no positive divisors other than one and themselves.

Enter values and calculate.

Method

Small prime divisors are checked first. Remaining values use a fixed seven-base Miller–Rabin test that is deterministic—not probabilistic—for unsigned 64-bit integers. BigInt arithmetic preserves every input digit.

Worked example

97 is prime. 221 is composite because 221 = 13 × 17. The values 0 and 1 are neither prime nor composite.

Limits and assumptions

Input must be a nonnegative integer no larger than 18,446,744,073,709,551,615 (2^64 − 1). This is a primality test, not a factor finder; use Prime Factorization when the factors themselves are needed.

Exactness and privacy

Supported integer calculations use BigInt and validated text, not floating-point Number conversion. Results are rendered as inert text. This educational calculator does not send calculation values to a server or make professional decisions for you.