Calcoid

Prime Numbers List Calculator

List the first N primes or every prime up to N. Uses the Sieve of Eratosthenes and reports count, sum, smallest, largest, and all twin prime pairs.

Prime list inputs

Whole number from 1 to 10,000,000.

Prime count

25

Sum
1,060
Smallest
2
Largest
97
Twin prime pairs
8

Primes

2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97

Twin primes (p, p+2)

(3, 5), (5, 7), (11, 13), (17, 19), (29, 31), (41, 43), (59, 61), (71, 73)

Prime Number List Milestones

Upper LimitPrime CountLargest Prime
1047
1002597
1,000168997
10,0001,2299,973
100,0009,59299,991

Frequently Asked Questions about the Prime Numbers List Calculator

What counts as a prime number?
A prime is a whole number greater than 1 whose only positive divisors are 1 and itself. The first ten primes are 2, 3, 5, 7, 11, 13, 17, 19, 23, and 29. The number 1 is neither prime nor composite by modern convention, which keeps prime factorization unique for every integer greater than 1.
How does the Sieve of Eratosthenes work?
The sieve lists the integers from 2 to N. For each unmarked prime p, it marks composite multiples starting at p^2 because smaller multiples were already handled by earlier primes. Once p exceeds sqrt(N), every remaining unmarked number is prime. Its time complexity is O(N log log N).
What are twin primes?
Twin primes are pairs of primes that differ by exactly 2, such as (3, 5), (5, 7), (11, 13), (17, 19), and (29, 31). The twin prime conjecture says infinitely many such pairs exist. It remains unproven, so avoid treating a computational search record as evidence that the conjecture has been settled.
Why are prime gaps larger for bigger numbers?
On average, the gap between consecutive primes near n grows like ln(n), so primes become less dense. The prime number theorem says the count of primes up to n is approximately n / ln(n). Individual gaps vary widely. Arbitrarily long runs of composite numbers are known, while infinitely many twin-prime gaps remain conjectural.
What is the largest known prime number?
The largest known prime is M136279841 = 2^136,279,841 - 1. GIMPS reported its discovery in October 2024. It has 41,024,320 decimal digits and is the 52nd known Mersenne prime. This browser calculator lists primes only within its much smaller input limit.

Related Calculators

More calculators in "Math"

See all 202 calculators in "Math"