Kharabeesh
On-device ع

Prime Number Checker

Check whether a number is prime (even huge ones), factor it into primes, list its divisors and the nearest primes, and find every prime in a range.

Free, no sign-up Your data stays on your device Works offline after first open

The tool

Loading the tool…

How to use

  1. Type a number (up to 100 digits) to see whether it is prime and its factorization.
  2. You also get the divisor count and sum, and the primes before and after it.
  3. For a range, enter the start and end (up to a million numbers at a time).

Privacy & how it works

Processes your data in the browser and stores nothing.

  • Engine: lightweight in-page code, no external libraries.
  • Works offline after you open it once.

Frequently asked questions

How can it tell a huge number is prime?

With the Miller–Rabin test. Below 3.3 × 10^24 the answer is mathematically certain (fixed, proven bases). Above that we say “probably prime”: the error chance is below 1 in 10^15, but it is not a proof.

Why does factoring sometimes not finish?

Factoring large numbers is genuinely hard (it is what cryptography relies on). We try trial division and then Pollard’s rho for a limited time; if a large composite part remains, we tell you it was not factored.

Is 1 a prime?

No. A prime has exactly two distinct divisors (1 and itself); 1 has only one. The smallest prime is 2, the only even prime.

Formulas & sources

Related tools