n! for non-negative integers.
n! = n × (n−1) × (n−2) × … × 2 × 1, with 0! = 1
The factorial of a positive integer n is defined as the product of all positive integers from 1 through n. The special case 0! = 1 is defined by convention and is consistent with the empty product rule. The recursive definition states that n! = n × (n−1)!, with the base case 0! = 1.
7! = 7 × 6 × 5 × 4 × 3 × 2 × 1 = 5,040
Result: 7! = 5,040
The result 5,040 means there are 5,040 different ways to arrange 7 distinct objects in a sequence. This is the foundational use of factorials in permutations: the number of ways to order n items is always n!. Factorials grow extremely fast — for reference, 10! = 3,628,800 and 20! = 2,432,902,008,176,640,000.
A factorial (denoted n!) is one of the most important operations in combinatorics, probability, and analysis. It represents the total number of ways to arrange n distinct objects in order.
| Application | Formula | |---|---| | Permutations (ordered arrangements of n items) | n! | | Permutations of k items from n | n! / (n−k)! | | Combinations (binomial coefficients) | n! / (k! × (n−k)!) | | Probability of a specific ordering | 1 / n! | | Taylor series (e.g., e^x, sin x) | Denominators involve n! |
| n | n! | |---|---| | 0 | 1 | | 1 | 1 | | 2 | 2 | | 3 | 6 | | 4 | 24 | | 5 | 120 | | 6 | 720 | | 7 | 5,040 | | 10 | 3,628,800 | | 15 | 1,307,674,368,000 | | 20 | 2,432,902,008,176,640,000 |
Factorials are defined only for non-negative integers, but mathematicians extended the concept to real and complex numbers using the Gamma function: Γ(n) = (n−1)!, so Γ(n+1) = n! for positive integers.
10! = 10 × 9 × 8 × 7 × 6 × 5 × 4 × 3 × 2 × 1 = 3,628,800.
The number of ways to arrange k items chosen from n distinct items (ordered) is P(n,k) = n! / (n−k)!. For example, P(5,3) = 5! / 2! = 120 / 2 = 60.
C(n,k) = n! / (k! × (n−k)!). For example, C(6,2) = 720 / (2 × 24) = 720 / 48 = 15. This counts unordered selections.
The double factorial n!! is the product of all integers from 1 (or 2) up to n that have the same parity as n. For example, 7!! = 7 × 5 × 3 × 1 = 105. It is different from (n!)!.
Yes — **Stirling's approximation**: n! ≈ √(2πn) × (n/e)^n. It becomes increasingly accurate as n grows and is widely used in statistical mechanics and information theory.
0! = 1. This is a mathematical convention consistent with the empty product rule and is essential for combinatorial formulas like C(n, 0) = 1 to hold correctly.
This calculator can handle large non-negative integers and returns the exact full integer value of n!, with no approximation or scientific notation cutoff for reasonable inputs.
Standard factorial (n!) is only defined for non-negative integers. For non-integer values, the Gamma function Γ(n+1) generalizes the concept, but that is a separate operation.
Each step multiplies by a number one larger than before. By n = 20, the result already exceeds 2 quintillion. This super-exponential growth is why factorials appear in probability estimates involving astronomically small likelihoods.
If you randomly shuffle a deck of 52 cards, the total number of possible orderings is 52!, which is approximately 8.07 × 10^67 — more than the estimated number of atoms in the observable universe.
Only sources that have been reviewed are shown. Unverified citations are never published.
Spotted an inaccuracy or have an idea to improve this calculator? Let us know.
We use cookies to operate the site, and — with your consent — to show advertising and measure usage. You can change your choice anytime in Cookie Settings.