Combinations and permutations calculator
Count ordered selections, unordered subsets, and factorial arrangements with exact integers.
Browser compute / no account / no upload
Count arrangements with or without regard to order. Combinations are subsets, permutations are ordered selections, and the factorial counts orderings of a whole set.
Method
- Permutations count ordered selections: AB and BA are different. Combinations count subsets: AB and BA are the same.
- P(n, k) = n! / (n - k)! and C(n, k) = n! / (k!(n - k)!). The calculator evaluates them with exact integer steps to avoid overflow.
- The limits are n up to 1000 and 0 <= k <= n. Factorials grow quickly, so the result is also shown in full for large values.
Reference: NIST DLMF: Binomial Coefficients
Formulas
Worked example: a committee
Example 1
Choosing a committee
Problem
A department has 10 people and needs a committee of 3. How many committees are possible?
Solution
Order does not matter, so use combinations.
Apply the formula: .
Cancel the 7! factor: .
Answer
120 committees
Worked example: a podium
Example 2
First, second, and third place
Problem
Eight runners compete. How many ways can the gold, silver, and bronze medals be awarded?
Solution
Order matters, so use permutations.
Apply the formula: .
Answer
336 podium orders
When to use each count
| Selection | Order matters | Order ignored |
|---|---|---|
| Choose 2 from A, B, C | AB, AC, BA, BC, CA, CB = 6 | AB, AC, BC = 3 |
| Choose 3 from 10 | P(10,3) = 720 | C(10,3) = 120 |
| Arrange all 5 letters | 5! = 120 | 1 if all letters are used |
Common mistakes
- Using permutations when order does not matter, which overcounts each group by $k!$.
- Using combinations when order matters, which undercounts by the same factor.
- Forgetting that $0! = 1$. It makes $C(n,0) = C(n,n) = 1$.
- Allowing $k$ to exceed $n$. There are no ways to choose more items than you have without replacement.
- Rounding a large result. Counting problems need exact integers, which is why this calculator uses big integers.
Limits and assumptions
Key takeaways
- Permutations count ordered selections; combinations count unordered subsets.
- $P(n,k) = n!/(n-k)!$ and $C(n,k) = n!/(k!(n-k)!)$.
- Selection without replacement is assumed unless replacement is stated.
- Exact integers matter, and the full result is available for every count.