Digital Solomon is not taking new clients at this time.

← All measures

Prime number test

Math · Tests whether a whole number is prime by trial division, with its smallest factor and the nearest primes either side.

prime if no d from 2 to √n divides n

Result

Turn on JavaScript to calculate.

How it works

A prime has exactly two divisors, 1 and itself. The test divides by 2, 3 and then every number of the form 6k ± 1 up to the square root, found by trial division, so it is exact but slows for numbers beyond a trillion. 1 is not prime.

Results are estimates for learning and planning. Check anything you rely on with a qualified professional.