P?

Prime Number Checker

Check whether a number is prime and, if not, show its prime factorization. In the browser.

Live·100% in your browser — no upload

What is Prime Number Checker

The Prime Number Checker tests whether an integer is prime, i.e. divisible only by 1 and itself. If the number is not prime, it shows its prime factorization.

The check uses an efficient division test and runs entirely in the browser.

How it works

  1. Enter an integer.
  2. The result (prime or not) appears immediately.
  3. If it is not prime, you see its prime factors.
  4. Change the number for a new instant check.

Frequently Asked Questions

Up to what number does it work?
It works well with integers handled exactly by JavaScript (up to about 9 quadrillion). Beyond that, precision is not guaranteed.
What is prime factorization?
The set of prime numbers that, multiplied together, give the number (e.g. 12 = 2 × 2 × 3). It is used in math, cryptography and simplifying fractions.
Is 1 a prime number?
No. By definition prime numbers are greater than 1; 1 and 0 are not considered prime.

Related tools