Combinations Permutations Calculator
Last updated: 2026-09-01
| Number of sides | R | |
|---|---|---|
| Muestra pequena | 4 | 1.2 |
| Datos uniformes | 7 | 2.1 |
| Datos dispersos | 10 | 3 |
| Muestra grande | 15 | 4.5 |
| Valores atipicos | 25 | 7.5 |
TL;DR: To calculate both combinations and permutations, identify your total set size (n) and your selection size (r), ensure r ≤ n, then apply the formulas C(n,r) = n! / (r! × (n-r)!) for combinations (order irrelevant) and P(n,r) = n! / (n-r)! for permutations (order matters), dividing by r! in the combination formula to eliminate duplicate orderings.
What Is the Combinations Permutations Calculator?
The Combinations Permutations Calculator is a dual-purpose mathematical tool designed to compute two distinct values from the same set of input variables: the total number of items (n) and the number of items you are choosing (r). It simultaneously outputs the number of combinations (where the order of selection does not matter) and the number of permutations (where the order does matter). This is essential for anyone studying probability, statistics, combinatorics, or preparing for standardized tests like the GRE, GMAT, or SAT.
In real-world terms, this calculator answers questions like: "How many ways can I select 3 committee members from a group of 10?" (combinations) versus "How many ways can I arrange 3 of those 10 members in specific roles like President, VP, and Treasurer?" (permutations). The tool bridges the gap between theory and application, making it invaluable for data scientists calculating sample spaces, project managers evaluating task sequences, and game developers assessing possible outcomes. Without it, you would need to perform two separate factorial calculations manually, which is highly error-prone for large numbers.
How to Use the Calculator
The calculator is designed for simplicity, requiring only two numeric inputs. Follow this step-by-step guide to get accurate results immediately:
- Enter the Total Number of Items (n): Input the total number of distinct items in your set. This is the population from which you are selecting. For example, if you have a class of 30 students, enter 30.
- Enter the Number of Items to Choose (r): Input how many items you are selecting or arranging from that total. In a scenario where you are choosing a 5-person study group, enter 5.
- Initiate the Calculation: Click the calculate button. The calculator will first verify that your r value is not greater than n. If r > n, the calculation will yield zero for both results, as it is impossible to select more items than exist.
- Read the Dual Outputs: The tool will display two distinct numbers. The first is the C value (combinations), representing selections where order is irrelevant. The second is the P value (permutations), representing arrangements where order is critical.
- Validate the Relationship: After receiving your results, check that P(n,r) is exactly equal to C(n,r) multiplied by r! (factorial of r). If P = C × r!, your inputs are correct, and you have correctly interpreted the output.
Formula and Calculation Method
The underlying mathematics relies on factorial notation, where n! (n factorial) is the product of all positive integers up to n (e.g., 5! = 5 × 4 × 3 × 2 × 1 = 120). The core distinction between the two formulas is how they handle ordering.
Combinations Formula: C(n,r) = n! / (r! × (n-r)!). This formula removes the ordering by dividing by r!, which accounts for the number of ways the selected r items can be internally arranged.
Permutations Formula: P(n,r) = n! / (n-r)!. This formula preserves all possible orderings, meaning selecting A then B is different from selecting B then A.
Worked Example with Real Numbers: Let us calculate P(10,3) and C(10,3) step by step. Here, n = 10 and r = 3.
First, calculate the factorial of n: 10! = 10 × 9 × 8 × 7 × 6 × 5 × 4 × 3 × 2 × 1 = 3,628,800. Next, calculate (n-r)! = 7! = 7 × 6 × 5 × 4 × 3 × 2 × 1 = 5,040.
For permutations: P(10,3) = 10! / 7! = 3,628,800 / 5,040 = 720. This means there are 720 ways to select and arrange 3 specific items from a set of 10 (e.g., assigning 3 distinct prizes).
For combinations: C(10,3) = 10! / (3! × 7!) = 3,628,800 / (6 × 5,040) = 3,628,800 / 30,240 = 120. This means there are 120 ways to select 3 items where the order is irrelevant (e.g., picking 3 names out of a hat). Note that 120 × 3! = 120 × 6 = 720, confirming the relationship between the two results.
Practical Examples
The following table illustrates realistic scenarios, the exact inputs used, and the meaningful interpretation of the outputs.
| Scenario | Inputs (n, r) | Combinations Output | Permutations Output | Real-World Meaning |
|---|---|---|---|---|
| Selecting 2 cards from a 52-card deck to form a hand (order irrelevant). | n = 52, r = 2 | C(52,2) = 1,326 | P(52,2) = 2,652 | The combination value (1,326) tells you how many unique two-card hands exist. The permutation value is double because each hand can be drawn in two orders (Ace-King vs. King-Ace). |
| Choosing a 3-person leadership team (President, VP, Secretary) from 8 candidates. | n = 8, r = 3 | C(8,3) = 56 | P(8,3) = 336 | There are 336 distinct ways to assign the three specific roles. The 56 combinations simply count which 3 people get any role, without specifying who gets which position. |
| Selecting 4 toppings for a pizza from a menu of 7, where the order of placement does not matter. | n = 7, r = 4 | C(7,4) = 35 | P(7,4) = 840 | The 35 combinations represent the different topping mixes. The 840 permutations represent every hypothetical order those toppings could be physically added to the pizza base. |
Tips for Accurate Results
To ensure your results are mathematically sound, adhere to these specific guidelines based on the calculator's mechanics.
- Never enter r > n: The most common error is attempting to choose more items than are available. If you enter n=5 and r=6, the formulas break down mathematically, producing invalid or zero results. Always double-check that your selection size does not exceed the total pool.
- Distinguish between selection and arrangement: If the problem mentions "teams," "committees," or "groups," use the combinations output. If it mentions "arrangements," "orders," "rankings," or "sequences," use the permutations output. Mixing these up yields an answer off by a factor of exactly r!.
- Verify large factorial inputs: Because n! grows at an enormous rate (20! is over 2.4 quintillion), ensure your n value is correct before calculating. A single mis-typed digit, such as entering 16 instead of 15, will drastically alter the final ratio, even though the calculator performs the math correctly.
- Use zero correctly: When n equals r, the result for combinations is always 1 (selecting all items has only one combination), and the result for permutations is n! (arranging all items). For example, C(5,5)=1 and P(5,5)=120. Do not be surprised by the huge disparity in these cases.
- Check for integer outputs: Both C(n,r) and P(n,r) must always be whole numbers. If the calculator returns a decimal or fraction, there is likely an error in how you interpreted your inputs, or you are entering a non-integer value for n or r, which is not a valid combinatorial scenario.
Frequently Asked Questions
Q: What is the key difference between a combination and a permutation?
The critical difference is whether order matters. A permutation counts arrangements where the sequence of selection is distinct (e.g., passwords, race podium positions, or phone numbers). A combination counts selections where the group is the same regardless of sequence (e.g., lottery numbers, selected committee members, or pizza toppings). Numerically, the permutation is always larger than the combination for the same (n, r) values because the combination formula divides by r!, removing all the redundant internal orderings.
Q: Can I use this calculator for probabilities, such as drawing cards or rolling dice?
Yes, absolutely. For probability calculations, you need the total number of possible outcomes (which is usually a permutation if order matters in the event space, or a combination if it does not) and the number of favorable outcomes. For instance, to determine the probability of being dealt a specific 5-card poker hand from a 52-card deck, you would use the combination output C(52,5) = 2,598,960 as the denominator. The numerator would be the specific favorable combinations for that hand type. This calculator gives you the denominator instantly, saving you from lengthy factorial arithmetic.
Q: What happens when I enter the same number for n and r?
When n = r, the calculator reflects the scenario of selecting all available items. The combination result is always exactly 1, because there is only one way to choose all the items—you take everything. The permutation result is n! because you are essentially arranging the entire set in every possible order. For example, using this calculator with n=4 and r=4 will output C(4,4)=1 and P(4,4)=24. This is a quick sanity check to confirm you are using the tool correctly.
FAQ
What is the difference between combinations and permutations in this calculator?
Combinations count selections where the order of items does not matter, like choosing 3 fruits from a basket. Permutations count arrangements where order does matter, like listing the top 3 finishers in a race from a set of runners.
How do I use the calculator for a problem with repetitions allowed?
You can toggle between 'with repetition' and 'without repetition' modes using the provided radio buttons. When repetitions are allowed, the formulas use n^r for permutations and C(n+r-1, r) for combinations, and the output will reflect those counts.
Can the calculator handle large numbers, and if so, what is the maximum input size?
Yes, the calculator uses arbitrary-precision arithmetic, so it can handle very large integers without overflow, but the maximum practical input is limited by your device's memory and browser performance. For most real-world problems, values of n and r up to 10,000 are processed instantly, but extremely large factorial computations may take several seconds.
Does the calculator show the step-by-step solution or just the final answer?
The calculator provides both the final numeric result and a breakdown of the formula used, including the factorial notation. In the detailed view, it expands the factorials step by step, such as showing 5! = 5 × 4 × 3 × 2 × 1, so you can verify the calculation manually.