Factorial Calculator
n! grows faster than almost any other common function — 10! is already over 3.6 million, and 20! has 19 digits. This tool computes it exactly where possible and switches to scientific notation once the number gets unwieldy.
Inputs
Result
3.628800 × 10^6
3,628,800
How the factorial calculator works
n! = n × (n−1) × (n−2) × ... × 2 × 1, with 0! defined as 1 by convention.
Results are shown in scientific notation (e.g. '2.43 × 10^18') once they exceed roughly 15 digits, since a full 19-digit integer stops being readable at a glance anyway.
Values above 170 aren't computed — factorials that size exceed the range a standard floating-point number can represent accurately.
Worked example: 10!
- 10! = 10 × 9 × 8 × 7 × 6 × 5 × 4 × 3 × 2 × 1.
- = 3,628,800.
- For comparison, 15! is already 1,307,674,368,000 — about 360,000 times larger, from just 5 more terms.
Common mistakes to avoid
Expecting factorial to grow linearly
It compounds multiplicatively, so intuition from addition-based growth badly underestimates it — the jump from 10! to 20! is a factor of over 6.7 billion, not 2×.
Entering a non-integer or negative number
Factorial as computed here is only defined for whole numbers 0 and above; fractional factorials require the separate gamma function, which this tool doesn't implement.
Frequently asked questions
Why is 0! equal to 1 and not 0?
It's a mathematical convention that makes formulas involving factorials (like combinations and permutations) work correctly at the boundary case of choosing nothing from a set.
What is factorial actually used for?
Counting arrangements and combinations — how many ways a set of n items can be ordered, which underlies permutation, combination and probability calculations.
Why does the calculator stop at n = 170?
Beyond that, the result exceeds what a standard double-precision number can represent without losing accuracy in the least significant digits.
How can I estimate a huge factorial without computing it exactly?
Stirling's approximation, n! ≈ √(2πn) × (n/e)^n, gives a very close estimate for large n without needing the full multiplication.
Related calculators
Permutation & Combination Calculator
nPr and nCr for counting problems.
Binomial Probability Calculator
Probability of exactly k successes in n trials.
Prime Number Checker
Check if a number is prime and see its factors.
Exponent Calculator
Raise any base to any power.
Probability Calculator
Single and combined event probability.