Skip to content
CalculatorPro — Free Online Calculators

Permutations Calculator — Free nPr Combinatorics Tool

Calculate the number of permutations P(n, r), the count of ordered arrangements of r items from n, for probability, statistics, and combinatorics problems.

ByEditorial Team, Math Updated Jun 7, 20262026 verified Methodology

Permutations Calculator (nPr)

Calculate the number of ways to arrange items where order matters.

About this calculator

Permutations Calculator

Comprehensive Guide to Permutations Calculator

The Permutations Calculator evaluates the exact count of unique ordered arrangements for any set of items. In combinatorics, probability theory, and discrete mathematics, a permutation represents an arrangement of elements where order is paramount ($ABC \ne BAC \ne CBA$). Whether arranging athletes on an Olympic medals podium, computing brute-force password security entropies, scheduling tournament brackets, or analyzing genetic codon sequences in molecular biology, permutations quantify sequential combinatorial explosion.

The fundamental distinction in discrete counting lies between permutations (where sequential position matters) and combinations (where grouping alone matters). For instance, choosing three friends to join a road trip is a combination, but assigning them specific roles—driver, navigator, and aux-cord DJ—is a permutation.


How to Use the Permutations Calculator

  1. Enter Total Items ($n$): Input the total number of items available in the pool ($n \ge 0$).
  2. Enter Items to Arrange ($r$): Input the number of items selected to fill sequential positions ($0 \le r \le n$).
  3. Select Permutation Model: Choose between:
    • Linear without Repetition ($P(n, r)$): Standard ordered ranking where each item can only be selected once.
    • Linear with Repetition Allowed ($n^r$): PIN codes, lock combinations, and digital password slots.
    • Circular Permutations ($(n - 1)!$): Seating arrangements around a circular dinner table.
    • Multiset Permutations: Arrangements of sets with duplicate/indistinguishable items (e.g., anagrams like STATISTICS).
  4. Review Exact vs. Scientific Outputs: View the exact integer count alongside standard scientific notation for astronomical totals ($n > 20$).
  5. Inspect the Factorial Reduction Ladder: Examine the exact cancellation steps that transform $P(n, r) = \frac{n!}{(n - r)!}$ into a clean multiplication product.

The Calculator Formulas

Permutation algebraic equations, multiset identities, and circular arrangements:

1. Permutations without Repetition (Ordered Subset):
   P(n, r) = n! / (n - r)! = n × (n - 1) × (n - 2) × ... × (n - r + 1)
   Where:
   - n = Total number of unique elements
   - r = Number of elements selected to arrange (0 ≤ r ≤ n)
   - ! = Factorial operator (0! = 1)

2. Full Set Permutations (Arranging All n Elements):
   P(n, n) = n! / (n - n)! = n! / 0! = n!

3. Permutations with Repetition Allowed:
   P_rep(n, r) = n^r
   Each of the r slots has n independent choices.

4. Circular Permutations (Seating around a Table):
   P_circ(n) = (n - 1)!
   Because rotating all seats preserves relative ordering (n identical rotations).
   If reflective flips are indistinguishable (e.g., beads on a necklace):
   P_necklace(n) = (n - 1)! / 2

5. Multiset Permutations (Arranging with Duplicate Elements):
   P_multi = n! / ( n₁! × n₂! × n₃! × ... × nₖ! )
   Where n₁, n₂, ... are the frequencies of indistinguishable items (Σ nᵢ = n).

6. Relationship to Combinations:
   P(n, r) = C(n, r) × r!
   C(n, r) = P(n, r) / r!

Practical Examples

Example 1: Arranging 3 Podium Finishers from 8 Olympic Sprinters

Eight elite sprinters compete in the 100-meter Olympic final. How many distinct ways can the Gold, Silver, and Bronze medals be awarded?

Parameters: n = 8 (total sprinters), r = 3 (podium positions)

Formula: P(8, 3) = 8! / (8 - 3)! = 8! / 5!

Step 1: Expand Factorials:
8! = 8 × 7 × 6 × 5 × 4 × 3 × 2 × 1
5! = 5 × 4 × 3 × 2 × 1

Step 2: Cancel Common Factor 5!:
P(8, 3) = (8 × 7 × 6 × 5!) / 5! = 8 × 7 × 6

Step 3: Multiply Remaining Slots:
8 × 7 = 56
56 × 6 = 336

Result: There are exactly 336 unique possible podium medal outcomes.

Example 2: Multiset Anagram Arrangements ("STATISTICS")

How many unique 10-letter arrangements can be formed using all the letters in the word "STATISTICS"?

Total Letters: n = 10

Letter Frequencies:
- S: 3 times
- T: 3 times
- A: 1 time
- I: 2 times
- C: 1 time
Check: 3 + 3 + 1 + 2 + 1 = 10 letters.

Formula: P = 10! / (3! × 3! × 1! × 2! × 1!)

Calculation:
10! = 3,628,800
3! = 6
3! = 6
2! = 2
Denominator = 6 × 6 × 1 × 2 × 1 = 72

P = 3,628,800 / 72 = 50,400

Result: Exactly 50,400 distinct anagram letter permutations exist.

Key Concepts & Essential Terminology

Permutations Principle: Ordered Sequential Slot SelectionEvaluating P(n, r) = n! / (n - r)!: Order matters (ABC ≠ BAC ≠ CBA)Arranging 3 Podium Finishers from 8 Competitors: P(8, 3)SLOT 1: GOLD8 Choices×SLOT 2: SILVER7 Choices×SLOT 3: BRONZE6 ChoicesPermutations vs. Combinations• Permutations: P(n, r) = n! / (n - r)!• Order Matters: ABC ≠ ACB ≠ BAC (6 arrangements)• Combinations: C(n, r) = P(n, r) / r!• Order Irrelevant: {A, B, C} is 1 single committeeRepetition & Multiset Formulas• Repetition Allowed: P = n^r (PIN codes, locks)• Circular Table: P_circ = (n - 1)!• Identical Items: P = n! / (n₁! × n₂! × ... × nₖ!)• e.g., "STATISTICS": 10! / (3! 3! 2!) = 50,400

Figure: Ordered slot selection principle and architectural comparison between permutations and combinations.

Mastering permutations requires understanding foundational combinatorics principles:

  • Order Significance: The defining attribute of a permutation. The sequence $(1, 2, 3)$ is considered completely distinct from $(3, 2, 1)$.
  • Factorial Cancellation: In evaluating $P(n, r) = \frac{n!}{(n - r)!}$, the denominator $(n - r)!$ cancels the lower tail of $n!$, leaving exactly $r$ sequential multiplying factors: $n \times (n - 1) \times \dots \times (n - r + 1)$.
  • The Multiplication Principle: If an experiment consists of $r$ consecutive stages, and stage 1 has $n_1$ choices, stage 2 has $n_2$ choices, and stage $r$ has $n_r$ choices, the total number of sequential outcomes is $n_1 \times n_2 \times \dots \times n_r$.
  • Derangements (Subfactorials, $!n$): A permutation where no element appears in its original position. For instance, the number of ways 4 people can exchange coats such that nobody receives their own coat is $!4 = 4! \times \sum_{k=0}^4 \frac{(-1)^k}{k!} = 9$.
  • Password Entropy (Bits): The measure of computational resistance against brute-force cracking. A password of length $r$ choosing from an alphabet of $n$ characters has $n^r$ possible permutations, yielding an entropy of $\log_2(n^r) = r \times \log_2(n)$ bits.

Permutations Reference Matrix for Classic n and r Values

The table below catalogs exact linear permutation counts $P(n, r)$ across common parameters:

Total Elements (n) r = 1 r = 2 r = 3 r = 4 Full Set P(n, n) Security / Practical Context
4 4 12 24 24 24 4-digit PIN permutations without repetition
5 5 20 60 120 120 Five-card poker hand card sequences
6 6 30 120 360 720 Books arranged on a shelf
7 7 42 210 840 5,040 Days of the week scheduling rotations
8 8 56 336 1,680 40,320 8-runner race podium finishes
9 9 72 504 3,024 362,880 Baseball batting order arrangements
10 10 90 720 5,040 3,628,800 Digits 0 through 9 phone number prefixes
12 12 132 1,320 11,880 479,001,600 Jury member seating assignments
16 16 240 3,360 43,680 ~2.092 × 10¹³ Hexadecimal byte permutations
20 20 380 6,840 116,280 ~2.433 × 10¹⁸ Maximum factorial in standard 64-bit integer

Combinatorial Arrangement Categories Comparison Table

Different operational constraints fundamentally alter the combinatorial formula:

Arrangement Model Governing Formula Does Order Matter? Can Items Repeat? Practical Industry Benchmark Example
Linear Permutation $P(n, r) = rac{n!}{(n-r)!}$ Yes No Awarding 1st, 2nd, and 3rd place in an athletic sprint
Permutation with Repetition $P = n^r$ Yes Yes 4-digit ATM bank card PINs ($10^4 = 10,000$ codes)
Circular Permutation $P = (n - 1)!$ Yes (Relative) No Seating guests around a circular conference banquet table
Multiset Permutation $ rac{n!}{prod n_i!}$ Yes Identical items Genetic sequence rearrangements of nucleotides ($A, C, G, T$)
Standard Combination $C(n, r) = rac{n!}{r!(n-r)!}$ No No Selecting a 5-person project management steering committee
Combination with Repetition $inom{n+r-1}{r}$ No Yes Selecting 6 scoops of ice cream from 12 available flavors

How Permutations Work

Permutations operate on sequential probability trees, symmetric group actions, and factorial asymptotic scaling:

1. The Slot Multiplication Logic

Consider filling $r$ empty sequential slots from $n$ distinct candidates:

  • Slot 1 has $n$ possible candidates.
  • Slot 2 has $(n - 1)$ remaining candidates (since 1 item is already placed).
  • Slot 3 has $(n - 2)$ candidates.
  • Slot $r$ has $(n - (r - 1)) = (n - r + 1)$ candidates.

Multiplying these independent choices gives:

P(n, r) = n × (n - 1) × (n - 2) × ... × (n - r + 1)

Multiplying and dividing by $(n - r)!$:

P(n, r) = [ n × (n - 1) × ... × (n - r + 1) × (n - r)! ] / (n - r)! = n! / (n - r)!

2. Symmetric Groups and Abstract Algebra

In abstract algebra, the set of all permutations of $n$ elements forms the Symmetric Group $S_n$ under function composition. The order (size) of $S_n$ is exactly $n!$. By Cayley's theorem, every finite group is isomorphic to a subgroup of some symmetric group, proving that permutations form the universal backbone of algebraic symmetry.

3. Circular Rotation Equivalence

Why do circular arrangements divide by $n$?

Around a circular table, there is no designated "head" or "first" position. Shifting all people one seat to the left produces a layout where every person has the exact same neighbor on their left and right. Because every arrangement can be rotated $n$ times into identical circular states, the total linear permutations ($n!$) must be divided by $n$:

P_circ = n! / n = (n × (n - 1)!) / n = (n - 1)!

Common Permutations Mistakes to Avoid

  1. Confusing Permutations with Combinations: Using $P(n, r)$ instead of $C(n, r)$ when order does not matter (e.g., lottery drawings or committee selections), resulting in answers inflated by a factor of $r!$.
  2. Treating Indistinguishable Items as Distinct: Using standard $n!$ for anagrams without dividing by the factorials of repeated letters ($n_1! n_2!$).
  3. Miscalculating Password Combinations: Using $P(n, r)$ instead of $n^r$ for passwords or PINs where characters can be repeated (e.g., "1111" or "AAAA").
  4. Forgetting Circular Symmetry: Using $n!$ instead of $(n - 1)!$ for round table seating.
  5. Integer Overflow in Custom Software: Attempting to compute $n!$ first before dividing by $(n - r)!$ in code. For $P(50, 2) = 50 imes 49 = 2,450$, calculating $50!$ first causes massive numeric overflow even though the final answer is small.

Frequently Asked Questions

What is the difference between a permutation and a combination?

In a permutation, the order of elements matters (for example, the lock combination 1-2-3 is different from 3-2-1). In a combination, order does not matter (for example, a fruit salad with apples, bananas, and grapes is the same salad regardless of which fruit is added first). Permutations produce larger numbers because each combination can be ordered in r! different ways.

Why is 0! equal to 1 in permutations?

0! equals 1 by mathematical definition and algebraic necessity. When arranging all n elements, the formula states P(n, n) = n! / (n - n)! = n! / 0!. For P(n, n) to equal n! (the known number of ways to arrange n items), 0! must equal 1.

How do you calculate permutations with identical items?

Divide the total factorial n! by the factorial of the frequency of each repeated item: P = n! / (n₁! × n₂! × ... × nₖ!). For example, in the word "PEPPER", there are 6 total letters with three P's and two E's, so the unique anagrams are 6! / (3! × 2!) = 720 / (6 × 2) = 60.

Why do circular permutations use (n - 1)! instead of n!?

Around a circular table, rotating everyone one seat produces an identical relative arrangement because relative positions to the left and right remain unchanged. Since there are n identical rotations for any layout, you divide the linear arrangements (n!) by n, which simplifies to (n - 1)!.

Can r be larger than n in a permutation without repetition?

No. In permutations without repetition, you cannot select more items than exist in the pool. Therefore, P(n, r) is mathematically defined only for 0 ≤ r ≤ n. If repetition is allowed, however, r can exceed n (such as a 6-digit PIN choosing from 10 digits: 10⁶ = 1,000,000).

How do permutations determine password security strength?

Password security is calculated as permutations with repetition: P = n^r, where n is the character set size (e.g., 94 printable ASCII characters) and r is password length. An 8-character password has 94⁸ ≈ 6.1 × 10¹⁵ permutations, while a 12-character password has 94¹² ≈ 4.75 × 10²³ permutations—multiplying cracking time by billions.


Conclusion

The Permutations Calculator delivers precise combinatorial counts for linear ordered subsets, repeating codes, circular table seatings, and multiset anagram arrangements. By applying sequential slot logic and factorial reduction principles, researchers, cryptographers, and students can model complex discrete systems with absolute accuracy.



Sources & References

Technical & General Calculation Disclaimer

This calculation tool applies standard mathematical, scientific, or engineering formulas. While designed for precision, output values are estimates and should be independently verified for commercial, structural, or safety-critical applications.

Comments

Sign in to leave a comment.

Loading comments…