Prime Number Checker

Live

Prime Number Checker tells you whether a whole number is prime.

Runs in your browser: what you enter is processed on your device and not uploaded to MyToolDock.

Uses trial division by 2, 3 and numbers of the form 6k plus or minus 1 up to the square root, which is exact for every whole number this page accepts. Very large primes can take a second or two.

What is Prime Number Checker?

Prime Number Checker tells you whether a whole number is prime. If it is not, it shows the prime factorization, and it also finds the next and previous prime. Numbers above about 9 quadrillion are rejected so every answer stays exact. Very large primes can take a second or two to confirm.

How It Works

  1. Enter a whole number from 0 up to 9,007,199,254,740,991 in the input fields on this page.
  2. Press the button to run Prime Number Checker.
  3. Read yes or no, the prime factors, the smallest factor, and the nearest primes either side in the result area, and copy or download it.

Common Uses

Good to Know

Commas and spaces in the number are ignored, so you can paste 1,000,003 directly.

What a prime number is

A prime number is a whole number greater than 1 whose only positive divisors are 1 and itself. 2 is the only even prime. 0 and 1 are not prime, and numbers with more divisors are called composite.

Every whole number above 1 is either prime or a unique product of primes. That product is its prime factorization, for example 91 = 7 x 13.

How the check works

The tool tests divisibility by 2 and 3 and then by numbers of the form 6k - 1 and 6k + 1 up to the square root of the number. If nothing divides it, it is prime. This is exact for every number the page accepts, with no probabilistic shortcuts.

Using the nearest primes

The next and previous prime show how far apart primes sit near your number. They get sparser as numbers grow, but gaps stay small compared with the numbers themselves. Very large inputs can take a second or two.

Frequently Asked Questions

Is 1 a prime number?

No. A prime must have exactly two divisors, and 1 has only one.

Is 2 prime?

Yes, and it is the only even prime number.

What is the largest number I can check?

9,007,199,254,740,991, the largest whole number a browser can represent exactly.

What does Prime Number Checker do?

Prime Number Checker tells you whether a whole number is prime. If it is not, it shows the prime factorization, and it also finds the next and previous prime. Numbers above about 9 quadrillion are rejected so every answer stays exact. Very large primes can take a second or two to confirm.

What do I need to enter in Prime Number Checker?

A whole number from 0 up to 9,007,199,254,740,991.

Is my data private in Prime Number Checker?

Everything is calculated in your browser.

Is MyToolDock Prime Number Checker free to use?

Yes, MyToolDock Prime Number Checker is 100% free with no registration, subscriptions, or limits. All features are fully unlocked.

Related Tools

Number Base Converter Week Number Calculator Aadhaar Number Validator ABA Routing Number Validator Pregnancy Due Date Calculator Probability Calculator

More Calculator Tools guides

More in Calculator Tools · Browse all tools

Developer Scratchpad

Copied to clipboard!