Factorial Calculator
Calculate factorial (n!) for any non-negative integer. See exact values, number of digits, and related factorials.
Enter a non-negative integer (0-170)
What is a factorial?
Factorial of n (written n!) is the product of all positive integers from 1 to n. Example: 5! = 5 * 4 * 3 * 2 * 1 = 120. Special case: 0! = 1 by definition. Used in permutations, combinations, probability, and series.
How do you calculate large factorials?
Large factorials grow extremely fast. 10! = 3,628,800. 20! = 2.4 * 10^1⁸. 100! has 158 digits! Use programming for large factorials. Stirling's approximation estimates: n! ≈ sqrt(2PIn) * (n/e)ⁿ. Most calculators limit to ~170! due to overflow.
What are factorials used for?
Permutations: number of ways to arrange n items = n!. Combinations: C(n,r) = n! / (r!(n-r)!). Probability calculations, Taylor series expansions, binomial coefficients, counting problems, statistics, and mathematical proofs.
What is the difference between factorial and double factorial?
Regular factorial (n!): multiply all integers from 1 to n. Double factorial (n!!): multiply every other integer. 8!! = 8*6*4*2 = 384. 7!! = 7*5*3*1 = 105. Used in some physics and combinatorics formulas.
Can you take factorial of negative numbers or decimals?
Negative factorials are undefined. Factorial extends to non-integers via the Gamma function: Γ(n) = (n-1)! for positive integers. For non-integers: Γ(n) = ∫₀^∞ t^(n-1)e^(-t)dt. Example: (1/2)! = Γ(3/2) = sqrtPI/2 ≈ 0.886.