Combinations, permutations and factorial
C(n, k) = n! / (k! × (n − k)!)
The three counts of combinatorics, as exact values whatever their size: combinations C(n, k) when order does not matter (a card hand, a committee). Permutations P(n, k) when it does (a podium, a ranking), and the factorial n!. Everything is computed in exact integers: C(52, 5) = 2,598,960 as such, and 100! with its 158 digits, where floating-point calculators round off after 15 digits.
2,598,960
- Formula
- C(n, k) = n! / (k! × (n − k)!)
5 objects chosen out of 52, order irrelevant. Each group is counted once. EXACT value, computed in integers, not floats.
Scientific dossier
What the tool computes, what it assumes, where it stops being valid, and where its data comes from.
Method & formulasC(n, k) = n! / (k! × (n − k)!)
C(n, k) = n! / (k! × (n − k)!)
P(n, k) = n! / (n − k)!
n! = 1 × 2 × … × n, with 0! = 1
link: P(n, k) = C(n, k) × k!
A single question separates the first two counts: does order matter? A podium (gold, silver, bronze) is a permutation; a three-person committee is a combination. The same trio appears once there, while it makes 3! = 6 different podiums. That is exactly the k! factor between the two formulas. The internal computation uses exact integers (BigInt), through the multiplicative form of C(n, k) whose every intermediate step is an integer binomial coefficient: no approximate division, no rounding, ever.
- Combination, “n choose k”
- · a subset of k objects taken from n, unordered. C(n. K) is also the binomial coefficient, the one in the expansion of (a + b)ⁿ and in the binomial distribution.
- Permutation
- · an ordered sequence of k distinct objects taken from n. Without repetition: the same object cannot be chosen twice.
- 0! = 1
- · a necessary convention, not a whim: there is exactly one way to order zero objects (do nothing), and it keeps the formulas consistent. C(n, n) = C(n, 0) = 1.
Validity domainThe tool counts distinct objects without repetition: neither arrangements with replacement (nᵏ), nor combinations with repetition, nor permutations of partially identical objects (anagrams).
The tool counts distinct objects without repetition: neither arrangements with replacement (nᵏ), nor combinations with repetition, nor permutations of partially identical objects (anagrams). Neighbouring but different counts. n is capped at 5,000: beyond that, results run to tens of thousands of digits and leave the scope of a web tool. The displayed floating-point order of magnitude becomes “beyond 10³⁰⁸” when it overflows, the exact value stays correct.
Common pitfall: mixing up podium and committee“How many podiums with 10 runners?
“How many podiums with 10 runners?”: order matters, P(10, 3) = 720. “How many qualified trios?”: order does not matter, C(10, 3) = 120. Six times fewer, since each trio makes 3! podiums. Picking the wrong count multiplies or divides the result by a whole k!. Another useful anchor: the symmetry C(n, k) = C(n, n − k), choosing k objects is exactly discarding n − k.