Check If a Number Is Prime & Factorize It

A prime is a number greater than one divisible only by one and itself. This tool does three jobs: it tests whether a number is prime, finds the nearest primes below and above it, and if the number is composite it breaks it into prime factors, 360 becomes 2 × 2 × 2 × 3 × 3 × 5. The method is trial division: divisors are tested up to the square root, which is fast for ordinary numbers. Values in the billions can take a few seconds, since the larger the number the more divisions are needed. Everything happens locally in the browser.

This tool runs entirely in your browser. No data is sent to any server.

How to use it

  1. 1

    Type the number into the box; it must be greater than 1.

  2. 2

    Read the prime verdict and the nearest primes in the cards.

  3. 3

    Check the factorisation row below; for a prime it simply shows the number itself.

Frequently asked questions

Why is 1 not a prime?

By definition a prime has exactly two positive divisors, and 1 has only one. That is also what makes unique factorisation work.

What is factorisation useful for?

Simplifying fractions, finding greatest common divisors and least common multiples, and in cryptography, whose security rests on how hard it is to factor large numbers. This tool does the basic version.

Does it slow down for very large numbers?

Yes. Trial division runs up to the square root, so time grows with the number. Values with dozens of digits need more advanced algorithms.