MyAIUtility

Factorial Calculator

Calculate factorials, double factorials, and subfactorials

5! (Factorial)
120
Number of Digits
3
Trailing Zeros
1

Expression

5! = 5 × 4 × 3 × 2 × 1

Step by Step

1! = 1
2! = 2
3! = 6
4! = 24
5! = 120

All Factorial Types

Factorial (5!)
120
Double Factorial (5!!)
15
Subfactorial (!5)
44

Definitions

Factorial (n!)

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

0! = 1 by definition

Double Factorial (n!!)

Product of integers from 1 to n with same parity

5!! = 5 × 3 × 1 = 15

Subfactorial (!n)

Number of derangements (permutations with no fixed points)

!n = (n-1)(!(n-1) + !(n-2))