What Is a Permutation (nPr)? Definition & Exact Formula

In combinatorics, a permutation counts the total number of distinct ordered arrangements you can form by selecting r items from a pool of n distinct items. Unlike combinations, order strictly matters in every permutation: picking (Alice, Bob, Carol) for Gold, Silver, and Bronze medals is completely different from picking (Carol, Bob, Alice), even though the exact same three athletes stand on the podium.

Standard Permutation (No Repetition): P(n, r) = nPr = n! ÷ (n − r)! = n × (n − 1) × ... × (n − r + 1)
With Repetition Allowed: P_rep(n, r) = n^r
Multiset (With Identical Copies): P = n! ÷ (k₁! × k₂! × ... × kₘ!)
Circular Ring (Rotation Equivalent): P_circ(n, r) = P(n, r) ÷ r [Full circle r = n gives (n − 1)!]

Because our Permutation Calculator evaluates factorials and falling products using arbitrary-precision BigInt integer arithmetic directly in your browser, you can compute exact integer counts like P(20, 20) = 2,432,902,008,176,640,000 or inspect scientific-notation counts for massive spaces like a full 52-card deck shuffle (52! ≈ 8.0658 × 10^67, 68 digits) without standard 64-bit IEEE floating-point rounding drift.

Infographic illustrating P(10,3) = 720 podium permutations derived via slot filling 10 x 9 x 8 compared with C(10,3) = 120 combinations, 3! = 6x order factor, and 10^3 = 1000 repetition sequences
Diagram 1: Slot-filling derivation showing P(10, 3) = 720 ordered arrangements versus C(10, 3) = 120 combinations and 10^3 = 1,000 repetition strings.

Permutations vs. Combinations: Understanding the r! Order Factor

Every student eventually wonders whether a problem calls for nPr (permutations) or nCr (combinations). Both start from the same n pool and pick r items without repeating any object, yet permutations always outnumber combinations by exactly r! (read "r factorial"):

Fundamental Bridge Identity: P(n, r) = C(n, r) × r! <=> C(n, r) = P(n, r) ÷ r!

To see why, split ordered selection into two simple stages. First, choose which r objects belong to your team in C(n, r) unordered ways. Next, scramble those chosen r objects across r distinct roles, seats, or ranks in r! ways. Multiplying both stages yields P(n, r)! That exact bridge immediately gives intuitive boundary values: when r = 0, there is 1 unique empty ordering (P(n, 0) = 1); when r = 1, P(n, 1) = n; and when r = n, arranging all n items simplifies cleanly to n! ÷ 0! = n! because 0! = 1 by multiplicative identity.

Formula Variant Order Matters? Repeats Allowed? Expression Quick Test (n=4, r=2)
Standard Permutation Yes No n! ÷ (n − r)! 4 × 3 = 12
Permutation w/ Repetition Yes Yes n^r 4² = 16
Multiset Word / Duplicates Yes Fixed counts n! ÷ Π(kᵢ!) AABB: 4! ÷ (2!2!) = 6
Circular Ring (Fixed Clockwise) Relative Ring No P(n, r) ÷ r P(4,2)÷2 = 6; Full (4−1)! = 6
Standard Combination No No n! ÷ [r!(n − r)!] 12 ÷ 2! = 6

Permutations With Repetition (n^r) & Password / PIN Entropy

When selecting items with replacement, every position in your sequence retains access to the full pool of n symbols independently. Mode 2 (With Repetition n^r) computes the exponential power n^r, compares it directly against no-repeat P(n, r), and reports cryptographic Shannon / Hartley entropy in bits (r × log₂(n)).

For example, a standard 4-digit bank PIN drawn from digits 0–9 (n = 10, r = 4) permits digits to repeat (such as 1122), producing 10⁴ = 10,000 possible codes (13.29 bits). Prohibiting digit reuse reduces the search space nearly in half to P(10, 4) = 10 × 9 × 8 × 7 = 5,040 codes. Similarly, an 8-character lowercase password (n = 26, r = 8) spans 26⁸ = 208,827,064,576 possibilities (37.60 bits).

Multiset Permutations: Word Anagrams & Identical Objects

How many distinct ways can you scramble the letters of MISSISSIPPI, STATISTICS, or arrange 5 identical green steps and 3 identical right steps on a city street grid? If all n symbols carried distinct subscript labels (say I₁, I₂, I₃, I₄), there would be n! total lineups. However, because swapping identical copies among themselves produces the exact same visible string, every distinct arrangement gets counted k₁! × k₂! × ... × kₘ! times inside n!!

Mode 3 accepts either raw text words (automatically stripping whitespace, uppercasing characters, and tallying character frequencies) or comma-separated duplicate counts (such as 5, 3 for Manhattan lattice paths). Dividing n! by the product of subgroup factorials cancels all indistinguishable duplicate swaps cleanly.

Multiset permutation breakdown of the 11-letter word MISSISSIPPI showing character counts M:1, I:4, S:4, P:2 producing divisor 1! x 4! x 4! x 2! = 1,152 and reducing 11! = 39,916,800 down to 34,650 distinct anagrams
Diagram 2: Exact multiset division for MISSISSIPPI, illustrating how duplicate symmetry factorials reduce 39,916,800 linear orderings to 34,650 unique words.

Circular Permutations & Reversible Necklace Symmetry

Arranging people around a round banquet table differs fundamentally from lining them up against a wall because a circle has no starting edge or ending edge. Rotating every guest one chair clockwise changes zero neighbor relationships! Across a ring of n seats, every single circular configuration corresponds to exactly n distinct linear lineups. Dividing linear n! by n rotational equivalents produces the classic circular permutation identity:

Full Circle (Directed Table Seating): (n − 1)! = n! ÷ n
Partial Ring (r out of n items in circle): P(n, r) ÷ r
Reversible Necklace / Keyring (r >= 3): P(n, r) ÷ (2 × r) [or (n − 1)! ÷ 2 for full ring]

An easy physical trick guarantees why (n − 1)! works: pin one guest permanently at the top seat as an anchor to break rotational symmetry, then arrange the remaining n − 1 guests into the n − 1 remaining seats in (n − 1)! linear ways! Furthermore, if your physical ring can be picked up and flipped upside down (like a beaded bracelet, keychain, or molecular ring), clockwise and counterclockwise orderings become mirror equivalents, cutting unique physical rings in half once more to (n − 1)! ÷ 2 for n >= 3.

Diagram comparing 8-guest seating in a linear row (8! = 40,320), circular table with 1 fixed anchor seat (7! = 5,040), and reversible flip-symmetric necklace (7!/2 = 2,520)
Diagram 3: Fixing 1 anchor seat eliminates 8 rotational duplicates for round-table seating (7! = 5,040), while flip symmetry halves physical necklaces (2,520).

2 Worked Examples

Example 1: Race Podium P(10, 3) vs. 4-Digit Security PIN (Repetition)

Part A (No-Repetition Olympic Final): Ten sprinters compete in a 100-meter final (n = 10), and medals are awarded for 1st, 2nd, and 3rd place (r = 3). How many ordered podium outcomes exist?

  1. Select Gold (1st): All 10 runners are eligible.
  2. Select Silver (2nd): With Gold awarded, 9 runners remain.
  3. Select Bronze (3rd): Exactly 8 runners remain.
  4. Apply P(10, 3): 10! ÷ (10 − 3)! = 10! ÷ 7! = 10 × 9 × 8 = 720 ordered podiums! Dividing by 3! = 6 gives 120 unordered top-3 finalist groups (C(10, 3)).

Part B (Repetition PIN Mode 2): How many 4-digit ATM PINs can be constructed from digits 0–9 if repeats are allowed versus forbidden? Allowing repeats yields 10⁴ = 10,000 codes (13.29 bits of entropy), whereas forbidding repeated digits trims the count to P(10, 4) = 10 × 9 × 8 × 7 = 5,040 codes.

Example 2: Word Anagrams of MISSISSIPPI & Round-Table Dinner Seating

Part A (Multiset Mode 3): How many visually distinct 11-letter strings can be formed by rearranging the letters of MISSISSIPPI?

  1. Count letter frequencies: M = 1, I = 4, S = 4, and P = 2, summing to n = 1 + 4 + 4 + 2 = 11.
  2. Compute total numerator: 11! = 39,916,800 arrangements if every letter were uniquely colored.
  3. Divide by duplicate factorials: 1! × 4! × 4! × 2! = 1 × 24 × 24 × 2 = 1,152.
  4. Final multiset count: 39,916,800 ÷ 1,152 = 34,650 unique anagrams!

Part B (Circular Mode 4): Eight diplomats sit around a circular conference table (n = 8, r = 8). Fixing Diplomat #1 as reference eliminates 8 equivalent table rotations, yielding (8 − 1)! = 7! = 5,040 relative seating orders (down from 8! = 40,320 linear row seats). If those same 8 gems were strung onto a flippable bracelet, mirror reflection halves that count again to 5,040 ÷ 2 = 2,520.

Permutation Formulas in Excel, Google Sheets & Python

Compute standard permutations, repetition powers, and exact arbitrary-precision integers directly in spreadsheets or Python:

Excel / Sheets Standard nPr: =PERMUT(n, r)
Excel / Sheets With Repetition: =PERMUTATIONA(n, r) [equivalent to =POWER(n, r)]
Excel Multiset Multinomial Ratio: =MULTINOMIAL(k1, k2, ...)
Python 3.8+ Standard nPr (Exact): math.perm(n, r)
Python Circular / Multiset (Exact): math.factorial(n) // math.prod(math.factorial(k) for k in counts)

5 Common Permutation Mistakes to Avoid

  1. Using Combinations C(n, r) When Order Changes Meaning: Passwords, race placements, batting lineups, and sequential task queues all care which item goes first; always use nPr instead of nCr.
  2. Evaluating n! ÷ (n − r)! Numerically Without Canceling: Computing 1000! then dividing overflows standard 64-bit floats (Infinity); always expand only the r falling factors n × (n − 1) × ... × (n − r + 1) or use BigInt arithmetic.
  3. Forgetting 0! = 1: Writing P(5, 5) = 5! ÷ 0! never divides by zero; empty product symmetry guarantees 0! = 1, yielding P(5, 5) = 120.
  4. Treating Repeated Letters as Unique Symbols: Counting anagrams of words like BOOK or STATISTICS with raw n! severely overcounts; always divide by the factorial of every duplicate count.
  5. Applying Linear n! to Round Tables or Bracelets: Round-table problems depend strictly on relative clockwise neighbors ((n − 1)!), and flippable keyrings divide by an extra factor of 2.

Related Probability & Statistical Solvers

Pair exact permutation counts with probability models and sampling calculations across our Math & Statistics hub:

Read more about our BigInt exact-precision checks and test coverage in our Editorial & Mathematical Accuracy Policy.

Frequently Asked Questions

What is the formula for permutations P(n, r)?

Without repetition, P(n, r) = n! / (n - r)!. This simplifies to multiplying r descending factors starting from n: n * (n - 1) * ... * (n - r + 1).

What is the difference between permutations (nPr) and combinations (nCr)?

Permutations count ordered arrangements (AB differs from BA), while combinations count unordered subsets (AB and BA are the same group). Therefore P(n, r) = C(n, r) * r!.

How do you calculate permutations when items can repeat?

When repetition is allowed across r positions from n choices (like a 4-digit PIN from 0-9), multiply n by itself r times: n^r. For 10 digits and 4 positions, 10^4 = 10,000.

How do you find permutations of a word with repeated letters like MISSISSIPPI?

Use the multiset permutation formula n! / (k1! * k2! * ... * km!), dividing total factorial n! by the factorial of each repeated symbol count. For MISSISSIPPI (11 letters, M=1, I=4, S=4, P=2), 11! / (1! * 4! * 4! * 2!) = 34,650.

Why is the circular permutation formula (n - 1)! instead of n!?

Because rotating a circle preserves every neighbor relationship, each circular arrangement matches n identical linear rotations. Dividing n! by n rotations leaves (n - 1)!, which is equivalent to pinning 1 anchor seat and arranging the remaining n - 1 items.

When should circular arrangements be divided by 2?

Divide circular permutations by 2 to get (n - 1)! / 2 whenever a ring can be flipped upside down (a free necklace, bracelet, or keyring) and clockwise/counterclockwise mirror reflections count as identical (for n >= 3).

Mathematical References & Standards