Guide: How It Works

Trial division: n is prime if no integer from 2 to √n divides it evenly

Who Is This Calculator For?

  • Students learning number theory
  • Puzzle and cryptography enthusiasts

Examples

Is 29 prime? No divisors from 2 to √29 (~5.4) divide 29 evenly, so yes.

Frequently Asked Questions

Why check only up to the square root of n?

If n has a factor larger than √n, it must also have a corresponding factor smaller than √n, so checking beyond √n is redundant.

Is 1 considered prime?

No, by definition primes are integers greater than 1 with exactly two divisors.

About the Author

This tool is built and maintained by John Britto, a Full-Stack Developer with over 5 years of experience building secure web applications. Our mission is to provide free, private, and reliable tools for everyone.