Skip to content
Math & Statisticsprobability

Combination Calculator

Combinations, the binomial coefficient. Computed through log-gamma rather than raw factorials, so it stays exact well past where n! overflows.

Also called: ncr calculator, choose calculator.

Combinations
1,39,83,816

There are 1,39,83,816 ways to choose 6 from 49 when order does not matter, so a single ticket has a 1 in 1,39,83,816 chance.

Permutations, for contrast
10,06,83,47,520
Method and background

How this is calculated

Permutations divided by r!, because the chosen items' own ordering does not distinguish one selection from another. Computing it as exp(lnΓ(n+1) − lnΓ(r+1) − lnΓ(n−r+1)) avoids overflowing on numbers where n! alone would not be representable.

nCr = n! / (r! * (n-r)!)
n
Items available
r
Items chosen

Worked examples

Each of these is asserted on every build. If a change to the engine ever moved one of these answers, the build would fail before the page could print it.

49C6: a six-ball lottery

Choose from (n)
49
Choose how many (r)
6

Combinations1,39,83,816

known value for a 6-from-49 draw

Open this example

choosing none is one way

Choose from (n)
10
Choose how many (r)
0

Combinations1

boundary: the empty selection

Open this example

choosing more than exists is zero

Choose from (n)
4
Choose how many (r)
9

Combinations0

degenerate case

Open this example

Frequently asked questions

When do I use a combination rather than a permutation?
A combination when order does not matter, a permutation when it does. Choosing three people for a committee is a combination; choosing a chair, a secretary and a treasurer from the same three is a permutation, and there are six times as many of the latter.
Why is nCr the same as nC(n-r)?
Because choosing which r to include is the same act as choosing which n-r to leave out. Picking 3 from 10 and picking the 7 to discard are the same 120 choices described from opposite ends.