Factorial
n! = n × (n-1) × (n-2) × ... × 2 × 1The product of all positive integers from 1 to n. By definition, 0! = 1.
Where:
n= A non-negative integern!= The factorial of n10!
3,628,800
Digits
7
Trailing Zeros
2
Standard precision up to 170!. Beyond that, results overflow JavaScript numbers.
10!
3,628,800
7
2
3,598,695.619
0.8296%
n! ≈ √(2πn) × (n/e)^n
n! = n × (n-1) × (n-2) × ... × 2 × 1The product of all positive integers from 1 to n. By definition, 0! = 1.
Where:
n= A non-negative integern!= The factorial of nn!! = 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 integern!!= The double factorial of nn! ≈ √(2πn) × (n/e)^nAn 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.14159e= Euler's number ≈ 2.71828Inputs
Result
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.
Inputs
Result
10!! = 10 × 8 × 6 × 4 × 2 = 3,840. Double factorial multiplies every other number, so even numbers step down by 2.
Inputs
Result
100! has 158 digits and 24 trailing zeros. Stirling's approximation gives 9.32 × 10¹⁵⁷ with only 0.083% error at this magnitude.
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.
| n | n! | Digits |
|---|---|---|
| 5 | 120 | 3 |
| 10 | 3,628,800 | 7 |
| 20 | 2.43 × 10¹⁸ | 19 |
| 100 | 9.33 × 10¹⁵⁷ | 158 |
| 170 | 7.26 × 10³⁰⁶ | 307 |
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).
| n | n! | n!! | Ratio n!/n!! |
|---|---|---|---|
| 6 | 720 | 48 | 15 |
| 8 | 40,320 | 384 | 105 |
| 10 | 3,628,800 | 3,840 | 945 |
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.
| n | n! | !n | Probability (!n/n!) |
|---|---|---|---|
| 3 | 6 | 2 | 33.3% |
| 5 | 120 | 44 | 36.7% |
| 10 | 3,628,800 | 1,334,961 | 36.79% |
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.
| n | Exact n! | Stirling | Error % |
|---|---|---|---|
| 5 | 120 | 118.02 | 1.65% |
| 10 | 3,628,800 | 3,598,696 | 0.83% |
| 20 | 2.43×10¹⁸ | 2.42×10¹⁸ | 0.42% |
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.
| Application | Formula | Example |
|---|---|---|
| Permutations | n!/(n-k)! | 5!/(5-3)! = 60 |
| Combinations | n!/(k!(n-k)!) | 10!/(3!7!) = 120 |
| Taylor (e^x) | Σ x^n/n! | e² = 1+2+2+1.33+... |
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.
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.