Permutation Calculator

nPr · With Repetition · Multinomial

Compute ordered arrangements with three modes: P(n,r) = n!/(n−r)!, permutations with repetition , and multinomial permutations for multisets. BigInt support for large numbers.

Quick Examples

What Is a Permutation?

A permutation is an ordered arrangement of items. The defining characteristic is that order matters — placing the same items in a different sequence creates a completely different permutation. For instance, choosing three runners for 1st, 2nd, and 3rd place from a group of 10 is a permutation problem because the ranking distinguishes each outcome.

Permutations are foundational in combinatorics, probability theory, cryptography, and computer science. Whether you are counting possible passwords, scheduling tasks, or determining the number of race outcomes, permutation formulas give precise counts without manual enumeration.

Permutation vs. Combination

The key distinction between permutations and combinations is whether order matters. A combination selects a subset of items where arrangement is irrelevant (choosing a lottery ticket). A permutation selects and arranges — every different ordering is a distinct outcome.

ConceptOrder Matters?FormulaExample (10 items, 3 chosen)
Permutation nPrYesn! / (n−r)!P(10,3) = 720
Combination nCrNon! / (r!(n−r)!)C(10,3) = 120
With RepetitionYes10³ = 1,000

The ratio P(n,r) / C(n,r) = r! tells you how many ways to order each combination. Here, 720 / 120 = 6 = 3!, confirming that each group of 3 can be arranged in 6 different orders.

Formula 1: nPr — Permutations Without Repetition

When selecting r items from n distinct items without replacement, each item can only appear once in an arrangement. The formula is:

P(n, r) = n! / (n − r)! = n × (n−1) × (n−2) × ... × (n−r+1)

The numerator n! counts all full arrangements of n items. Dividing by (n−r)! cancels out the items we do not select, leaving only the falling factorial product. For P(10, 3): 10 × 9 × 8 = 720.

Real-World nPr Examples

  • Race podium: 10 runners competing for gold, silver, bronze → P(10,3) = 720
  • License plates: 4 different letters from 26, order matters → P(26,4) = 358,800
  • Committee officer positions: Choosing president, VP, treasurer from 8 → P(8,3) = 336
  • Ordered poker hands: 5 cards dealt in order from 52 → P(52,5) = 311,875,200

Formula 2: nʳ — Permutations With Repetition

When items can be reused across positions, each of the r positions independently has n choices. The total count is the product of n multiplied r times:

Permutations with repetition = nʳ

This applies whenever selections are made with replacement — like a combination lock, a PIN pad, or a password that allows repeated characters. Since the restriction n ≥ r is removed, nʳ is always at least as large as P(n,r) for r ≥ 2.

Real-World nʳ Examples

  • 4-digit PIN: Each digit 0–9 → 10⁴ = 10,000 PINs
  • 8-character password (62 chars): Letters + digits → 62⁸ ≈ 218 trillion combinations
  • Binary strings of length 10: 2¹⁰ = 1,024 strings
  • DNA codons: 4 nucleotides, 3 positions → 4³ = 64 codons

Formula 3: Multinomial Permutations (Multiset Arrangements)

When a collection contains groups of identical items, swapping identical items within a group produces the same arrangement — so we must divide by the factorial of each group's size. For n total items with group sizes n₁, n₂, ..., nₖ where n₁ + n₂ + ... + nₖ = n:

Multinomial = n! / (n₁! × n₂! × ... × nₖ!)

The classic example is MISSISSIPPI: 11 letters with 1 M, 4 I's, 4 S's, 2 P's. Result: 11! / (1! × 4! × 4! × 2!) = 34,650. Without accounting for repetition, 11! = 39,916,800 would massively overcount identical arrangements.

Circular Permutations

In a circular permutation, items are arranged around a circle where rotations of the same arrangement are considered identical. One item is fixed as a reference point, and the remaining (n−1) items fill the other positions. The count is (n−1)!.

For example, 6 people at a round table: (6−1)! = 120 distinct seatings, versus 6! = 720 for a linear arrangement. Circular permutations arise in scheduling rotations, necklace designs, and round-robin tournaments.

Factorial Relationship

All permutation formulas hinge on factorials. The factorial n! represents the total number of ways to arrange all n distinct items in a line. Partial permutations P(n,r) use the ratio of two factorials; multinomials divide n! by a product of factorials. Knowing how to compute and manipulate factorials — especially for large n using BigInt arithmetic — is essential for accurate permutation calculations.

Applications Across Fields

  • Cybersecurity: Password strength depends on nʳ — more characters and positions exponentially increase the search space for attackers.
  • Genetics: Counting DNA sequence arrangements uses multinomial permutations over the four nucleotides A, T, C, G.
  • Operations Research: Scheduling n jobs on r machines, or determining optimal task sequences, relies on nPr calculations.
  • Statistics: Permutation tests are non-parametric hypothesis tests that enumerate all possible rearrangements of observed data.
  • Game Theory: Card games, tournament rankings, and board game strategies all require permutation counts to assess probabilities.

Frequently Asked Questions

What is a permutation?
A permutation is an ordered arrangement of items where the sequence in which items appear matters. For example, ABC and BAC are two different permutations of the same three letters. Permutations are used whenever ranking or sequencing is important, such as race results, passwords, and schedules.
What is the difference between a permutation and a combination?
Order matters for permutations, but not for combinations. Choosing 3 players for 1st, 2nd, and 3rd place from 10 is a permutation (P(10,3) = 720). Choosing any 3 players for a team from 10 is a combination (C(10,3) = 120). The relationship is P(n,r) = C(n,r) × r!, meaning each combination can be ordered in r! ways to give all permutations.
What is the formula for nPr?
The formula is P(n, r) = n! / (n−r)!, which equals the falling factorial n × (n−1) × (n−2) × ... × (n−r+1). For example, P(10, 3) = 10! / 7! = 10 × 9 × 8 = 720. This requires n ≥ r ≥ 0, and by convention P(n, 0) = 1 (there is exactly one empty arrangement).
What are permutations with repetition?
Permutations with repetition allow each of the n items to be selected multiple times. With r positions and n choices per position, the total is nʳ. A 4-digit PIN from digits 0–9 gives 10⁴ = 10,000 possibilities since each digit can repeat. This is always larger than nPr when r ≥ 2, because repetition unlocks more arrangements.
What is a multinomial permutation?
A multinomial permutation counts distinct arrangements of a multiset — a collection where some items are identical. With n total items split into k groups of sizes n₁, n₂, ..., nₖ, the formula is n! / (n₁! × n₂! × ... × nₖ!). Identical items within a group are interchangeable, so we divide out their redundant orderings. When all group sizes equal 1, the formula reduces to n! (all items distinct).
How many permutations does MISSISSIPPI have?
MISSISSIPPI has 11 letters: 1 M, 4 I's, 4 S's, and 2 P's. Using the multinomial formula: 11! / (1! × 4! × 4! × 2!) = 39,916,800 / (1 × 24 × 24 × 2) = 39,916,800 / 1,152 = 34,650 distinct arrangements. You can verify this with the Multinomial mode of this calculator by entering groups 1, 4, 4, 2.
What is a circular permutation?
A circular permutation arranges n items in a ring where rotations of the same sequence are considered identical. One item is fixed to remove the rotational equivalence, and the remaining (n−1) items are arranged freely. The count is (n−1)!. For 5 people around a round table: (5−1)! = 24 distinct seatings, compared to 5! = 120 linear arrangements. Reflections may also be considered identical in some contexts (e.g., necklaces), giving (n−1)! / 2.