Nth prime calculator
Find any prime by its position. What is the 50th prime? The 100th? The 1000th? Enter n to find out.
n =
Quick
Notable primes by position
The 1st prime is 2. The 10th is 29. The 100th is 541. The 1000th is 7919. The 10,000th is 104,729.
Prime counting function π(n)
π(n) counts how many primes are ≤ n. The prime number theorem says π(n) ≈ n/ln(n). This means primes get rarer as numbers grow, but never stop.
How primes are distributed
The average gap between consecutive primes near n is about ln(n). Near 100, gaps average about 4.6. Near 1,000,000, gaps average about 13.8.
Related calculators