How to Use the Permutation & Combination Calculator
- Enter the total number of distinct items (n): This is the total count of available items in the source set.
- Enter the number of items selected or arranged (r): This specifies how many items you are choosing or ordering from the set.
- Decide whether repetition is allowed: Under without repetition (no replacement), an item can be selected only once. Under with repetition (replacement allowed), the same item may be chosen again.
- Review the permutation and combination results: Use nPr when the sequence or order matters. Use nCr when only the group membership matters and ordering is irrelevant.
- Inspect the formula steps: Review the step-by-step mathematical derivation to see how your values of n and r produce the calculated counts.
Permutations vs. Combinations: Does Order Matter?
The decisive difference between a permutation and a combination is whether changing the order creates a distinct outcome:
A permutation counts ordered arrangements. Selecting Alice for first place and Bob for second place is fundamentally different from selecting Bob for first place and Alice for second place. Common examples include ranking race finishers, assigning specific officer positions, or entering a security PIN.
A combination counts unordered selections. Choosing Alice and Bob for a two-person project committee represents the exact same group as choosing Bob and Alice. Common examples include dealing a hand of playing cards, forming an unranked team, or drawing lottery balls.
Before calculating, ask two questions:
- Does the order of the selected items matter?
- Can an item be selected more than once?
Answering these questions determines which formula applies to your counting problem.
Permutation Formula (nPr)
For ordered selections of r items from n distinct items without replacement, the permutation formula is:
The factorial symbol (!) represents the product of all positive integers up to that number, with 0! = 1 by definition.
Example: Select and rank two people from six candidates (n = 6, r = 2).
There are 6 choices for the first position and 5 remaining choices for the second position:
There are 30 possible ordered arrangements.
Combination Formula (nCr)
For unordered selections of r items from n distinct items without replacement, the combination formula is:
A combination removes the redundant counting caused by treating different orderings of the exact same selected members as different outcomes.
Example: Choose two people from six for a committee (n = 6, r = 2).
The combination count (15) is smaller than the permutation count (30) because the two selected members form the same committee regardless of which was chosen first.
For valid standard inputs without replacement, permutations and combinations are connected by the relationship:
nPr = nCr × r!
With Replacement vs. Without Replacement
Without replacement, a selected item cannot be chosen again. With replacement, each item is returned to the pool and can be selected repeatedly.
| Counting Mode | Order Setting | Formula | Example Application |
|---|---|---|---|
| Permutation without replacement | Order matters | n! / (n − r)! | Gold, silver, bronze medals |
| Permutation with replacement | Order matters | nr | 4-digit PINs, alphanumeric passwords |
| Combination without replacement | Order does not matter | n! / [ r! (n − r)! ] | Poker hands, committee selection |
| Combination with replacement | Order does not matter | (n + r − 1)! / [ r! (n − 1)! ] | Selecting a dozen donuts across flavors |
For example, a four-digit PIN formed from ten possible digits (0–9) with repetition allowed has 104 = 10,000 possible sequences because each of the four positions has ten independent choices.
Worked Example: 18 Choose 4
Suppose you have 18 distinct items and want to select four. The answer depends directly on whether order matters:
In standard mathematical notation, "18 choose 4" denotes the combination count:
There are 3,060 possible four-item selections.
When ranking items into 4 distinct positions:
There are 73,440 ordered arrangements.
Both calculations are correct for their respective problem statements. These figures assume selections are made without replacement.
Circular Permutations and Repeated Letters
Circular Arrangements
When n distinct items are arranged around a circle and rotations count as the same arrangement, the number of distinct arrangements is:
For six people seated around a round table, this gives (6 − 1)! = 5! = 120 arrangements under the standard rotational-equivalence convention.
If reflected arrangements are also considered equivalent (such as beads on a reversible necklace or keys on a ring), clockwise and counterclockwise orientations coincide. In that case, divide by an additional factor of 2: (n − 1)! / 2 (for n ≥ 3).
Repeated-Letter Arrangements (Multiset Permutations)
When arranging words containing repeated letters, swapping identical letters does not create a new visible sequence. For a word of length n with character frequencies k1, k2, and so on:
For example, MISSISSIPPI contains 11 letters with letter frequencies: M = 1, I = 4, S = 4, and P = 2.
Total unique anagrams:
Calculator Assumptions and Limitations
- Non-negative integer inputs: Combinatorial operations require non-negative whole numbers (n ≥ 0 and r ≥ 0). Decimal and negative inputs are not valid for discrete counting.
- Selection domain constraints: For selections without replacement, you cannot select more items than are available in the set. If r > n, both P(n, r) and C(n, r) equal 0.
- Exact BigInt computation: All factorial and combinatoric products are evaluated using native arbitrary-precision
BigIntarithmetic. This avoids standard IEEE-754 64-bit floating-point rounding errors up to the supported input boundary (n ≤ 5,000). - Display formats: Standard mode formats exact integer answers with thousands separators. For astronomical quantities, Scientific notation and Log₁₀ modes display orders of magnitude clearly.
- Boundary values: By mathematical definition, 0! = 1, and choosing 0 items produces exactly 1 outcome: C(n, 0) = 1 and P(n, 0) = 1 (representing the empty set).
Permutation & Combination Calculator FAQs
Related Math Calculators
Calculate single, joint, and conditional event probabilities for independent and dependent experiments.
Explore sample spaces, sum frequencies, and discrete outcome distributions for dice expressions.
Evaluate dataset measures of central tendency, sample variance, standard deviation, and confidence intervals.
Perform exact arbitrary-precision arithmetic and exponentiation on large integers without truncation.