Permutations and Combinations

See also: probability

Permutations and Combinations Calculator

The calculator below will calculate number of permutations or combinations.

Choose type:
Repetition:
n = r =

Please report any error to [email protected]. Thank you.



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 nPr or nPr.
The formula is given by

P(n,r) = nPr = nPr = 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 (i.e. {a,b} is considered different from {b,a}).
The number of permutations is 6.

P(3,2) = 3P2 = 3P2 = 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, 5P5 = 5!/(5-5)! = 5!/0! = (5 × 4 × 3 × 2 × 1)/1 = 120.

As can be seen from the above example, when n = r, the formula for nPr = 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 nCr or nCr.
The formula is given by

C(n,r) = nCr = nCr = n!
r! (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 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 (i.e. {b,a} is considered the same as {a,b}).
The number of combinations is 3.

C(3,2) = 3C2 = 3C2 = 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, 5C5 = 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