Factorial Calculator — Free Online n! Calculator
Calculate factorials for any value from 0 to 1000 with exact arbitrary-precision results, full expansion, digit count, and trailing zero analysis.
| n | n! |
|---|---|
| 0 | 1 |
| 1 | 1 |
| 2 | 2 |
| 3 | 6 |
| 4 | 24 |
| 5 | 120 |
| 6 | 720 |
| 7 | 5040 |
| 8 | 40320 |
| 9 | 362880 |
| 10 | 3628800 |
10!
3,628,800
Expansion
10 × 9 × 8 × 7 × 6 × 5 × 4 × 3 × 2 × 1 = 3628800Formula
n! = n × (n-1) × (n-2) × ... × 2 × 1Digits in Result
7
Trailing Zeros
2
Factorial Reference Table
| n | n! | Digits | Trailing Zeros |
|---|---|---|---|
| 0 | 1 | 1 | 0 |
| 5 | 120 | 3 | 1 |
| 10 | 3,628,800 | 7 | 2 |
| 15 | 1,307,674,368,000 | 13 | 3 |
| 20 | 2,432,902,008,176,640,000 | 19 | 4 |
| 50 | 3.04 × 10⁶⁴ | 65 | 12 |
| 100 | 9.33 × 10¹⁵⁷ | 158 | 24 |
| 500 | 1.22 × 10¹¹³⁴ | 1,135 | 124 |
| 1000 | 4.02 × 10²⁵⁶⁷ | 2,568 | 249 |
Related Calculators
Permutation & Combination Calculator
Calculate nPr and nCr using factorials for counting problems.
Probability Calculator
Use factorials in probability calculations for events and outcomes.
Statistics Calculator
Comprehensive descriptive statistics for data analysis.
Standard Deviation Calculator
Calculate standard deviation and variance for any dataset.
Scientific Calculator
Perform advanced calculations with scientific functions.
Percentage Calculator
Calculate percentages and proportions for everyday math.
About this calculator
Factorial Formula and Properties
Factorial Definition
n! = n × (n-1) × (n-2) × ... × 2 × 1 Recursive Definition
n! = n × (n-1)!, with 0! = 1 Stirling's Approximation (for large n)
n! ≈ √(2πn) × (n/e)^n Trailing Zeros Formula
zeros = ⌊n/5⌋ + ⌊n/25⌋ + ⌊n/125⌋ + ⌊n/625⌋ + ... Variables Explained
- n: A non-negative integer (0, 1, 2, 3, ...) for which the factorial is calculated.
- n!: The factorial of n — the product of all positive integers from 1 to n.
- 0!: Defined as 1 by convention, necessary for combinatorial formulas to work correctly.
- e: Euler's number (approximately 2.71828), used in Stirling's approximation.
- π (pi): Approximately 3.14159, also appears in Stirling's approximation.
Step-by-Step Example
Calculate 7! and find the number of trailing zeros.
- Write out the multiplication: 7! = 7 × 6 × 5 × 4 × 3 × 2 × 1
- Multiply step by step: 7 × 6 = 42
- 42 × 5 = 210
- 210 × 4 = 840
- 840 × 3 = 2,520
- 2,520 × 2 = 5,040
- 5,040 × 1 = 5,040
- Trailing zeros: ⌊7/5⌋ = 1 (7! = 5,040 has 1 trailing zero)
The factorial 7! = 5,040. It has 4 digits and 1 trailing zero. The trailing zero comes from the single factor of 5 in the product (from 5 itself). The factor of 2 to pair with it comes from any of the even numbers (2, 4, 6).
Sources
- Khan Academy — Factorials and Permutations: khanacademy.org
- NIST Digital Library of Mathematical Functions — Gamma Function: dlmf.nist.gov
- Math is Fun — Factorial: mathsisfun.com
Disclaimer: This calculator is for informational and educational purposes only. Results are estimates and may not reflect exact values.
Last updated: November 3, 2026