Primality Checker

Determine exactly whether an integer from 2 to one trillion is prime or composite.

Accepts integers from 2 to 1,000,000,000,000. Uses exact bounded trial division, not a probabilistic primality score.

Inputs are processed in this browser and are not uploaded.

Primality Checker: inspect an exact integer result

Determine exactly whether an integer from 2 to one trillion is prime or composite. Enter the labeled integer fields and choose Calculate. Load example (replaces inputs) supplies a reproducible case; it clears any earlier result.

Work through the example

97 is prime. Its displayed prime factor is 97 itself. Change the input to 91 to obtain composite with smallest prime factor 7, since 91 = 7 × 13.

Calculation convention

An integer greater than one is prime when its only positive divisors are one and itself. The tool looks for factors using integer arithmetic and reports the smallest prime factor for a composite number. A prime number reports itself in that field.

Supported inputs and limitations

The input domain starts at two. One, zero, negative values, decimal notation and values above one trillion are rejected. This limit avoids implying support for cryptographic-size primes; no randomness or confidence percentage is used.

A composite result is accompanied by a divisor you can check: divide the original number by the displayed smallest prime factor. For a prime result, that field equals the original number. Copy results keeps the classification and factor together. Editing the input clears both values.

Use Prime Factorization Calculator for all prime powers, rather than only the smallest factor.