How to Use the PERMUT and PERMUTATIONA Functions in Microsoft Excel to Calculate Permutations

Combinatorics and probability analysis frequently involve determining how many unique arrangements or ordered sequences can be formed from a pool of items. When the order of selection matters—such as assigning distinct runner positions in a race, configuring security passcodes, or modeling manufacturing assembly sequences—you are calculating a permutation.

Permutations differ critically depending on whether elements can be reused. If items cannot be repeated (like dealing unique cards from a deck), you need standard permutations without replacement. If items can be repeated freely (like choosing digits for a 4-digit PIN code where numbers can repeat), you need permutations with replacement. Microsoft Excel provides two dedicated functions to compute these values without requiring manual factorial algebra: PERMUT and PERMUTATIONA. This tutorial breaks down the mathematical logic, syntax, practical examples, and common calculation limits of both functions.

PERMUT vs. PERMUTATIONA vs. COMBIN

Understanding which combinatorics function to deploy in Excel ensures mathematically valid results:

Function Mathematical Operation Order Matters? Repetition Allowed? Formula
PERMUT(n, k) Permutations without repetition Yes No n! / (n − k)!
PERMUTATIONA(n, k) Permutations with repetition Yes Yes nk
COMBIN(n, k) Combinations without repetition No No n! / (k! × (n − k)!)

1. The PERMUT Function (Without Repetition)

Use PERMUT when selecting k items from a group of n items where each item can only be picked once:

=PERMUT(number, number_chosen)
  • number (Required): An integer representing the total pool of items (n). Must be greater than or equal to 0.
  • number_chosen (Required): An integer representing the number of items in each permutation (k). Must be between 0 and n.

Practical Example: Awarding Podium Medals

Suppose 8 runners compete in a 100-metre sprint final, and you want to know how many distinct Gold, Silver, and Bronze medal podium orders are possible:

=PERMUT(8, 3)

Excel computes 8 × 7 × 6 = 336 possible medal arrangements.

2. The PERMUTATIONA Function (With Repetition)

Use PERMUTATIONA when items can be selected repeatedly across positions:

=PERMUTATIONA(number, number_chosen)
  • number (Required): The total number of available options per position (n). Must be an integer ≥ 0.
  • number_chosen (Required): The number of positions or slots to fill (k). Must be an integer ≥ 0. Unlike PERMUT, number_chosen can exceed number because items can repeat.

Practical Example: Calculating 4-Digit Security PIN Combinations

To determine the total number of unique 4-digit numeric passcodes possible using digits 0 through 9 (10 possible digits), where digits can repeat (e.g. 7721 or 0000):

=PERMUTATIONA(10, 4)

Excel calculates 10^4 = 10,000 unique permutations.

Practical Example: Generating Software License Key Permutations

To model product key entropy, consider an alphanumeric key segment of 5 characters drawn from uppercase English letters (26) and digits (10), totaling 36 possibilities:

  1. In cell A1, enter the character pool: 36
  2. In cell B1, enter the segment length: 5
  3. In cell C1, calculate permutations with repetition:
    =PERMUTATIONA(A1, B1)
  4. Excel outputs 60,466,176 unique license code combinations.

Error Handling and Edge Cases

Keep these validation rules in mind when constructing combinatorics models in Excel:

  • #NUM! Error in PERMUT:
    • Occurs if number < 0 or number_chosen < 0.
    • Occurs in PERMUT if number_chosen > number. You cannot pick 6 unique items from a pool of only 4 items.
  • #VALUE! Error: Occurs when non-numeric text strings, symbols, or unparsed space characters are passed into either argument.
  • Decimal Truncation: If decimal values are supplied (e.g. =PERMUT(8.7, 3.2)), Excel automatically truncates the decimal portions to integers (=PERMUT(8, 3)) before calculation.

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.