The permutation and combination calculator gives the number of ways to choose or arrange r items from n: combinations (order doesn't matter), permutations (order matters), both with and without repetition, plus n factorial. Results are exact, even for huge numbers like 100 choose 50. Enter n and r and the answers appear instantly in your browser.
| Count | Formula | n = 5, r = 2 |
|---|---|---|
| Combinations | n! / (r!(n − r)!) | 10 |
| Permutations | n! / (n − r)! | 20 |
| Combinations with repetition | (n + r − 1)! / (r!(n − 1)!) | 15 |
| Permutations with repetition | nʳ | 25 |
A combination is a selection where order doesn't matter (a team); a permutation is an arrangement where it does (a podium or PIN).
49C6 = 13,983,816.
Choosing where the same item can be picked more than once, like scoops of ice cream from a set of flavors: C(n + r − 1, r).
Up to 5,000. Results are exact big integers, shown in scientific form when very long.
No. It's calculated in your browser.
Results are exact because they're computed with JavaScript's arbitrary-precision BigInt rather than floating point. Combinations C(n, r) = n! ÷ (r!(n − r)!) are computed multiplicatively with r replaced by min(r, n − r), dividing at each step so intermediate values stay as small as possible. Permutations P(n, r) = n! ÷ (n − r)! multiply the top r factors. Combinations with repetition (multisets) are C(n + r − 1, r), and permutations with repetition are nʳ. The factorial n! is shown too. Values up to 60 digits are displayed in full with separators; longer ones are shown as d.dddddd × 10^k with the exact exponent. If r is larger than n there are no ways to choose without repetition, and the result is 0.