Skip to content
Embed

Paste this on your site. The attribution link is required and is what makes embedding free.

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.

nn!
01
11
22
36
424
5120
6720
75040
840320
9362880
103628800

10!

3,628,800

Expansion

10 × 9 × 8 × 7 × 6 × 5 × 4 × 3 × 2 × 1 = 3628800

Formula

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

Digits in Result

7

Trailing Zeros

2

Factorial Reference Table

n n! Digits Trailing Zeros
0110
512031
103,628,80072
151,307,674,368,000133
202,432,902,008,176,640,000194
503.04 × 10⁶⁴6512
1009.33 × 10¹⁵⁷15824
5001.22 × 10¹¹³⁴1,135124
10004.02 × 10²⁵⁶⁷2,568249

Related Calculators

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.

  1. Write out the multiplication: 7! = 7 × 6 × 5 × 4 × 3 × 2 × 1
  2. Multiply step by step: 7 × 6 = 42
  3. 42 × 5 = 210
  4. 210 × 4 = 840
  5. 840 × 3 = 2,520
  6. 2,520 × 2 = 5,040
  7. 5,040 × 1 = 5,040
  8. 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

Disclaimer: This calculator is for informational and educational purposes only. Results are estimates and may not reflect exact values.

Last updated: November 3, 2026