Calculators

Primorial Calculator

Calculate the exact product of all primes up to n, with prime factors and digit count, privately in your browser.

Multiply every prime less than or equal to n. Enter a whole number from 0 to 10000. Calculations stay in your browser.

Enter an integer from 0 to 10000 to find its exact primorial.

How primorials work

The primorial n# is the product of all prime numbers less than or equal to n. For 10, the included primes are 2, 3, 5 and 7, giving 10# = 210. Composite upper bounds do not introduce new factors: 7#, 8#, 9# and 10# are all 210. Zero and one have no prime factors in this range, so their primorial is the empty product, 1. This uses the upper-bound convention n#, rather than the alternative convention of multiplying the first n primes. Unlike a factorial, each prime appears exactly once and composite numbers are excluded. A sieve identifies the primes and exact BigInt arithmetic preserves every result digit. Enter 0 to 10000 using up to five digits; leading zeros and surrounding whitespace are accepted. Signs, decimals, separators and scientific notation are rejected. The result includes every prime factor, the prime count, largest included prime and decimal digit count. Inputs stay in your browser.

Frequently Asked Questions

Everything you need to know about this tool, how it works, and privacy.

What is a primorial?

The primorial n# multiplies each prime at most n exactly once. For example 10# = 2 × 3 × 5 × 7 = 210.

Does n mean the number of primes?

Here n is the upper bound, not a prime count. For example 5# = 30, whereas the product of the first five primes is 2310.

What are the primorials of zero and one?

Both are 1 because there are no primes at or below either value. An empty product equals 1.

Are large products rounded or uploaded?

No. BigInt arithmetic retains every digit for upper bounds through 10000. All computation runs locally in your browser.