The nth Prime Page will now find any of the first 2,623,557,157,654,233 primes or
π(x) for x up to 100,000,000,000,000,000.

Welcome to the Nth Prime Page! Commas and scientific notation
(e.g. 1.0e12) are allowed.

Nth prime

Enter a value for n between 1 and 2.623^{.}10^{15}; the server will return the
nth prime number. For example, entering either 1,000,000,000,000 or 1.0e12 yields 'The
1,000,000,000,000th prime is 29,996,224,275,833.'

Pi function π(x)

Enter a value for x below, from 1 to
10^{17}. The server will return π(x), the number
of primes not exceeding x. For example, entering
29,996,224,275,833 will tell you 'There are 1,000,000,000,000 primes
less than or equal to 29,996,224,275,833.'

Random prime

Click below to get a "random" prime chosen from the
first 10^{12} primes:

Algorithm

For a description of the algorithm used, click
here. In short: the original text of this page, the programs and
datasets for primes below 3*10^{12}, were provided by Andrew Booker.
The extension to the primes below 10^{17} used data provided by
Andrey V. Kulsha
and programs by Andrew Carr, Chris K. Caldwell and
Kim Walisch.