List all the prime numbers between two numbers (up to 10 million) with the sieve of Eratosthenes, and count them. Enter your values; the result updates as you type, with the method shown below.
About this calculator
This tool lists all the prime numbers in a range, using the sieve of Eratosthenes. It is useful for exercises, puzzles and programming tests.
Enter the start and end of the range; the range can span up to 2,000,000 numbers, ending at 10,000,000 at most.
When to use it
- Maths exercises.
- Testing a program’s output.
- Number puzzles.
- Exploring how primes thin out.
How to read the result
There are 25 primes below 100 and 46 below 200.
Primes become rarer as numbers grow, but there are infinitely many.
Mistakes to avoid
- Counting 1 as prime.
- Starting the range above the end.
- Expecting huge ranges in the browser.
Formula
Sieve of Eratosthenes: cross out multiples of each prime p from p²
Worked example
There are 46 primes between 1 and 200.
Frequently asked questions
Is 1 a prime number?
No, a prime has exactly two divisors.
How does the sieve work?
It crosses out the multiples of each prime in turn.
How many primes below 1,000?
168.
How many primes below 100?
25.
What is the sieve of Eratosthenes?
A method that crosses out multiples of each prime.
Are there infinitely many primes?
Yes, as Euclid proved.
Related calculators
- Pascal’s Triangle Generator
- Euclidean Algorithm Calculator (GCD Steps)
- Simplify Fractions Calculator
- Equivalent Fractions Calculator
- Least Common Denominator Calculator
- Double Factorial and Multifactorial Calculator
- All calculators in this category
Results are estimates for information only. Check important figures with a professional.
