At One Place

How many prime numbers are there under a million?

How many prime numbers are there under a million?
exactly 78,498
Below 100, one number in four is prime. Below a million, one in thirteen. Around a trillion, one in twenty-eight.

There are exactly 78,498 primes below one million, about 7.8% of the numbers in that range. Primes thin out predictably as you go up: there are 25 below 100, 168 below 1,000, 50,847,534 below a billion, and 37,607,912,018 below a trillion. Euclid proved around 300 BC that the primes never run out, so there is no largest one — but they get sparse enough that the density near a number n is roughly 1 in ln(n).

How the figure is arrived at

Sieve of Eratosthenes for the exact count, which a laptop finishes in milliseconds. The interesting part is how good the approximations are: the prime number theorem estimates n/ln(n) = 72,382, about 8% low, while the logarithmic integral Li(n) gives 78,628 — high by 130, an error of 0.17%. The gap between Li(n) and the true count is one of the deepest open questions in mathematics, and the Riemann hypothesis is a statement about how large it can get.

Other numbers and possibilities counts

Common questions

How many prime numbers are there under a million?
exactly 78,498
How is that estimated?
Sieve of Eratosthenes for the exact count, which a laptop finishes in milliseconds. The interesting part is how good the approximations are: the prime number theorem estimates n/ln(n) = 72,382, about 8% low, while the logarithmic integral Li(n) gives 78,628 — high by 130, an error of 0.17%. The gap between Li(n) and the true count is one of the deepest open questions in mathematics, and the Riemann hypothesis is a statement about how large it can get.

Related pages

Sources

  1. Calculated on this page — At One Place

How these figures are compiled and checked