In short
A combination counts the ways to choose r items from n when order does not matter, such as a committee or a poker hand. A permutation counts the arrangements when order matters, such as first, second and third place. nPr = n!/(n − r)!, and nCr divides that by r factorial, because each group of r can be ordered in r factorial ways.
How it works
nPr = n!/(n − r)! nCr = n!/(r!(n − r)!)
ordered: nʳ unordered: (n + r − 1)Cr
n factorial, written n!, means n × (n − 1) × … × 1, and 0! is 1. The calculator multiplies the factors with whole-number arithmetic, so even 1000C500 is exact. OpenStax Contemporary Mathematics prints 38C5 as 501,492 in Example 7.10; the correct value is 501,942.
Worked examples
A committee of 3 from 8 people
8C3 = 8! ÷ (3! × 5!) = 56 committees. If the three roles differ (chair, secretary, treasurer), order matters: 8P3 = 8 × 7 × 6 = 336.
Two cards from a 52-card deck
There are 1,326 two-card hands, and 2,652 ordered deals, since each hand can be dealt in 2 orders.
A lottery that draws 5 numbers from 38
38C5 = 501,942, so one ticket has a 1 in 501,942 chance of matching all five numbers.
Using this calculator well
- Does order matter? Rankings, passwords and seating plans are permutations. Teams, hands of cards and pizza toppings are combinations.
- Can an item be used twice? A PIN can repeat digits, so a 4-digit PIN has 10⁴ = 10,000 options. Choosing 3 scoops from 5 flavours, repeats allowed, gives 7C3 = 35.
- nCr is symmetric: choosing 3 people to go is the same as choosing 5 to stay, so 8C3 = 8C5.
Frequently asked questions
What is the difference between a permutation and a combination?
A permutation counts ordered arrangements and a combination counts unordered groups. Picking a gold, silver and bronze winner from 8 runners gives 336 permutations. Picking any 3 of the 8 to advance gives 56 combinations, because each group of 3 can be ordered 6 ways.
What does n choose r mean?
It is another name for nCr, the number of ways to choose r items from n without caring about order. It is also called the binomial coefficient, because it gives the coefficients when you expand (a + b)ⁿ. For example, 5 choose 2 is 10.
Why is 0! equal to 1?
There is exactly one way to arrange nothing: do nothing. Defining 0! as 1 also keeps the formulas working, so nCn and nC0 both come out as 1, matching the single way to take everything or nothing.
How many combinations does a 4-digit lock have?
A lock with digits 0 to 9 on each of 4 wheels has 10⁴ = 10,000 settings, because order matters and digits can repeat. Strictly that is a permutation with repetition. If no digit could repeat, it would be 10P4 = 5,040.
Sources and methodology
- Contemporary Mathematics, 7.3 Combinations, OpenStax, Rice University, nCr = n! ÷ (r!(n − r)!); Example 7.9: 8C3 = 56, 12C5 = 792, 15C9 = 5,005; Example 7.10: 52C2 = 1,326; prints 38C5 as 501,492, which is 501,942 (accessed November 24, 2026)
- Contemporary Mathematics, 7.2 Permutations, OpenStax, Rice University, nPr = n! ÷ (n − r)!; Example 7.4: 8 × 7 × 6 = 336, 8! = 40,320; Example 7.6: 12P3 = 1,320, 8P5 = 6,720; Example 7.7: 312P2 = 97,032 (accessed November 24, 2026)
Rounding: Exact whole numbers. Results longer than 21 digits are shown in scientific notation to 7 significant digits.
Review status: formulas verified against the cited sources by automated tests; editorial review pending. Version 1.0.0, content updated November 24, 2026.
Changelog
- 1.0.0 · November 24, 2026: First published.
How we build and test calculators
Embed this calculator on your site
Paste this code into your page. The calculator runs in a frame, with no tracking and no cookies, and links back here for the formula and sources.
<iframe src="https://northcalculator.com/embed/en/combinations" title="Permutation and Combination Calculator" width="100%" height="760" style="border:0" loading="lazy"></iframe>