Calculate factorials (n!) instantly - the product of all positive integers from 1 to n.
Factorial Calculator
Table of Contents show ▼
What is a factorial?
The factorial of n (written n!) is the product of all positive integers from 1 to n.
For example: 5! = 5 x 4 x 3 x 2 x 1 = 120
By definition, 0! = 1. Factorials grow extremely fast - 20! already exceeds 2 quintillion.
Using the calculator
Enter any non-negative integer to calculate its factorial. The calculator handles values up to 170! (beyond that, results exceed JavaScript number limits).
Large results display in scientific notation for readability.
Factorial applications
Factorials are fundamental to combinatorics:
- Permutations - n! gives arrangements of n distinct items
- Combinations - C(n,r) = n! / (r!(n-r)!)
- Probability - counting outcomes in sample spaces
