• Permutations & Combinations

    Permutation is a selection of r items from a set of n items and the order of items matters and the repetition of any item may be allowed, where r <= n.

    Combination is an unordered selection of r items from a set of n items and the order of items does not matter, where r <= n.

    Example: In a fruit salad made up of 3 fruits, apples, pears and bananas, when cut up and mixed, the fruit salad will look and taste the same regardless of the order in which the 3 fruits are selected, cut and mixed. In this case when the order does NOT matter it is a combination.

    But in the case of a permutation lock as an example, where 3 numbers are chosen from three sets of 10s, the order does matter. If we consider the 3 numbers to be 3, 4, 5 each is chosen from a 0-9 set. Then the 345 combination is different from 453 and 543. In this case, the order matters. When the order matters, it is a permutation. Permutation can have a repetition. For example the permutation lock can be 555. Therefore a permutation is an ordered selection of r items from a set of n items where repetition may be allowed or not.

    In the table to the right, the exclamation mark ! indicates a factorial of a number, and it is written to the right of the number. E.g. n! means the product of all integers from 1 to n inclusive and is called 'n factorial'. rule, 0! = 1.
    Example: 5! = 5 x 4 x 3 x 2 x 1 = 120.

    Permutations & Combinations Formulae

    Permutations & Combinations Order Repetition Formula
    Order matters

    nPr or nPr
    Yes Yes Perm With Repetition
    Yes No Perm Without Rep
    Order does NOT matter

    nCr or nCr
    No No Comb with Rep
    No Yes comb without Rep

Permutations & Combinations Tool

Use the following program to find the permutations or combinations of r items selected from a set of n items.
r <= n.

Canvas Setting

Change the dimensions of the canvas if they are unsuitable or accept the default values.
If the canvas is too large or too small, it can be reset and the program re-run, until a suitable size is found.

  Canvas Width :
  Canvas Height :
  Cell Width :


Enter the set n of data to choose from. This can be single characters such as a b c or 1 2 3 or words such apple pear and banana, separated by commas with no spaces.
Enter the number of items r to choose from the set, r <= n.
Answer the importance and repetition questions.
When all data in entered, click on solve.

  Set of items to choose from:  
  Number of items to choose:  
  Is order important?  
  Is repetition allowed?  


Visual representation of the Permutations / Combinations