Prime Number Tools
Check if a number is prime, find its prime factorization, list primes in a range, or find the Nth prime number.
Enter a valid integer between 0 and 1,000,000,000,000,000.
Enter any positive integer to test whether it is prime. Results include the nearest prime and smallest factor for composite numbers.
All calculations run in your browser. No data is sent to any server. Primality testing uses trial division up to the square root. Prime listing uses the sieve of Eratosthenes.
How to use
- 1
Choose a mode
Select Primality Test, Factorization, List Primes, or Nth Prime using the tabs.
- 2
Enter a number
Type a positive integer into the input field.
- 3
View the result
Results appear instantly. Factorization shows the full prime decomposition.
Frequently asked questions
How large a number can I test?
What algorithm is used for primality?
How does the prime listing work?
Is my data sent to a server?
A suite of prime number tools in one page. Test whether any number is
prime, decompose a number into its prime factors shown as a product of
powers, generate all primes within a range using the sieve of
Eratosthenes, or find the Nth prime. Results appear instantly and
factor trees are displayed step by step. All processing runs in your
browser.