` I Do Maths · Counting Rules: Permutations and Combinations

See also: probability


The calculator below will calculate number of permutations or combinations.

Permutations and Combinations Calculator
Choose type:
Repetition:
n=
r=

Please report any error to contact@idomaths.com



Permutation is an ordered arrangement of a number of elements of a set.

Mathematically, given a set with n numbers of elements, the number of permutations of size r is denoted by P (n,r) or Prn or Prn.

The formula is given by

P (n,r) = Prn = Prn = n! (n-r)!

where n! (n factorial) =n×(n-1)×(n-2)×...×1 and 0!=1.

For example, given the set of letters {a,b,c}, the permutations of size 2 (take 2 elements of the set) are {a,b}, {b,a}, {a,c}, {c,a}, {b,c}, and {c,b}. Please note that the order is important; {a,b} is considered different from {b,a}.

The number of permutations is 6.

P (3,2) = P23 = P23 = 3! (3-2)! = 3×2×1 1! = 6 1 = 6

Another example: How many different ways are there can 5 different books be arranged on the self?

Answer: Here, n=5 and r=5.
So,

P55 = 5! (5-5)! = 5×4×3×2×1 0! = 120 1 = 120

As can be seen from the above example, when n=r, then Prn=n!.


Combination is an unordered arrangement of a number of elements of a set.

Given a set with n numbers of elements, the number of combinations of size r is denoted by C (n,r) or Crn or Crn.

The formula is given by

C (n,r) = Crn = Crn = n! r!(n-r)!

For example, given the set of letters {a,b,c}, the combinations of size 2 (take 2 elements of the set) are {a,b}, {a,c}, and {b,c}. Please note that the order is not important; {b,a} is considered the same as {a,b}.

The number of combinations is 3.

C (3,2) = C23 = C23 = 3! 2!(3-2)! = 3×2×1 2×1×1! = 6 2 = 3

Another example: A basket contains an apple, an orange, a pear, and a banana. How many combinations of three fruits are there?

Answer: Here, n=4 and r=3.
So,

C34 = 4! 3!(4-3)! = 4×3×2×1 (3×2×1)1! = 24 6 = 4

For combination, when n=r, the number of combinations is always equal to 1.

By Jimmy Sie

See also: probability