Prime Number Checker & Generator
Test whether any number is prime, and list every prime in a range using the Sieve of Eratosthenes.
Check whether a given whole number is prime, and generate a complete list of every prime within a range of your choosing — up to 1,000,000 — using the Sieve of Eratosthenes. For composite numbers, you also get the factors. Handy for math homework, coding interviews, and number theory practice.
도구를 불러오는 중…
🔒 Everything runs 100% in your browser. Your files and input are never uploaded to any server.
How to use
- On the prime checker tab, enter a number to instantly see whether it's prime — and if it's composite, what its factors are.
- Switch to the generator tab and set your range.
- Hit the generate button, or just type a number, to list every prime in that range along with the total count.
- Use the copy button to grab the entire list of primes to your clipboard.
FAQ
- What exactly is a prime number?
- A prime is a whole number greater than 1 whose only divisors are 1 and itself. The first few are 2, 3, 5, 7, and 11.
- How does the Sieve of Eratosthenes work?
- Named for the ancient Greek mathematician who devised it, the sieve starts at 2 and crosses out every multiple of each prime it finds, working up to your limit. Whatever survives is prime. It's still the classic, and one of the most efficient, ways to find all primes below a given number.
- Is the number 1 a prime number?
- No. A prime number is defined as a natural number greater than 1 whose only divisors are 1 and itself. Since 1 only has one divisor — itself — it doesn't meet that definition, so it's classified as neither prime nor composite; it sits in a category of its own.
