Prime Number Checker

The prime number tools tell you whether a number is prime, break it into prime factors, count its divisors and find the nearest primes on either side. A second tool lists every prime in a range. It uses fast modern algorithms, so even 30- or 40-digit numbers are checked and factored in an instant, right in your browser.

Primes in ranges

Up toNumber of primes
104
10025
1,000168
10,0001,229
1,000,00078,498

When to use it

  1. Check if a number is prime.
  2. Find the prime factorization for homework.
  3. Generate a list of primes for programming.
  4. Explore large numbers used in cryptography.

How to Use

  1. Enter a number to check and factor.
  2. Read whether it's prime, its factors and neighbors.
  3. Enter a range to list primes.

Features

  1. Miller–Rabin primality test
  2. Pollard's rho factorization
  3. Divisor count
  4. Previous and next prime
  5. Segmented sieve for ranges
  6. Up to 40 digits
  7. 100% client-side

FAQs

Is 1 a prime number?

No. A prime has exactly two divisors, 1 and itself; 1 has only one.

How do you find the prime factorization?

Divide by the smallest prime that fits, repeat with the result, and collect the primes. The tool shows the result instantly.

How large a number can it check?

Up to 40 digits.

How many primes are there below 100?

25.

Is anything uploaded?

No. It runs in your browser.

Technical Details

Primality is tested with the Miller–Rabin test using the first 13 primes as witnesses, which is proven deterministic for every number below about 3.3 × 10²⁴ and overwhelmingly reliable beyond. Factorization first divides out small primes, then splits the remaining composite parts with Pollard's rho algorithm and tests each piece with Miller–Rabin, so numbers with large prime factors (like the product of two 10-digit primes) factor in moments instead of years of trial division. The number of divisors comes from the exponents: (e₁ + 1)(e₂ + 1)…. The previous and next primes are found by testing neighbors. Primes in a range are generated with a segmented Sieve of Eratosthenes, which only needs primes up to the square root of the upper limit, for ranges of up to a million numbers below 10¹².

Calculators & Converters

Calculators & Converters

  • Ratio & Proportion Calculator
  • Roman Numeral Converter
  • Rounding Calculator
  • Scientific Notation Converter
  • Number Sequence Generator
  • Data Size Converter
  • Discount & Sales Tax Calculator
  • Fuel Cost Calculator