Factorial Calculator
n! = n × (n-1) × (n-2) × ... × 2 × 1
Range: 0 - 170
About Factorials
The factorial of a number n (written as n!) is the product of all positive integers from 1 to n. For example:
- 5! = 5 × 4 × 3 × 2 × 1 = 120
- 10! = 10 × 9 × 8 × 7 × 6 × 5 × 4 × 3 × 2 × 1 = 3,628,800
- 0! = 1 (by definition)
Factorials grow very rapidly. They're essential in combinatorics for counting permutations and combinations, and appear frequently in probability and statistics.
Frequently Asked Questions
The factorial of a non-negative integer n, denoted by n!, is the product of all positive integers less than or equal to n. For example, 5! = 5 × 4 × 3 × 2 × 1 = 120. By definition, 0! = 1.
Factorials are commonly used in combinatorics (counting arrangements), probability theory, calculus (Taylor series), and computer science (algorithm analysis). They represent the number of ways to arrange n distinct objects.
Factorials grow extremely fast. 170! is approximately 7.26 × 10³⁰⁶, which is near the maximum value that can be accurately represented in JavaScript. Beyond this, precision is lost.