How to Use the PERMUT and PERMUTATIONA Functions in Google Sheets for Combinatorics

In statistical analysis, probability theory, cryptographic security modeling, and operational scheduling, calculating the number of possible arrangements for a set of items is a fundamental task. Unlike combinations—where the order of selection does not matter—permutations focus strictly on ordered sequences. Depending on the real-world scenario, selections may occur with or without replacement. For instance, arranging runners on a podium prohibits repetition, whereas generating four-digit PIN codes allows numbers to repeat freely.

Google Sheets provides two native mathematical functions designed to calculate these permutation spaces instantly: PERMUT (permutations without repetition) and PERMUTATIONA (permutations with repetition allowed). By mastering these functions, analysts can calculate sample spaces, evaluate brute-force password vulnerability, and model probability distributions without manual factorial calculations.

Understanding Permutations: Order and Repetition

To understand the mathematical distinction between the two functions, consider choosing k items from a pool of n available items:

  • Without Repetition (PERMUT): Once an item is selected, it cannot be chosen again. The formula evaluates to:
    P(n, k) = n! / (n - k)!
    For example, selecting a 1st, 2nd, and 3rd place winner from 10 competitors results in 10 × 9 × 8 = 720 possible outcomes.
  • With Repetition (PERMUTATIONA): An item can be chosen multiple times across positions. The formula evaluates to:
    P_a(n, k) = n^k
    For example, creating a 3-character passcode where each character can be any of 10 digits (0–9) yields 10^3 = 1,000 possible outcomes.

Syntax and Argument Requirements

Both functions accept identical argument structures in Google Sheets:

=PERMUT(number, number_chosen)
=PERMUTATIONA(number, number_chosen)

The parameters operate as follows:

  • number: The total number of items in the population pool (n). Must be a non-negative integer. If a decimal is entered, Google Sheets automatically truncates it to an integer.
  • number_chosen: The number of items to select in each ordered arrangement (k). Must be a non-negative integer.

For PERMUT, number_chosen must be less than or equal to number. If number_chosen > number, PERMUT returns a #NUM! error. Conversely, PERMUTATIONA permits number_chosen to exceed number, because items are replaced after every draw.

Calculating Permutations Without Repetition Using PERMUT

Consider a task scheduling scenario where an engineering team must assign 4 distinct maintenance shifts to 8 available technicians, with each technician working at most one shift.

To calculate the total number of unique shift schedules, enter the following formula into an empty cell:

=PERMUT(8, 4)

Google Sheets computes 8! / (8 - 4)! = 8 × 7 × 6 × 5 = 1,680 possible assignment combinations.

If you have values stored in spreadsheet cells—for example, total candidate items in cell A2 and selection count in cell B2—reference them dynamically:

=PERMUT(A2, B2)

Calculating Permutations With Repetition Using PERMUTATIONA

Consider a cybersecurity evaluation assessing the strength of a custom identification code consisting of 5 alphanumeric characters chosen from lowercase letters (26) and digits (10), totaling 36 possible characters per position.

Because characters can repeat across positions (such as “a11b2”), use PERMUTATIONA:

=PERMUTATIONA(36, 5)

Google Sheets calculates 36^5 = 60,466,176 possible unique identification codes. This metric allows security auditors to calculate the time required for a brute-force dictionary attack based on server request rate limits.

Comparing PERMUT vs PERMUTATIONA Side by Side

To observe how repetition fundamentally expands combinatorial scale, construct a comparative worksheet model:

Pool (n) Chosen (k) PERMUT (No Repetition) PERMUTATIONA (With Repetition)
5 3 =PERMUT(5, 3) → 60 =PERMUTATIONA(5, 3) → 125
10 4 =PERMUT(10, 4) → 5,040 =PERMUTATIONA(10, 4) → 10,000
20 3 =PERMUT(20, 3) → 6,840 =PERMUTATIONA(20, 3) → 8,000
6 8 =PERMUT(6, 8) → #NUM! =PERMUTATIONA(6, 8) → 1,679,616

Notice the final row: when selecting 8 items from a pool of 6, PERMUT fails because you cannot draw 8 unique items from 6 without replacement. However, PERMUTATIONA successfully calculates 6^8 = 1,679,616.

Troubleshooting Common Errors

When implementing permutation formulas in Google Sheets, watch for common error conditions:

  • #NUM!: Occurs in PERMUT if number_chosen > number, or in either function if arguments are negative. Ensure both values are positive integers.
  • #VALUE!: Triggered when text strings or invalid non-numeric characters are passed as arguments. Wrap cell inputs in VALUE() or verify data validation on input ranges.
  • Floating-Point Limits: Because permutation calculations grow factorially or exponentially, extremely large numbers (e.g., =PERMUTATIONA(100, 100)) will exceed Google Sheets’ numeric precision threshold (approximately 1.79E+308), resulting in an overflow #NUM! error.

Get the best tech tips delivered straight to your inbox.

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