Is this prime?

This site has one job: to tell you whether a given number is prime or not.

If you go to, for example, isthisprime.com/57, it will tell you that 57 is not a prime number.

How it works

For numbers up to 10 digits long, it uses the deterministic Miller test to determine if the number is prime, with 100% certainty. This is a remarkably clever algorithm which can decide primality in logarithmic time.

For larger numbers, it uses the probabilistic Miller-Rabin test to make a pretty good guess about whether the given number is prime. "Pretty good" in this case means "practically certain" - you're very unlikely to type in a number which the algorithm says is probably prime but which is in fact composite. However, when the algorithm says a number is composite, it's definitely composite.

If I was cleverer, I'd pay more attention to the intricacies of these tests to make them run faster and be more certain, but I'm already at the edge of my understanding.

Extras

You can turn on screensaver mode by adding ?screensaver to the end of the URL, e.g. isthisprime.com/57?screensaver. It'll automatically move on to the next number every 5 seconds.

If you would rather decide what's prime and what's not, try the Is this prime? game.