Skip to content
Kordu Tools

Factorial Calculator

Calculate n factorial, double factorial, subfactorial, trailing zeros, and digit count with large number support.

Enter a non-negative integer (0 to 10,000).

Enter a number to calculate.

Double Factorial (0!!)

0

Subfactorial (!0)

0

Trailing Zeros

0

Digit Count

0

nn!Digits

Formulae

n! = 1 × 2 × 3 × ... × n (0! = 1)

n!! = product of every second integer down from n

!n = (n−1)(·!(n−1) + !(n−2)), !0 = 1, !1 = 0

Trailing zeros = Σ floor(n / 5^k) for k = 1, 2, 3, ...

How to use

  1. 1

    Enter a number

    Type a non-negative integer.

  2. 2

    View the results

    See n!, double factorial, subfactorial, trailing zeros, and digit count instantly.

  3. 3

    Explore the table

    Toggle table mode to see factorials for a range of values.

Frequently asked questions

What is the largest factorial I can compute?
The tool uses BigInt for exact results, so it handles very large values. Display may truncate extremely long numbers.
What is a subfactorial?
The subfactorial !n counts derangements — permutations where no element appears in its original position.
How are trailing zeros counted?
Count how many times 10 divides n!, which equals the sum of floor(n/5^k) for k=1,2,3...
Is my data sent anywhere?
No. All calculations run in your browser.

Compute factorials and related functions. Enter a non-negative integer

to calculate n!, double factorial (n!!), subfactorial (!n, derangements),

trailing zero count, and digit count. Supports large values using BigInt.

Table mode shows n! for a range of values. All processing runs in your

browser.

Related tools