SwiftCalculators Header
Statistics & Probability

Permutation and Combination Calculator

Calculate the exact number of possible permutations (nPr) and combinations (nCr) when selecting r elements from a set of n elements.

⚡ Exact Step-by-Step Formulas 🔒 100% Private 📱 Mobile Friendly
🔢

Ready to Calculate

Enter the size of your set (n) and sub-set (r) to see the total number of Permutations and Combinations.

Order Matters
0
ℹ️ Permutations (nPr)
Permutation Breakdown

Order Doesn't Matter
0
ℹ️ Combinations (nCr)
Combination Breakdown

What are Permutations and Combinations?

Permutations and combinations are fundamental concepts within a branch of mathematics known as combinatorics, which involves studying finite, discrete structures. While both terms refer to the process of selecting objects from a larger set, they differ critically in one aspect: whether the order of the selection matters.

  • Permutations: Specific selections of elements where the order in which the elements are arranged is important. (e.g., A password where "123" is entirely different from "321").
  • Combinations: Selections of elements where order does not matter. (e.g., A fruit salad containing apples and bananas is the exact same salad as one containing bananas and apples).

A typical "combination lock" should technically be called a "permutation lock" by mathematical standards! Because the order of the numbers entered is strictly enforced, entering 1-2-9 will open the lock, but entering 2-9-1 will not.

Calculating Permutations (nPr)

The permutation calculator evaluates arrangements of a fixed number of elements r, taken from a given set n. This is referred to as an r-permutation of n, and is denoted as nPr, nPr, or P(n,r).

In cases without replacement, all possible ways elements can be listed in a specific order are counted. However, the number of choices reduces each time an element is drawn. Imagine picking a team captain and a goalkeeper from 11 players. Once player "A" is chosen as captain, they cannot also be the goalkeeper.

If you were to pick an order for the entire team, the possibilities would be 11 × 10 × 9 ... × 1, written as 11! (11 factorial). But since we only need the first two choices (Captain and Goalkeeper), only the first two multiplications (11 × 10 = 110) are relevant. The equation removes the unneeded tail-end of the factorial by dividing out (11 - 2)!, giving us the generalized formula:

Permutations (without replacement) Formula:

nPr = n! / (n - r)!

Where n = Total elements, r = Chosen elements, and "!" denotes a factorial.

If elements can be repeated (e.g., a combination lock where 3-3-3 is a valid input), the math simplifies dramatically to nr.

Calculating Combinations (nCr)

Combinations are essentially permutations where all the redundant variations are removed because the order is irrelevant. Combinations are typically denoted as nCr, C(n,r), or written vertically as a binomial coefficient.

Using the soccer team example, suppose we want to pick 2 "strikers" from the 11 players. Whether we pick player "A" then player "B", or "B" then "A", the result is the exact same pair of strikers playing on the field.

To determine the true number of unique combinations, we take the total number of permutations (which counts A-B and B-A as separate outcomes) and divide out the redundancies. The number of ways to arrange the chosen players is r!. Therefore, we divide the permutation formula by r! to arrive at the combination formula:

Combinations (without replacement) Formula:

nCr = n! / [ r! × (n - r)! ]

It makes mathematical sense that there will always be fewer combination choices than permutation choices for the same variables, since the redundant, re-ordered sets are being removed from the final count.

Frequently Asked Questions

The exclamation mark represents a "factorial". A factorial is the product of an integer and all the integers below it. For example, 5! (five factorial) equals 5 × 4 × 3 × 2 × 1, which is 120. By definition, 0! is always equal to 1.

If you are calculating without replacement, no. You cannot select 5 objects from a pool of only 3 objects. However, if you are calculating with replacement (where objects are returned to the pool after being picked), it is entirely possible for the subset 'r' to be greater than the total set 'n'.

If n = r without replacement, the number of combinations will simply be 1 (there is only one way to select all items). The number of permutations will be n! (n factorial), representing the total number of ways to organize the entire set into different sequences.

With replacement means that after you select an item from a set, it is "replaced" back into the pool before the next selection. This means the same item can be picked more than once. Without replacement means an item can only be picked once and is removed from the available pool.

Permutations treat different orderings of the exact same items as unique outcomes (e.g., ABC, ACB, BAC are three different permutations). Combinations group all of those together as a single outcome (ABC is the same combination as ACB). By removing those redundant orderings, the total count for combinations shrinks substantially compared to permutations.