About the permutations and combinations calculator
A permutation counts ordered arrangements. P(n, r) is the number of ways to pick r items out of n when the order you pick them in matters, and equals n factorial divided by (n minus r) factorial. Choosing a president and a treasurer from a club is a permutation, because swapping the two people gives a different outcome.
A combination counts unordered selections. C(n, r), read n choose r, is the number of ways to pick r items out of n when order does not matter, and equals P(n, r) divided by r factorial. Choosing a two-person committee is a combination, because the same two people are the same committee either way.
Combinations are symmetric: C(n, r) equals C(n, n minus r), since choosing which r to include is the same as choosing which n minus r to leave out. Results are computed in arbitrary precision integers, so a value like C(200, 100) comes back exact rather than in floating point notation.
Worked example
Worked example
Inputn = 5, r = 2
ResultP(5, 2) = 20, C(5, 2) = 10
There are 20 ordered pairs and 10 unordered pairs, and 20 divided by 2 factorial is 10.