Free Online Prime Number Checker
Enter a number from 2 up to 9,000,000,000,000,000. A composite number is broken into prime factors, shown with exponents where they repeat.
A prime number has exactly two divisors, one and itself, and people check them for many reasons. Students confirm homework answers or practise factorisation, and programmers testing hashing or cryptography exercises need a quick sanity check on a candidate. Puzzle fans and teachers like to find the next prime after a given number, and anyone simplifying a fraction can use the factor list to spot common divisors. Testing divisibility by hand becomes slow and error-prone once numbers pass a few hundred, which is where a checker is handy.
Type a whole number into the single Whole number field, which starts at 97, and press Calculate. The panel reports three lines. Is it prime? answers with a plain yes or no, Prime factors lists the factorisation, with repeated factors written using a caret exponent and a multiplication sign between different primes, and Next prime gives the smallest prime above your number. Change the value and press the button again to check another number. There is nothing else to configure.
The accepted range is whole numbers from 2 up to 9,000,000,000,000,000, and anything else, including decimals, negatives, 0 and 1, shows an error. The number 1 is excluded because it is neither prime nor composite. The method is trial division up to the square root, so numbers in the quadrillions that turn out to be prime can take a noticeable moment to finish. The Next prime search looks only a few thousand numbers ahead, which is far more than normal gaps between primes at this size, so you can rely on it in practice.
Take 360. The checker answers that it is composite, lists the prime factors as 2^3 × 3^2 × 5, which you can verify since 8 times 9 times 5 equals 360, and gives 367 as the next prime, because 361 is 19 squared and 362 to 366 each have a small divisor. Try 97 next. It is prime, its only factor is itself, and the next prime is 101. Repeated twos at the start of a factor list also tell you that the number is even.
Key Highlights:
- Free to use, no signup
- Instant results
- Processed in your browser
- Works on mobile and desktop

