Permutation and Combination Calculator

Modify the values and click the calculate button to use
Total Amount in a Set (n)
Amount in each Sub-Set (r)

Result

Permutations, nPr
6!
(6 - 2)!
 = 30
Combinations, nCr
6!
2! × (6 - 2)!
 = 15

RelatedProbability Calculator | Sample Size Calculator


Permutations and combinations are part of a branch of mathematics called combinatorics, which involves studying finite, discrete structures. Permutations are specific selections of elements within a set where the order in which the elements are arranged is important, while combinations involve the selection of elements without regard for order. A typical combination lock for example, should technically be called a permutation lock by mathematical standards, since the order of the numbers entered is important; 1-2-9 is not the same as 2-9-1, whereas for a combination, any order of those three numbers would suffice. There are different types of permutations and combinations, but the calculator above only considers the case without replacement, also referred to as without repetition. This means that for the example of the combination lock above, this calculator does not compute the case where the combination lock can have repeated values, for example, 3-3-3.

Permutations

The calculator provided computes one of the most typical concepts of permutations where arrangements of a fixed number of elements r, are taken from a given set n. Essentially this can be referred to as r-permutations of n or partial permutations, denoted as nPr, nPr, P(n,r), or P(n,r) among others. In the case of permutations without replacement, all possible ways that elements in a set can be listed in a particular order are considered, but the number of choices reduces each time an element is chosen, rather than a case such as the "combination" lock, where a value can occur multiple times, such as 3-3-3. For example, in trying to determine the number of ways that a team captain and goalkeeper of a soccer team can be picked from a team consisting of 11 members, the team captain and the goalkeeper cannot be the same person, and once chosen, must be removed from the set. The letters A through K will represent the 11 different members of the team:

A B C D E F G H I J K   11 members; A is chosen as captain

B C D E F G H I J K   10 members; B is chosen as keeper

As can be seen, the first choice was for A to be captain out of the 11 initial members, but since A cannot be the team captain as well as the goalkeeper, A was removed from the set before the second choice of the goalkeeper B could be made. The total possibilities if every single member of the team's position were specified would be 11 × 10 × 9 × 8 × 7 × ... × 2 × 1, or 11 factorial, written as 11!. However, since only the team captain and goalkeeper being chosen was important in this case, only the first two choices, 11 × 10 = 110 are relevant. As such, the equation for calculating permutations removes the rest of the elements, 9 × 8 × 7 × ... × 2 × 1, or 9!. Thus, the generalized equation for a permutation can be written as:

nPr
n!
(n - r)!

Or in this case specifically:

11P2
11!
(11 - 2)!
 = 
11!
9!
 = 11 × 10 = 110

Again, the calculator provided does not calculate permutations with replacement, but for the curious, the equation is provided below:

nPr = nr

Combinations

Combinations are related to permutations in that they are essentially permutations where all the redundancies are removed (as will be described below), since order in a combination is not important. Combinations, like permutations, are denoted in various ways, including nCr, nCr, C(n,r), or C(n,r), or most commonly as simply

(n)
r
. As with permutations, the calculator provided only considers the case of combinations without replacement, and the case of combinations with replacement will not be discussed. Using the example of a soccer team again, find the number of ways to choose 2 strikers from a team of 11. Unlike the case given in the permutation example, where the captain was chosen first, then the goalkeeper, the order in which the strikers are chosen does not matter, since they will both be strikers. Referring again to the soccer team as the letters A through K, it does not matter whether A and then B or B and then A are chosen to be strikers in those respective orders, only that they are chosen. The possible number of arrangements for all n people, is simply n!, as described in the permutations section. To determine the number of combinations, it is necessary to remove the redundancies from the total number of permutations (110 from the previous example in the permutations section) by dividing the redundancies, which in this case is 2!. Again, this is because order no longer matters, so the permutation equation needs to be reduced by the number of ways the players can be chosen, A then B or B then A, 2, or 2!. This yields the generalized equation for a combination as that for a permutation divided by the number of redundancies, and is typically known as the binomial coefficient:

nCr
n!
r! × (n - r)!

Or in this case specifically:

11C2
11!
2! × (11 - 2)!
 = 
11!
2! × 9!
 = 55

It makes sense that there are fewer choices for a combination than a permutation, since the redundancies are being removed. Again for the curious, the equation for combinations with replacement is provided below:

nCr
(r + n -1)!
r! × (n - 1)!

The Permutation & Combination Calculator: A Practical Guide to Counting Without Error

This calculator does not merely compute large factorials. Its primary function is to prevent a critical, frequent error in quantitative reasoning: confusing arrangements with selections. The core utility is in its decision logic. It forces the user to answer one question first: "Does the order of my chosen items fundamentally change the outcome?" If yes, you need a permutation. If no, a combination. Getting this wrong invalidates any subsequent probability or statistical analysis.

Why This Calculator Exists: The Problem of Combinatorial Explosion

The human brain is poor at intuitively estimating the number of possibilities in a system with just a few interacting elements. Manually calculating 52! for a deck of cards is infeasible. More importantly, manual calculation is prone to conceptual mistakes. This calculator exists to automate the correct formula application based on a precise problem definition, bridging the gap between a word problem and a reliable numerical answer. It solves the decision problem first, the arithmetic second.

The Foundational Distinction: Order Matters vs. Group Matters

Permutation (nPr): The number of ways to arrange k items from a set of n where order is significant. The formula is:

P(n, k) = n! / (n - k)!

Think: assigning ranks (1st, 2nd, 3rd), creating passwords, or scheduling ordered time slots. The sequence "A-B-C" is distinct from "B-A-C".

Combination (nCr): The number of ways to choose k items from a set of n where order is irrelevant. The formula is:

C(n, k) = n! / [k! * (n - k)!]

Think: forming a committee, selecting pizza toppings, or dealing a hand of cards. The group {Alice, Bob} is identical to {Bob, Alice}.

EX: Step-by-Step Calculation Walkthrough

Problem: A漻 cybersecurity team must select 3 distinct vulnerability scanners from a list of 10 to run in sequence on a server. How many different scan sequences are possible?

Step 1: Define the Problem. The scanners will run in sequence. Order matters because Scanner A then B then C produces a different log and potentially different timing than B then A then C. This is a permutation.

Step 2: Apply the Formula. We have n=10, k=3.
P(10, 3) = 10! / (10 - 3)! = 10! / 7!

Step 3: Simplify and Calculate. 10! / 7! = (10 × 9 × 8 × 7!) / 7! = 10 × 9 × 8 = 720.

Interpretation: There are 720 unique ordered sequences for running the scanners.

Quick-Reference Table: Formulas and Use Cases

Concept Formula When to Use Example Domain
Permutation (nPr) P(n,k) = n!/(n-k)! Ordered arrangements, rankings, unique sequences. Lottery number order, password creation, race results.
Combination (nCr) C(n,k) = n!/(k!(n-k)!) Unordered groups, committees, subsets. Poker hands, ingredient mixtures, selecting team members.
Permutation with Repetition n^k Ordered arrangements where items can be reused. Digit in a PIN code, letter in a license plate.
Combination with Repetition C(n+k-1, k) Unordered selections where items can be reused ("stars and bars"). Choosing 5 scoops of ice cream from 12 flavors.

Common Pitfalls and Technical Limitations

1. The "Order" Ambiguity: The most common error is misinterpreting the problem statement. "Choosing a President and VP" is a permutation (order defines the role). "Choosing two delegates" is a combination. If the roles are distinct, it's likely a permutation.

2. Computational Limits: Factorials grow astronomically. Most calculators cap n around 170, as 171! exceeds floating-point representation. For larger n with small k, the calculator uses the simplified multiplicative form (e.g., P(1000, 3) = 1000*999*998) to avoid overflow.

3. Sensitivity to Problem Setup: The output is only as valid as the input model. A study by Tversky and Kahneman (1974) demonstrated that slight changes in problem framing drastically alter human's perceived combinatorial likelihoods. The calculator provides the mathematically correct count for your defined model, but a flawed model yields a meaningless count.

4. Not a Probability Calculator: This tool gives the size of the sample space. To find probability, you must divide the number of favorable outcomes (which may itself require a permutation/combination calculation) by this total. It is one critical component in a larger calculation.

Connecting to Your Next Step

The output of this calculator is a foundational input for other tools. The combination count C(52, 5) is the denominator for calculating the probability of a specific poker hand. The permutation count P(30, 3) defines the possible outcomes in a ranked voting analysis. Use this number as the "total possible outcomes" in our Probability Calculator or as a parameter in a Statistical Power Analysis for designing experiments where participant ordering is a factor.

Technical Disclaimer: This calculator assumes distinct items. For problems involving identical items (e.g., anagrams of "MISSISSIPPI"), the formula requires division by the factorial of each duplicate count, a nuance that must be handled manually. Always validate the problem's assumptions against the tool's capabilities.