Combinations Calculator
A combination is a selection of items where the order does not matter. The combinations formula C(n,r) = n! / (r! * (n-r)!) calculates the number of ways to choose r items from n total items. For example, if you have 5 people and want to choose 2 to form a committee, the order does not matter: choosing Alice and Bob is the same selection as choosing Bob and Alice. The combinations formula gives you 10 possible committees. This calculator also shows the related permutations formula P(n,r) = n! / (n-r)!, which counts selections where order does matter (AB and BA are different). Pascal's triangle is displayed for the chosen value of n, showing all the combinations in that row. A reference table of factorials is included for quick reference.
Formulas
C(n,r) = n! / (r! * (n-r)!)
P(n,r) = n! / (n-r)!
n! = n * (n-1) * (n-2) * ... * 1
Pascal's triangle for n
Factorial reference table
| n | n! |
|---|---|
| 0 | 1 |
| 1 | 1 |
| 2 | 2 |
| 3 | 6 |
| 4 | 24 |
| 5 | 120 |
| 6 | 720 |
| 7 | 5,040 |
| 8 | 40,320 |
| 9 | 362,880 |
| 10 | 3,628,800 |
Combinations calculator: frequently asked questions
What is a combination?
A combination is a selection of items where the order does not matter. For example, choosing 2 people from a group of 5 is a combination. The formula is C(n,r) = n! / (r! * (n-r)!), where n is the total number of items and r is the number chosen.
What is the difference between combinations and permutations?
In combinations, order does not matter (AB is the same as BA). In permutations, order matters (AB is different from BA). Combinations are always smaller or equal to permutations for the same n and r.
What is Pascal's triangle?
Pascal's triangle is a triangular array where each number is the sum of the two numbers above it. Row n contains the binomial coefficients C(n,0), C(n,1), ..., C(n,n). It appears in many areas of mathematics and combinatorics.
What is a factorial?
A factorial, written as n!, is the product of all positive integers up to n. For example, 5! = 5 * 4 * 3 * 2 * 1 = 120. By definition, 0! = 1.
Can r be larger than n?
No. In combinations and permutations, r (items chosen) cannot exceed n (total items available). If r > n, the result is 0.
Official sources
- Wolfram MathWorld: Combination.
- Wikipedia: Combination.
Reviewed by the CalculatorHub team, edited by James Graham, 14 June 2026. See our methodology.