Permutation and Combination Calculator
Calculate the number of ways to arrange or choose items from a set.
Try an example
13,983,816
About this calculator
Permutations and Combinations
Permutations and combinations are the two basic ways of counting selections from a set, and together they form the core of combinatorics — the study of finite, countable structures. The key difference is whether order matters. A permutation counts arrangements where order matters, such as the finishing order of a race. A combination counts selections where order does not matter, such as choosing which people join a committee. (A "combination lock" is really a permutation lock, since 1-2-3 and 3-2-1 open different things.) Enter n and r in this calculator to get both counts.
Permutations: nPr
The number of ways to arrange r items chosen from n distinct items is nPr = n! ÷ (n − r)!. The factorial n! means n × (n − 1) × … × 1. How many ways can you award gold, silver and bronze among 6 runners? 6P3 = 6! ÷ 3! = 120. If every item is used, the count is simply n!, so 5 books on a shelf can be ordered 120 ways.
Worked Example
Choosing 6 numbers from 49 (a classic lottery format): there are 13,983,816 possible combinations — and 10,068,347,520 permutations, since that count also treats every different ordering of the same 6 numbers as distinct.
Combinations: nCr
The number of ways to choose r items from n when order does not matter is nCr = n! ÷ [r! × (n − r)!]. Choosing 3 team members from 6 candidates gives 6C3 = 20 — far fewer than the 120 permutations, because each group of 3 can be arranged in 3! = 6 orders that now count as one. In general, nCr = nPr ÷ r!.
Quick Ways to Decide Which One You Need
- Does swapping two chosen items give a different outcome? If yes, it is a permutation.
- Are you forming a group, hand or committee? Probably a combination.
- Are you assigning ranks, positions or a sequence? Probably a permutation.
These variants assume items cannot be repeated. When repetition is allowed, the formulas change: permutations with repetition are nʳ, which is how the number of possible PIN codes is counted.
Connections to Probability
Counting outcomes is the first step in many probability problems: the chance of a particular hand of cards, for example, is the number of favorable combinations divided by the total number of combinations. Continue with the Probability Calculator, or build a quick sample with the Random Number Generator.
Worked example
Choosing 6 numbers from 49 (like a lottery draw) gives C(49,6) = 13,983,816 possible combinations, where order doesn't matter — far more than the 10,068,347,520 permutations, where it does.
Frequently asked questions
What's the difference between a permutation and a combination?
A permutation counts arrangements where order matters (ABC is different from BCA); a combination counts selections where order doesn't matter (ABC and BCA are the same group).
Why is the combination count always smaller?
Every combination of r items can be arranged in r! different orders, all of which count as separate permutations — so permutations = combinations × r!.
What if r is larger than n?
That's not possible — you can't choose or arrange more items than exist in the set, so the calculator won't return a result.

