Updated Combinatorics

Permutation and Combination Calculator

Compute nCr, nPr, factorial, permutations with repetition, combinations with repetition, circular permutations, and arrangements with identical items.

nCr & nPr Factorial With Repetition Circular & Identical Items

All-in-One Permutation & Combination Calculator

Use tabs to switch between standard nCr and nPr, repeated selections, identical items, and circular permutations.

This tab calculates nPr = n! / (n − r)! and nCr = n! / (r! (n − r)!).

Permutations with repetition: nʳ. Combinations with repetition: C(n + r − 1, r).

Enter counts of identical items, separated by commas or spaces. Total items n is the sum of all counts.

Standard circular permutations (rotations counted the same): (n − 1)!. If reflections are also considered the same, use (n − 1)! ÷ 2.

Permutation and Combination Calculator – nPr, nCr, Factorials & Advanced Counting

This Permutation and Combination Calculator provides a complete combinatorics toolkit for computing permutations, combinations, factorials, permutations with repetition, combinations with repetition, arrangements with identical items and circular permutations. Whether you are analyzing probability, arranging sequences, solving exam problems or preparing for competitive mathematics, the calculator automates all core counting formulas and explains the underlying principles step by step. This guide expands each method, connects combinatorics to real problem-solving contexts and provides intuitive interpretations backed by rigorous mathematical definitions.

Combinatorics is the mathematics of counting structured arrangements. Many probability questions, statistics models, algorithm analyses and real-world selections are driven by how many different ways items can be arranged or chosen. The formulas may seem abstract at first, but they represent the fundamental structure of all finite possibilities. This article explains permutations, combinations, factorial growth and special scenarios such as repeated items and circular arrangements, giving you a solid foundation for any counting problem.

1. Understanding the Role of Factorials in Counting

Almost every combinatorics formula begins with the factorial function. The factorial of n, written n!, is the product of all positive integers from 1 to n. It represents the total number of ways to arrange n distinct objects in order. Formally:

\[ n! = n \times (n - 1) \times (n - 2) \times \dots \times 1 \]

The factorial grows extremely quickly. For example, 10! equals 3,628,800 and 20! is approximately 2.43×1018. Because factorials grow so fast, they naturally encode the number of ways to permute or arrange items in sequences. Many counting problems are built by dividing one factorial by another, representing restrictions or reductions in available choices.

If all n items are distinct, the number of distinct sequences of length n is exactly n!. When only r positions need to be filled, or when repetition is allowed, or when some items are identical, variations of factorial-based formulas allow counting without having to manually list or enumerate possibilities.

2. Standard Permutations (nPr) – Order Matters

A permutation is an ordered arrangement of r items selected from a larger set of n distinct items. Order is important, and items cannot repeat. For example, choosing the first, second and third place winners from a race of 20 runners is a permutation because the order of finish matters. The number of such ordered arrangements is:

\[ nPr = \frac{n!}{(n - r)!} \]

The numerator n! represents the number of ways to order all n items. But because only r items are selected, the remaining (n − r) items must be disregarded. Dividing by (n − r)! removes all arrangements of the unused items, leaving only the meaningful permutations of length r.

A useful conceptual interpretation is that permutations reflect “sequence-sensitive selections.” Each position is different—first is not the same as second. In probability, permutations describe events such as different orders of outcomes, seating arrangements, codes without repeated characters, and patterns where position matters. This calculator automates the nPr computation and provides factorial breakdowns so you can see the structure behind every result.

3. Standard Combinations (nCr) – Order Does Not Matter

A combination is a selection of r items from n distinct items where the order does not matter. For example, picking a 3-member committee from 12 candidates is a combination because choosing A, B and C is the same as choosing C, B and A. The number of combinations is:

\[ nCr = \frac{n!}{r! \, (n - r)!} \]

The denominator r! removes arrangements among the selected items because order does not matter. As with permutations, the (n − r)! in the denominator removes the unused items. Combinations are central to probability theory because they count the number of distinct sets, regardless of internal order.

Combinations appear in problems involving subsets, team selection, lottery probabilities, partitioning, grouping, sampling and unordered arrangements. Because combinations represent “unique sets,” they give the mathematical foundation for binomial coefficients, Pascal’s triangle and many probability distributions. The calculator computes nCr exactly for feasible values and displaysated factorial components.

4. Permutations and Combinations with Repetition

In many real-world situations, repetition is allowed. A password might allow repeated digits, a lock code may reuse characters and sampling with replacement allows the same item to be selected again. When repetition is allowed, the formulas change because the number of available choices at each step does not decrease.

For permutations with repetition, each of the r positions may be filled with any of the n available items:

\[ \text{Permutations with repetition} = n^{r} \]

For combinations with repetition (multisets), the formula counts the number of r-combinations chosen from n categories where repetition is permitted:

\[ \text{Combinations with repetition} = \binom{n + r - 1}{r} \]

This result is derived from the stars and bars theorem, which states that selecting r items from n types with unlimited repetition is equivalent to placing r stars into n categories separated by (n − 1) bars. The total number of ways to arrange stars and bars equals the binomial coefficient above.

Repetition-based selections occur often: distributing identical prizes to people, selecting scoops of ice cream flavors, constructing combinations of multiset elements, forming multisets in algebra and evaluating counting procedures where each trial resets the full choice set. This calculator computes both permutation and combination values with full factorial expansions shown for clarity.

5. Arrangements with Identical Items (Multiset Permutations)

When some items are identical, the total number of distinguishable arrangements decreases because permuting identical items among themselves does not produce new patterns. This scenario is common when analyzing word arrangements, DNA sequences, distributions of objects or any structure with repeated elements. If a total of n items includes groups of identical items with counts \( n_1, n_2, n_3, \dots \), the number of unique permutations is:

\[ \text{Distinct arrangements} = \frac{n!}{n_1! \, n_2! \, n_3! \dots} \]

For example, the word “BALLOON” contains 7 letters with the repeated groups L×2 and O×2. The number of distinct permutations is:

\[ \frac{7!}{2! \, 2!} \]

Multiset permutations are fundamental in enumerating outcomes that contain symmetries or repeated elements. They also connect to multinomial coefficients, which generalize the binomial theorem to more categories. This calculator allows entry of identical group sizes and returns n, the numerator factorial, the denominator factorial product and the final number of distinct arrangements.

6. Circular Permutations and Rotational Symmetry

Circular permutations occur when items are arranged around a circle rather than a line. In a circle, rotating the arrangement does not produce a new configuration becauseative positions remain unchanged. Therefore, the number of circular permutations of n distinct items is:

\[ (n - 1)! \]

This reduction compared to n! occurs because fixing one element anchors the circle, eliminating rotational duplicates. Circular permutations appear in problems involving necklaces, round tables, gears, molecular structures and ring arrangements.

If reflections also count as identical—for example, a necklace that can be flipped—the number of unique circular arrangements becomes approximately:

\[ \frac{(n - 1)!}{2} \]

Circular permutations demonstrate how symmetries reduce the total number of distinct structures. This calculator computes both rotational and rotational-with-reflection counts, providing a full picture of circular symmetry patterns.

7. How to Use the Permutation & Combination Calculator

The calculator includes multiple dedicated tabs that reflect different combinatorics scenarios:

  • nCr & nPr tab: Computes standard permutations and combinations with factorial expansions.
  • With Repetition tab: Computes repeated permutations \( n^{r} \) and repeated combinations \( {n+r-1 \choose r} \).
  • Identical Items tab: Computes multiset permutations using the denominator factorial product.
  • Circular tab: Computes the two types of circular permutations.

The calculator validates edge cases, supports factorials up to n = 170 (where overflow becomes significant), displays cleaned inputs and ensures the results are mathematically consistent. Whether you are solving exam questions, analyzing probability structures or modeling combinatorial systems, the calculator provides clear, exact outputs for all supported formulas.

8. Applications of Permutations and Combinations

Combinatorics plays a role in virtually all areas of mathematics, science and technology. Some key applications include:

  • Probability & statistics: Counting outcomes for cards, dice, lotteries, sampling and random processes.
  • Computer science: Algorithm analysis, sorting, hashing, search trees, cryptographic keyspaces.
  • Genetics & biology: DNA sequences, allele combinations, molecular symmetry.
  • Linguistics: Word arrangements, letter permutations, frequency analysis.
  • Engineering:iability combinations, redundancy systems, arrangement modeling.
  • Operations research: Scheduling, optimization, allocation.

Because permutations and combinations describe the structure of all possible arrangements, they form the backbone of discrete mathematics. This calculator provides a unified interface for performing these computations efficiently and clearly.

Permutation & Combination Calculator FAQs

Frequently Asked Questions

Quick answers to common questions permutations, combinations and factorial counting.

nPr counts ordered arrangements where sequence matters, while nCr counts unordered selections where only membership matters. nPr is always ≥ nCr for the same n and r.

Each new element multiplies the number of possible arrangements. Because each step adds another factor, the function grows super-exponentially, which is why factorials become extremely large even for modest n.

Repetition greatly increases the number of permutations (nʳ) but reduces the number of distinct permutations when items are identical, because identical elements cannot create unique orderings among themselves.

In a circle, rotating all items keeps theirative order identical. Fixing one item eliminates the rotational symmetry and prevents counting duplicate arrangements, reducing the count to (n − 1)!.