Permutations count ordered selections and combinations count unordered ones, of r items from n. Permutations: nPr = n! ÷ (n − r)!. Combinations: nCr = n! ÷ (r! × (n − r)!). For example, from 5 items choosing 2 there are 5!/(3!) = 20 permutations but 20 ÷ 2! = 10 combinations. Use permutations when order matters and combinations when it doesn't.
Permutation & Combination Calculator — nPr and nCr
Choosing 2 from 5.
- Permutations (nPr, order matters)
- 20
Quick examples
How it's calculated
- Combinations: nCr = n! ÷ (r! × (n − r)!)
- n
- = 5
- r
- = 2
- 10
- Permutations: nPr = n! ÷ (n − r)!
- n
- = 5
- r
- = 2
- 20
How it works
Both permutations and combinations count how many ways you can pick r items from a set of n. The difference is whether order matters:
- Permutations (order matters) — nPr = n! ÷ (n − r)!
- Combinations (order doesn't) — nCr = n! ÷ (r! × (n − r)!)
A permutation treats "A then B" as different from "B then A"; a combination treats them as the same choice. That's the only difference in the formulas, too: the combination divides the permutation count by r!, the number of ways to order the r chosen items — cancelling out all the orderings a combination doesn't care about.
Worked example
Pick 2 items from 5. For permutations, there are 5 choices for the first and 4 for the second:
nPr = 5! ÷ (5 − 2)! = 5 × 4 = 20
For combinations, divide by 2! = 2 to ignore order:
nCr = 20 ÷ 2! = 10
So there are 20 ordered ways but only 10 distinct pairs. Scaling up, the number of 5-card poker hands from a 52-card deck is a combination (order in your hand doesn't matter): C(52, 5) = 2,598,960.
Frequently asked questions
When do I use permutations vs combinations?
- Use **permutations** when the arrangement or sequence matters — race finishing orders, PIN codes, seating in a row. Use **combinations** when you only care which items were chosen, not their order — lottery numbers, a committee, a hand of cards. If swapping two picks makes a genuinely different outcome, it's a permutation.
What do nPr and nCr mean?
- They're standard notation: **nPr** is the number of permutations of r items from n, and **nCr** the number of combinations. nCr is also written C(n, r) or the "binomial coefficient" — read "n choose r". Here n is the total number of items and r how many you select.
Why does the combination divide by r!?
- Because every combination of r items can be arranged in r! different orders, and permutations count all of those separately. Dividing the permutation count by r! collapses each group of orderings down to one, leaving only the distinct selections. That's why nCr = nPr ÷ r!.
Can r be larger than n?
- No — you can't choose more items than you have, so both counts are undefined when r exceeds n, and this calculator returns no value. Choosing all n (r = n) gives exactly one combination, and choosing none (r = 0) also gives one — the empty selection.
What if items can repeat?
- These formulas assume each item is chosen at most once (selection **without replacement**). If repeats are allowed — like a 4-digit code where digits can recur — the counting is different (for ordered-with-repeats it's simply nʳ). This calculator covers the standard no-repeat case.
How do these relate to probability?
- Combinations are the backbone of many probability calculations: the chance of a specific hand or lottery draw is one favorable outcome over the total number of combinations. The binomial distribution, for instance, uses nCr to count the ways k successes can occur among n trials.
How we know this is right
- Last reviewed
- Aug 4, 2026
- Precision
- Rounded to 0 decimal places.
Sources
- Wolfram MathWorld Permutation — Wolfram MathWorld: a permutation is "a rearrangement of the elements of an ordered list"; the number of ordered selections of r from n is nPr = n!/(n−r)! · Reviewed Aug 4, 2026
- Wolfram MathWorld Combination — Wolfram MathWorld: "the number of ways of picking r unordered outcomes from n possibilities ... also known as the binomial coefficient", nCr = n!/(r!(n−r)!) · Reviewed Aug 4, 2026