Permutation and combination calculator
Count ordered arrangements and unordered selections, then inspect every result when the selected set contains no more than 300 entries.
Set of distinct objects
Required whole number from 0 to 1,000. Objects are treated as distinct.
Required whole number from 0 through n, with no repeated object.
Choose the result set shown in the table and included in the workbook.
Number of selections
Permutations nPr
120
Order matters: 6 × 5 × 4.
Combinations nCr
20
Order does not matter.
Ordering multiplier r!
6
Each unordered group has this many distinct orders.
Selected result count
120
The table can list all 120 permutations.
Formula breakdown
P(6, 3) = 6! / 3! = 120
Use permutations when positions, ranks, or sequence change the outcome.
C(6, 3) = 6! / (3! × 3!) = 20
Use combinations when the same selected objects form one group regardless of order.
P(6, 3) = C(6, 3) × 3!
The ordering multiplier explains exactly why the permutation count is larger.
Permutation generator
Showing 120 of 120 permutations.
| Number | Selection |
|---|
Distinct objects are labeled A through F for this example. The generator is limited to result sets of 300 entries or fewer.
How to use the permutation and combination calculator
What this calculator does
This calculator counts how many ways you can select r distinct objects from a set of n distinct objects without replacement. It reports both the ordered count, called permutations, and the unordered count, called combinations. It can also enumerate the selected result type when the complete list has no more than 300 entries. The calculator provides exact counting identities; it does not decide whether order matters in your real-world problem, allow repeated selections, or handle indistinguishable duplicate objects.
When to use it
Use permutations for ranked winners, seating positions, passwords made from nonrepeating symbols, or any sequence where ABC differs from BCA. Use combinations for committees, lottery-style groups, menu selections, or samples where choosing A, B, and C is the same group in any order. The distinction is central to elementary probability; the OpenStax explanation of probability with permutations and combinations shows how these counts become sample-space sizes.
How to calculate
- The calculator opens with a ready-to-use demonstration: Total number of objects n = 6, Sample size r = 3, and Permutations selected. Its workbook is validated immediately, so Download Excel is available on first open.
- Replace Total number of objects n with the size of your complete distinct set. Then enter how many objects are selected in Sample size r. Results update live; no Calculate button is needed.
- Choose What do you want to generate? to make the table show permutations or combinations. When the chosen count exceeds 300, the exact count remains available but the full list is intentionally omitted.
- Read the four result cards, inspect the formula identities, and use Download Excel to save the current inputs, exact outputs, explanations, and generated rows. Reset clears the demonstration data, clears calculated content, and disables Download Excel until a complete valid state is entered again.
Input guide
Total number of objects n is required and accepts a plain whole number from 0 to 1,000; for example, enter 6 for six distinct candidates. Increasing n generally increases both counts because more objects are available. Do not type commas, decimals, signs, or scientific notation. Sample size r is also required, uses the same plain-integer format, and must be between 0 and n; enter 3 when selecting three objects. Raising r changes both the number of chosen objects and the number of possible orders, but the direction is not always monotonic for combinations. A common mistake is entering r greater than n even though selections are made without replacement. What do you want to generate? is a required select control with Permutations and Combinations. It changes the table, the selected-result card, and the generated workbook sheet, but it does not change the underlying nPr or nCr counts.
Output guide
Permutations nPr is the exact number of ordered selections and is driven by n and r. A value of 1 occurs in boundary cases such as r = 0; larger values indicate more possible sequences. Combinations nCr is the exact number of unordered groups. It is never negative and equals the permutation count when r is 0 or 1. Ordering multiplier r! counts the orders available within each chosen group and satisfies nPr = nCr × r!. Selected result count repeats the exact count for the generator mode, while the table's Number column is a sequential row index and Selection shows each generated arrangement or group. Exact counts can be much larger than conventional spreadsheet numeric precision, so very large values are exported as exact text rather than rounded numbers.
Worked example
With n = 6 and r = 3, the ordered calculation is P(6, 3) = 6 × 5 × 4 = 120. The unordered calculation divides those 120 orders by 3! = 6 because every three-object group appears in six orders, giving C(6, 3) = 20. Therefore, the first-open results are exactly 120 permutations, 20 combinations, and an ordering multiplier of 6. Because 120 is below the 300-entry limit, the initial table lists all 120 permutations, beginning with A · B · C and ending with F · E · D.
How the formulas work
A permutation fills r ordered positions. There are n choices for the first position, n – 1 for the second, and so on, producing P(n, r) = n!/(n – r)!. The OpenStax permutations chapter develops this result from the multiplication rule.
A combination treats every ordering of the same selected objects as equivalent. Dividing the permutation count by r! removes those repeated orders, producing C(n, r) = n!/[r!(n – r)!]. The OpenStax combinations chapter explains this connection with worked counting examples.
P(n, r) = n × (n – 1) × ... × (n – r + 1)
C(n, r) = P(n, r) / r!
P(n, r) = C(n, r) × r!
Interpretation and common mistakes
The most important modeling decision is whether changing order creates a genuinely different outcome. Awarding gold, silver, and bronze is ordered, so it uses permutations. Choosing three committee members is unordered, so it uses combinations. This calculator assumes every object is distinct and no object can be chosen twice. Problems with repetition, duplicate object types, circular arrangements, or additional restrictions require a different counting model.
Zero is a valid combinatorial boundary. Selecting no objects from a valid set has one outcome – the empty selection – so P(n, 0) and C(n, 0) are both 1. Likewise, selecting every object gives one combination but n! permutations. These identities are exact and can be useful for checking hand calculations.