Prime Numbers List Calculator

Enter a range to list its primes, or ask for the nth prime.

A whole number, 0 or more.

A whole number up to 1 000 000 000, at most 100 000 above the start.

Try

Result

You entered1≤p≤101 \le p \le 10

2,  3,  5,  7\displaystyle 2,\; 3,\; 5,\; 7

How many primes

4\displaystyle 4

Largest prime

7\displaystyle 7
Show the work
  1. Sieve of Eratosthenes

    A prime has no divisor except 1 and itself. The sieve writes down all the numbers in the range, then crosses out every multiple of each prime up to ⌊10⌋=3\lfloor\sqrt{10}\rfloor = 3, since a number with no prime factor up to its square root has none at all. For a window that does not start at 1, only the multiples that land inside the window are crossed out (a segmented sieve).

    primes up to 3:2,  3\begin{gathered} \text{primes up to } 3: \\ 2,\; 3 \end{gathered}
  2. Numbers left uncrossed

    Every number from 11 to 1010 that is not crossed out (and is at least 2) is prime. There are 44.

    2,  3,  5,  72,\; 3,\; 5,\; 7
  3. Result

    There are 44 primes from 11 to 1010.

Worked examples