Skip to main content

Prime Checker

Check whether a number is prime. Enter any integer to see an exact prime/composite verdict, and for composite numbers its prime factorization, divisors, and divisor sum. Uses BigInt so very large numbers work.

Input

Output

Details
 
Was this helpful?

Guides

The Prime Checker tells you instantly whether a number is prime, and — when it isn't — breaks it down into its prime factors and lists every divisor. Type any whole number and you get an exact verdict, no rounding and no guesswork.

What is a prime number?

A prime number is a whole number greater than 1 whose only positive divisors are 1 and itself: 2, 3, 5, 7, 11, 13, and so on. Every other whole number greater than 1 is composite — it can be written as a product of primes. The number 2 is special because it is the only even prime; every other even number is divisible by 2 and therefore composite.

By definition, 0, 1, and negative numbers are neither prime nor composite. This tool follows the standard mathematical convention and labels them accordingly.

How to use it

  1. Enter an integer in the Number to check field — commas and spaces are ignored, so 1,000,003 and 1000003 are treated the same.
  2. The result updates automatically as you type.
  3. Read the verdict in Result, and for composite numbers see the Prime factorization, the full list of Divisors, and a Details panel with the divisor count and sum of divisors.

Copy any field with its copy button.

How it works

Primality is tested with a deterministic Miller–Rabin algorithm running on JavaScript BigInt, so even very large numbers return an exact answer instantly instead of freezing the page. Prime factorization and the divisor list use trial division; numbers whose smallest prime factor is extremely large are reported as "too large to factorize", while the prime-or-composite verdict itself is always exact.

Is this accurate for huge numbers?

Yes for the prime/composite verdict — the Miller–Rabin bases used are deterministic for every number below roughly 3.3 × 10²⁴, which covers any input you are likely to enter. Full factorization is only shown when a number can be factored quickly.

Does it work for negative numbers, 0, and 1?

It accepts them and reports them as neither prime nor composite, which is the correct mathematical classification.

Privacy

Everything runs locally in your browser. The number you enter is never uploaded or stored.

primeprime numbernumber theoryfactorizationdivisorsmath

Love the tools? Lose the ads.

One payment clears every ad from your account, for good. No subscription, no tracking.