--- title: "How many prime numbers are there under a million? exactly 78,4" description: "exactly 78,498 How the figure is estimated, how confident it is, and what makes the scale graspable." url: https://atoneplace.net/how-many/primes-under-a-million/ site: "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 - [How many combinations does a Rubik's Cube have?](https://atoneplace.net/how-many/rubiks-cube-states/) — 43,252,003,274,489,856,000 — about 43 quintillion - [How many ways can you shuffle a deck of cards?](https://atoneplace.net/how-many/possible-shuffles-of-a-deck/) — about 8 × 10^67 - [How many possible chess games are there?](https://atoneplace.net/how-many/possible-chess-games/) — about 10^120 games; about 4.8 × 10^44 legal positions - [How many combinations are there in the lottery?](https://atoneplace.net/how-many/lottery-combinations/) — 292,201,338 for Powerball - [How many digits of pi have been calculated?](https://atoneplace.net/how-many/digits-of-pi-computed/) — about 202 trillion - [How many possible passwords are there?](https://atoneplace.net/how-many/possible-passwords/) — 6.6 quadrillion for eight characters — 540 sextillion for twelve - [How many Sudoku puzzles are there?](https://atoneplace.net/how-many/possible-sudoku-grids/) — 6,670,903,752,021,072,936,960 completed grids - [How many possible positions are there in Go?](https://atoneplace.net/how-many/possible-go-positions/) — about 2.08 × 10^170 ## 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 - [How many combinations does a Rubik's Cube have?](https://atoneplace.net/how-many/rubiks-cube-states/) - [How many ways can you shuffle a deck of cards?](https://atoneplace.net/how-many/possible-shuffles-of-a-deck/) - [How many possible chess games are there?](https://atoneplace.net/how-many/possible-chess-games/) - [How many combinations are there in the lottery?](https://atoneplace.net/how-many/lottery-combinations/) - [How many digits of pi have been calculated?](https://atoneplace.net/how-many/digits-of-pi-computed/) - [How many possible passwords are there?](https://atoneplace.net/how-many/possible-passwords/) - [How many Sudoku puzzles are there?](https://atoneplace.net/how-many/possible-sudoku-grids/) - [How many possible positions are there in Go?](https://atoneplace.net/how-many/possible-go-positions/) - [How many people are there in the world?](https://atoneplace.net/how-many/people-alive-right-now/) - [How many stars are there in the universe?](https://atoneplace.net/how-many/stars-in-the-universe/) - [How many countries are there in the world?](https://atoneplace.net/how-many/countries/) - [How many bones are in the human body?](https://atoneplace.net/how-many/bones-in-the-human-body/) - [How many grains of sand are there on Earth?](https://atoneplace.net/how-many/grains-of-sand-on-earth/) - [How many ants are there in the world?](https://atoneplace.net/how-many/ants-on-earth/) ## Sources - Calculated on this page — At One Place (/about/)