Primorial Calculator
Find the primorial of a number.
Result
How it is calculated
The tool walks through every integer from 2 up to n, tests each one for primality by trial division, and multiplies together the ones that are prime: n# = ∏ p over all primes p ≤ n. It also reports how many primes were multiplied. The input is cut to a whole number and must lie between 1 and 40; anything outside that range returns no result. For n = 1 there are no primes, so the product is the empty product, 1. The result only changes when n reaches a new prime, so 13# and 16# are the same number.
Worked example
Enter n = 13. The primes up to 13 are 2, 3, 5, 7, 11 and 13, which is 6 primes. Multiply step by step: 2 × 3 = 6, × 5 = 30, × 7 = 210, × 11 = 2,310, × 13 = 30,030. The primorial 13# is 30,030, built from 6 primes.
Common mistakes
- Multiplying all integers up to n. That is the factorial; the primorial skips composites, so 13# is 30,030 while 13! is over six billion.
- Expecting the value to change at every step of n. It only jumps at primes, so 14, 15 and 16 give the same answer as 13.
- Entering a decimal or a value above 40. Decimals are cut to a whole number and values above 40 or below 1 give no result.
- Counting 1 as a prime. It is not, so it contributes nothing and the prime count for n = 1 is 0.
About this calculator
The primorial of n, written n#, is the product of all prime numbers less than or equal to n — analogous to the factorial but multiplying only primes. For example 10# = 2 × 3 × 5 × 7 = 210 (the primes up to 10). Primorials grow extremely fast, even faster than factorials of the same argument once several primes are included, since every factor is itself prime rather than a run of consecutive integers.
Primorials show up throughout number theory: Euclid's classic proof that there are infinitely many primes considers a number one more than a primorial (p# + 1), and "primorial primes" (primes of the form p# ± 1) are an active area of prime-hunting research. They're also used to construct numbers with many small prime factors for testing purposes, and in the study of prime gaps and the distribution of primes via the prime-counting function. Students and number-theory hobbyists use this calculator to compute n# for any n and explore these patterns.
Was this helpful?
You can pick up to 3 reactions.
Popular calculators
Loan Calculator
Monthly payment, total interest and full amortization schedule.
Percentage Calculator
Percent change, percent of, and ratio calculations.
Discount Calculator
Calculate final price, savings, and discount amount.
BMI Calculator
Body mass index from height and weight (metric or imperial).
Age Calculator
Compute your exact age in years, months and days from a birth date.
Compound Interest Calculator
Calculate the final amount and interest earned with compounding.
All Calculators
- Loan Calculator
- Profit Calculator
- Discount Calculator
- BMI Calculator
- Percentage Calculator
- Ideal Weight Calculator
- Age Calculator
- Pregnancy Due Date Calculator
- Compound Interest Calculator
- BMR Calculator (Basal Metabolic Rate)
- Tip Calculator
- Fuel Cost Calculator
- Date Difference Calculator
- Sleep Cycle Calculator
- Daily Water Intake Calculator
- Simple Interest Calculator
- Heart Rate Zones Calculator
- Running Pace Calculator
- Pet Age Calculator
- Calories Burned Calculator
- Macro Calculator
- TDEE Calculator (Total Daily Energy Expenditure)
- Waist-to-Hip Ratio Calculator
- Honor Roll Calculator
- One Rep Max (1RM) Calculator
- Ovulation Calculator
- Electricity Cost Calculator
- Unit Price Calculator
- Savings Goal Calculator
- Break-Even Point Calculator
- Paint Calculator
- Course Grade Average Calculator
- Business Days Calculator
- Time Duration Calculator
- Fuel Economy Calculator
- Temperature Converter
- Tile Calculator
- Aspect Ratio Calculator
- Roman Numeral Converter
- Goal Weight Timeline Calculator
- Salary Converter (Hourly to Annual)
- Credit Card Validator (Luhn)
- Body Surface Area (BSA) Calculator
- Feels-Like Temperature Calculator
- Ohm’s Law Calculator
- PPI (Pixel Density) Calculator
- Molar Mass Calculator
- Zodiac Sign Calculator (Western + Chinese)
- IBAN Validator
- Shoe Size Converter
- Country Info & Dialing Code Lookup
- Time Zone Difference (World Clock)
- CAGR (Compound Annual Growth Rate) Calculator
- Rule of 72 Calculator
- Blood Alcohol Content (BAC) Calculator
- Lean Body Mass (LBM) Calculator
- Pythagorean Theorem Calculator
- Speed Converter
- Download Time Calculator
- Date Calculator (Add/Subtract)
No calculators found
Comments (1)
Only primes count, so a non-prime input gives the same answer as the prime just below it: 30# and 29# are both 6,469,693,230. The tool accepts n from 1 to 40, a range where the product still fits exactly in a floating-point number. The primorial grows faster than intuition suggests, and Euclid-style proofs that there are infinitely many primes lean on exactly this product plus one. Are you using it for a proof, a puzzle or a number theory class?