Superfactorial calculator
Multiply the first n factorials exactly: the superfactorial of 5 is 1! × 2! × 3! × 4! × 5!, which is 34560, shown in full with its number of digits for any n from 0 to 100. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- N
- 5
- Superfactorial
- 34560
- Digits
- 5
- Max n
- 100
The superfactorial calculator returns the product of the first n factorials for any non-negative integer n you supply. By the classical Sloane definition, the superfactorial of n is one factorial times two factorial times three factorial and so on through n factorial, written sf(n) equals the product from k equals one to n of k!. Zero is allowed and returns one because the empty product is one by convention. Small values you may already know are sf(1)=1, sf(2)=2, sf(3)=12, sf(4)=288, and sf(5)=34560; beyond that the sequence grows far faster than a single factorial, so every result is returned as an exact decimal string rather than a floating-point approximation. The engine uses deterministic BigInt arithmetic only: no network calls, no sampling, and no date-dependent shortcuts.
What the superfactorial is and what you get
Superfactorial here means the product of the first n ordinary factorials, not the hyperfactorial of factorial towers and not a multifactorial with skipped factors. Formally, sf(n) = 1! × 2! × … × n!
for n greater than or equal to one, and sf(0) = 1 for the empty product. That is the integer sequence commonly associated with Sloane and listed in OEIS as the superfactorials; it is a different object from n raised to the factorial or other similarly named constructions, so always check which definition a problem statement uses.
This calculator returns the requested n, the superfactorial value as a decimal string under the field superfactorial, the number of digits in that string, and the published maximum supported n so clients can validate before they send a batch.
Where superfactorials fit in study, code, and teaching
Students meet superfactorials when a combinatorics or number-theory text contrasts them with factorials, when an OEIS exercise asks for the product of the first n factorials, or when they need a vivid example of growth faster than n!. Teachers can pre-generate answer keys for modest n without trusting opaque calculator apps that round large integers or silently switch to scientific notation.
Developers call the same contract from scripts to seed deterministic test vectors, to illustrate BigInt-safe serialization in APIs, or to satisfy programming-challenge statements that demand the exact superfactorial rather than a log-space approximation. Contest practice often needs a fast, offline source of ranked superfactorial values so solutions can be checked without downloading OEIS tables under time pressure.
Science communicators use short superfactorial tables as a clean demonstration that multiplying successive factorials produces digit counts that climb much faster than a single factorial plot, which pairs well with lessons on complexity and exact arithmetic.
What you can do with it
Homework and OEIS checks
Look up exact sf(n) values for textbook exercises and OEIS-style problems that define superfactorial as the product of the first n factorials.
Teaching growth and BigInt
Show how the product of successive factorials outpaces n!, and how decimal-string output keeps every digit exact past safe integers.
FAQ
What does the superfactorial calculator cost?
It is free in your browser on this page.
How is superfactorial defined here?
sf(n) is the product of the first n factorials: 1! × 2! × … × n!.
Can I request a negative n?
Superfactorial is defined for non-negative integers only in this calculator.
What are some small values?
sf(0)=1, sf(1)=1, sf(2)=2, sf(3)=12, sf(4)=288, sf(5)=34560, sf(6)=24883200. Larger n returns a longer exact decimal string.
Is the superfactorial the same as the hyperfactorial?
No. Here the superfactorial is the product of the first n ordinary factorials. The hyperfactorial and the multifactorials with skipped factors are different constructions, so check which definition your problem statement uses before comparing answers.
Related tools
For developers — API access
Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.
API endpoint
Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.
Call it from your stack
curl -X POST https://api.kit.forhosting.com/math/superfactorial \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"n":5}'const res = await fetch("https://api.kit.forhosting.com/math/superfactorial", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"n": 5
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/math/superfactorial",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"n": 5
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/math/superfactorial", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"n":5}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"n":5}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/math/superfactorial", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"n": 5
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "math.superfactorial",
"status": "queued",
"_links": {
"result": "/tasks/tsk_…/result"
}
}The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.
Pricing
Published price — no tokens, no invented credits. A failed task is never charged.
Limits
max_n | 100 |
Errors
| HTTP | Code | Meaning |
|---|---|---|
401 | unauthorized | Missing or invalid API key. |
402 | insufficient_balance | Your balance doesn't cover the task price. |
404 | unknown_type | That task type doesn't exist. |
429 | rate_limited | Too many requests. Use the webhook instead of polling. |
Technical notes
What superfactorial means and what the response contains
There is no approximate Stirling formula presented as truth and no random sampling of primes: the engine either builds the exact product inside the supported range or rejects the input with invalid_input. Rejected cases include missing n, non-integers, fractions, scientific notation, values above the documented ceiling, and any negative index.
How n is read and how BigInt keeps every digit exact
Optional leading plus signs are allowed; embedded spaces, hex prefixes, negative signs, and exponential notation are rejected with a clear message so a bad cell does not become a wrong superfactorial. Zero is valid and returns one, matching the empty-product convention used in discrete mathematics. Computation is a simple iterative loop: start with BigInt one for the current factorial and BigInt one for the running product, then for each k from one through n multiply the factorial by k and multiply the product by that updated factorial. The preferred field is n as a JSON integer, but decimal strings and the aliases value and k are accepted so spreadsheets, query strings, and typed forms can reuse the same contract. The engine enforces a hard maximum of one hundred on n, which keeps memory and latency inside a predictable budget on the free browser path and on the edge Worker even though intermediate factorials and the running product grow super-exponentially. Every intermediate is a BigInt and the final value is serialized with toString so JSON never loses digits the way IEEE doubles would after the fifty-third bit. Pair the free browser run on this page with the priced API when you need the identical mathematical result inside an automated pipeline without re-implementing the product-of-factorials loop yourself.
Where superfactorials fit in study, code, and teaching
On this page the work runs entirely in your browser; through the API each successful lookup costs $0.002, failed validation is not charged, and nothing is stored after the response returns. That split — free interactive exploration and a priced, identical API — matches the rest of the KIT tier-A catalog and lets you move from a classroom demo to an automated pipeline without changing the mathematical result. Pair it with factorial or primorial tools when you need related products, with Lucas or Pell calculators when you need linear recurrences, and with other math endpoints when you are building a small lab of free, deterministic number-theory helpers.
Integration use cases
Deterministic test fixtures
Generate reproducible superfactorial decimal strings for unit tests, property checks, and CI assertions without hand-maintaining huge tables.
Technical questions
Why is the result a string instead of a number?
Superfactorials quickly exceed JavaScript safe integers. Returning a decimal string keeps every digit exact in JSON and in the browser.