UseCalcPro
Home
MathFinanceHealthConstructionAutoPetsGardenCraftsFood & BrewingTools
Blog
  1. Home
  2. Math

Factorial Calculator

Compute factorials, double factorials, and derangements

10!

3,628,800

Digits

7

Trailing Zeros

2

Standard precision up to 170!. Beyond that, results overflow JavaScript numbers.

0! = 1
6! = 720
1! = 1
7! = 5,040
2! = 2
8! = 40,320
3! = 6
9! = 362,880
4! = 24
10! = 3,628,800
5! = 120
12! = 479,001,600

10!

3,628,800

Properties of 10!

Total Digits

7

Trailing Zeros

2

Stirling’s Approximation

Approximation

3,598,695.619

Error

0.8296%

n! ≈ √(2πn) × (n/e)^n

Computation Steps

1.10! = 10 × 9 × 8 × 7 × 6 × 5 × 4 × 3 × 2 × 1
2.= 10 × 9 = 90
3.= 3628800

Key Properties

n! = n × (n−1)!
0! = 1 (by definition)
n!! = n × (n−2) × ... × 2 or 1
!n = n! × Σ(-1)^k/k!
C(n,k) = n! / (k!(n−k)!)
P(n,k) = n! / (n−k)!

Formulas Used

Factorial

n! = n × (n-1) × (n-2) × ... × 2 × 1

The product of all positive integers from 1 to n. By definition, 0! = 1.

Where:

n= A non-negative integer
n!= The factorial of n

Double Factorial

n!! = n × (n-2) × (n-4) × ... × (2 or 1)

The product of all integers from n down to 1 (or 2), stepping by 2. Even numbers multiply down to 2; odd numbers multiply down to 1.

Where:

n= A non-negative integer
n!!= The double factorial of n

Stirling's Approximation

n! ≈ √(2πn) × (n/e)^n

An approximation for large factorials. The relative error decreases as n increases, making it useful for computing with very large factorials.

Where:

n= A positive integer
π= Pi ≈ 3.14159
e= Euler's number ≈ 2.71828

Example Calculations

1Standard Factorial: 10!

Inputs

Number10
ModeFactorial

Result

10!3,628,800

10! = 10 × 9 × 8 × 7 × 6 × 5 × 4 × 3 × 2 × 1 = 3,628,800. This is the number of ways to arrange 10 distinct objects in a line.

2Double Factorial: 10!!

Inputs

Number10
ModeDouble Factorial

Result

10!!3,840

10!! = 10 × 8 × 6 × 4 × 2 = 3,840. Double factorial multiplies every other number, so even numbers step down by 2.

3Large Factorial: 100!

Inputs

Number100
ModeFactorial

Result

100!9.33 × 10¹⁵⁷

100! has 158 digits and 24 trailing zeros. Stirling's approximation gives 9.32 × 10¹⁵⁷ with only 0.083% error at this magnitude.

Frequently Asked Questions

Q

What is a factorial and how is it calculated?

A factorial (n!) is the product of all positive integers from 1 to n. For example, 5! = 5 × 4 × 3 × 2 × 1 = 120. By convention, 0! = 1. Factorials grow extremely fast — just 20! already exceeds 2.4 quintillion.

  • 5! = 120 (5 × 4 × 3 × 2 × 1)
  • 10! = 3,628,800 (already over 3.6 million)
  • 20! = 2,432,902,008,176,640,000 (2.4 quintillion)
  • 0! = 1 by mathematical convention
  • 170! is the largest factorial JavaScript can compute exactly
nn!Digits
51203
103,628,8007
202.43 × 10¹⁸19
1009.33 × 10¹⁵⁷158
1707.26 × 10³⁰⁶307
Q

What is the difference between factorial (n!) and double factorial (n!!)?

A factorial multiplies all integers from n down to 1: 6! = 6×5×4×3×2×1 = 720. A double factorial multiplies every other integer: 6!! = 6×4×2 = 48 (even numbers) or 7!! = 7×5×3×1 = 105 (odd numbers).

  • 6! = 720 vs 6!! = 48 (6×4×2)
  • 7! = 5,040 vs 7!! = 105 (7×5×3×1)
  • 8!! = 8×6×4×2 = 384
  • Even n!!: product of even numbers down to 2
  • Odd n!!: product of odd numbers down to 1
nn!n!!Ratio n!/n!!
67204815
840,320384105
103,628,8003,840945
Q

What is a subfactorial (!n) and what are derangements?

A subfactorial (!n) counts derangements — permutations where no element appears in its original position. For example, !3 = 2 because from {1,2,3}, only {2,3,1} and {3,1,2} have no element in its original spot. The formula is !n = n! × Σ(-1)^k/k! for k=0 to n.

  • !0 = 1, !1 = 0, !2 = 1, !3 = 2, !4 = 9
  • !n/n! approaches 1/e ≈ 0.3679 as n grows
  • !10 = 1,334,961 (out of 3,628,800 total permutations)
  • Used in probability: chance of no match = !n/n!
  • Hat-check problem: probability no one gets own hat back
nn!!nProbability (!n/n!)
36233.3%
51204436.7%
103,628,8001,334,96136.79%
Q

What is Stirling's approximation for factorials?

Stirling's approximation estimates n! as √(2πn) × (n/e)^n. It becomes more accurate as n increases. For n=10, the error is about 0.83%. For n=100, the error drops to 0.083%. It is invaluable for computing with very large factorials.

  • Formula: n! ≈ √(2πn) × (n/e)^n
  • 10! exact = 3,628,800, Stirling = 3,598,696 (0.83% error)
  • 50! Stirling error: ~0.17%
  • 100! Stirling error: ~0.083%
  • Essential for statistical mechanics and information theory
nExact n!StirlingError %
5120118.021.65%
103,628,8003,598,6960.83%
202.43×10¹⁸2.42×10¹⁸0.42%
Q

Where are factorials used in math and science?

Factorials are foundational in combinatorics (counting arrangements), probability (permutations and combinations), calculus (Taylor series), and statistics (distributions). The combination formula C(n,k) = n!/(k!(n-k)!) appears everywhere from poker odds to genetics.

  • Permutations: P(n,k) = n!/(n-k)! arrangements
  • Combinations: C(n,k) = n!/(k!(n-k)!) selections
  • Taylor series: e^x = Σ x^n/n!
  • Poker: 52!/(5!47!) = 2,598,960 possible hands
  • Probability distributions: Poisson, binomial use factorials
ApplicationFormulaExample
Permutationsn!/(n-k)!5!/(5-3)! = 60
Combinationsn!/(k!(n-k)!)10!/(3!7!) = 120
Taylor (e^x)Σ x^n/n!e² = 1+2+2+1.33+...

Understanding Factorials and Their Applications

The factorial function is one of the most important operations in mathematics, representing the product of all positive integers up to a given number. Written as n!, it grows faster than exponential functions — while 2^10 = 1,024, we have 10! = 3,628,800, and 20! already exceeds 2.4 quintillion.

Beyond the standard factorial, the double factorial (n!!) multiplies every other integer, and the subfactorial (!n) counts derangements — permutations where nothing stays in place. These variants appear in physics (quantum mechanics), combinatorics, and probability theory.

Our factorial calculator computes all three variants with step-by-step breakdowns, digit counts, trailing zero analysis, and Stirling's approximation for large values. It handles inputs up to n = 170 at full precision and provides scientific notation for larger results.

Related Calculators

Exponent Calculator

Calculate powers, roots, and exponential expressions

Probability Calculator

Compute probabilities using permutations and combinations

Logarithm Calculator

Calculate log, ln, and custom base logarithms

Statistics Calculator

Mean, median, mode, standard deviation and more

Permutation Calculator \u2014 nPr with Steps

Calculate permutations (nPr) with step-by-step factorial expansion. Find ordered arrangements with or without repetition and compare with combinations.

Ellipse Calculator

Calculate ellipse area, perimeter, eccentricity, foci, and flattening. Uses Ramanujan approximation for accurate circumference with full property breakdown.

Related Resources

Exponent Calculator

Calculate powers and exponential expressions

Probability Calculator

Calculate probability using combinations and permutations

Statistics Calculator

Mean, median, standard deviation and more

Percent Calculator

Calculate percentages and ratios

Last Updated: Mar 9, 2026

This calculator is provided for informational and educational purposes only. Results are estimates and should not be considered professional financial, medical, legal, or other advice. Always consult a qualified professional before making important decisions. UseCalcPro is not responsible for any actions taken based on calculator results.

UseCalcPro
FinanceHealthMath

© 2026 UseCalcPro