ThisCalculator

Home and garden

Permutations With Repetition: Formula and Examples

Updated · Standard formula, shown below

Distinct permutations 12
Total items
4 items
Result
Count of type A
2
You entered
Count of type B
1
You entered

Permutations With Repetition: Formula and Examples

This calculator finds the number of distinct arrangements when some items repeat, using the total number of items and the count of each repeated type. Enter the counts of the repeated items; the result is the number of different permutations, not the number of ways to choose a subset.

Formula

For a collection of n items, where identical items occur in groups of sizes n1, n2, …, the number of distinct linear permutations is:

n! / (n1! n2! …), where n = n1 + n2 + ….

The exclamation mark means factorial: n! = n × (n − 1) × … × 2 × 1, with 0! = 1. In this calculator, a, b, and c are nonnegative whole-number counts of three item types. The first output is the number of distinct arrangements; the second is the total item count. The result is a count, so it has no physical unit.

Worked Example

Using the default values, there are two items of type A, one of type B, and one of type C. The total is 2 + 1 + 1 = 4 items.

If all four items were considered different, there would be 4! = 24 arrangements. But the two A items are indistinguishable, so swapping them does not create a new arrangement. Divide by 2!:

4! / (2! × 1! × 1!) = 24 / 2 = 12.

The calculator therefore returns 12 distinct permutations and 4 total items. The one-item groups contribute 1! = 1, which does not change the division.

How the Count Works

Imagine first assigning a unique label to every item. That gives n! orders. When identical items are present, many of those labelled orders describe the same visible arrangement. For a group of r identical items, its labels can be exchanged in r! ways without changing what the arrangement looks like. Dividing by each group’s factorial removes these duplicate descriptions.

For example, the letters in LEVEL have five positions, with L repeated twice and E repeated twice. Its distinct arrangements number:

5! / (2! × 2! × 1!) = 120 / 4 = 30.

This is why repeated letters must be counted by their frequency, not simply by the number of different letter types. If every item is unique, each group has size 1 and the formula becomes n!. If all items are identical, the formula gives 1 arrangement.

When to Use This Formula

Use the formula when every item is arranged, order matters, and items within the same type are indistinguishable. Common examples include arranging the letters of a word, ordering colored objects when objects of each color are identical, or counting sequences with fixed quantities of each symbol.

  • List the item types and count how many of each type occur.
  • Add the counts to get the total number of positions.
  • Calculate the total factorial and divide by the factorial of every group count.
  • Check that the input counts are whole numbers, including zero when a type is absent.

The calculator includes three types for a simple editable example. If a problem has more types, extend the same formula by adding each count to the total and each corresponding factorial to the denominator. The principle does not depend on there being exactly three types.

Permutations, Combinations, and Restrictions

A permutation concerns order; a combination concerns selection without regard to order. The repeated-item formula counts arrangements of the complete collection. It does not directly count arrangements of only r chosen items, nor does it handle extra rules such as “the two red objects must stay together” without additional counting.

For comparison, if you choose and order r distinct objects from n, the count is n!/(n − r)!, often written nPr. That formula assumes the objects are distinct. For repeated objects with restricted positions or partial arrangements, first define exactly what counts as different, then account for the restrictions rather than applying the full-arrangement formula blindly.

Common Mistakes and Limits

  • Forgetting a repeated group: Include a factorial for every type that occurs more than once. Omitting one overcounts arrangements.
  • Dividing by the number of types: The denominator uses factorials of the group sizes, not the number of categories.
  • Treating similar items as identical: Items are interchangeable only if the problem says their identities do not distinguish arrangements. Two objects that look alike may still count as different if they are individually labelled.
  • Using fractional or negative counts: Item counts must be nonnegative integers. Factorial counting does not represent a fractional number of objects.
  • Ignoring constraints: The formula assumes all orders are allowed and the entire collection is arranged in a line. Circular arrangements, forbidden adjacencies, and fixed-position rules require a different method or an added adjustment.

For large counts, factorial values become enormous. The final answer is still an integer, but intermediate calculations may exceed the precision of some basic calculators. For a numerical result, use a calculator capable of large integers; for a derivation, cancelling factorial factors before multiplying can reduce unnecessary arithmetic.

Frequently Asked Questions

What is the formula for permutations with repetition?
For a total of n items divided into identical groups of sizes n1, n2, and so on, use n! divided by the product of the group factorials.

Is this the same as permutations where items can be reused?
No. This formula arranges a fixed collection containing repeated, indistinguishable items. If each of r positions can independently take any of n choices, with choices reusable, the count is nr.

How many distinct arrangements are in BANANA?
BANANA has six letters: A appears three times, N twice, and B once. The count is 6!/(3! × 2! × 1!) = 60.

What if no items repeat?
Every group then has size 1, so the denominator is a product of 1! values. The formula reduces to n!, the number of arrangements of n distinct items.

Why divide by the repeated items’ factorials?
Swapping identical items does not make a visibly different arrangement. Each visible order is counted once for every possible relabelling within each repeated group, so division removes those duplicates.

Related

Formula used
in a | Count of type A | - | 2 | 0
in b | Count of type B | - | 1 | 0
in c | Count of type C | - | 1 | 0
out arrangements | Distinct permutations | - | fact(a + b + c) / (fact(a) * fact(b) * fact(c)) | 0
out total | Total items | items | a + b + c | 0

Each line is one input (in, sel, list) or one result (out: label, unit, formula, decimals). How the calculators work

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.