How to Permutationa Function in Excel

Learn multiple Excel methods to permutationa function with step-by-step examples and practical applications.

excelformulaspreadsheettutorial
12 min read • Last updated: 7/2/2025

How to Permutationa Function in Excel

Why This Task Matters in Excel

A surprising number of day-to-day business decisions revolve around “how many ways can we arrange or combine these items?” Whether you are assigning workstation shifts, creating coupon codes, forecasting product bundles, or generating password policies, knowing the count of possible arrangements is essential. Imagine a distribution center that needs to label all cartons with a three-character code chosen from ten alphanumeric symbols. Management must confirm there are enough unique codes before launching production. Or consider an e-commerce site that wants to display every possible color–size–style combination of a garment; counting those permutations helps set inventory policy and server capacity.

Enter Excel’s PERMUTATIONA function. Where the older PERMUT function assumes each item can be used only once, PERMUTATIONA calculates arrangements with repetition allowed. This subtle difference mirrors real life: a coupon code “A99” repeats the digit 9, and a three-shift rota could place the same worker on multiple shifts. Using PERMUTATIONA prevents under-counting in these scenarios.

Excel is ideal for this problem because it lets you combine direct mathematical formulas with lookup tables, scenario modeling, conditional formatting, and What-If analysis—all in one workbook. You can instantly change the number of symbols or positions and watch downstream charts update automatically. Failing to compute permutations accurately can lead to stock-out risks, security weaknesses (too few password combos), or excess inventory. Mastering PERMUTATIONA therefore ties directly into risk management, operational planning, and data-driven decision-making skills you will use elsewhere in Excel, such as forecasting, Monte-Carlo simulation, and optimization models.

Best Excel Approach

The PERMUTATIONA function is the most direct and reliable way to count permutations that allow repetition. Its syntax is intuitive, requires only two inputs, and avoids manual factorial math that is error-prone for large numbers.

Syntax

=PERMUTATIONA(number, number_chosen)
  • number – total distinct items you can pick from (must be non-negative).
  • number_chosen – how many positions (places) you will fill, also non-negative.

Under the hood, the function computes

number ^ number_chosen   (number raised to the power number_chosen)

meaning each position can be any of the available symbols.

When to use this approach

  • Whenever repetition is allowed (e.g., password characters, dice rolls, rota that can assign the same person twice).
  • When you are primarily interested in the count of permutations rather than listing them.

Prerequisites
The function is available in Excel 2013 and later on Windows and macOS, plus Excel for the web and Microsoft 365. No add-ins are required.

Alternative quick formulas
If you simply want the mathematical equivalence and prefer a general-purpose formula, use the POWER function:

=POWER(number, number_chosen)

or the exponent operator:

=number^number_chosen

However, PERMUTATIONA is clearer to anyone reading the workbook because it documents intent.

Parameters and Inputs

PERMUTATIONA expects two whole-number inputs:

  1. number

    • Data type: positive integer or zero.
    • Represents distinct symbols or items (letters, products, digits).
    • Must reside in the range 0 to 10^308, but values beyond 170,000 will overflow typical factorial methods and may trigger scientific notation; PERMUTATIONA handles them gracefully because it uses exponentiation.
  2. number_chosen

    • Data type: positive integer or zero.
    • Represents the positions in each permutation (length of code, number of draws, sequence slots).

Input validation rules

  • If either argument is non-numeric, Excel returns the #VALUE! error.
  • If either is negative, Excel returns #NUM!.
  • Decimal inputs are truncated to the integer part, so 5.9 becomes 5—use INT or ROUND intentionally if your source cell may contain decimals.

Data preparation

  • Place inputs in clearly labeled cells, e.g., [B2] = distinct symbols, [B3] = positions. Reference these names in your formula to make the sheet self-explanatory.
  • For what-if analysis, convert the two input cells into defined names like Symbols and Positions, then point your PERMUTATIONA formula at those names to avoid hard-coding.

Edge cases

  • Zero symbols with any positive positions returns 0 permutations.
  • Any symbols with zero positions returns 1 permutation (the “empty” arrangement).
  • Very large exponents can produce scientific notation; format as Number with zero decimal places to see the integer. Big integers above 15 digits lose precision—see Example 3 for mitigation.

Step-by-Step Examples

Example 1: Basic Scenario — Counting Three-Digit Locker Codes

Suppose your gym issues locker codes consisting of three characters drawn from ten digits [0-9], and digits can repeat. How many unique locker codes exist?

  1. Enter the following sample data:
  • Cell [B2] label “Distinct Symbols” with value 10.
  • Cell [B3] label “Positions” with value 3.
  1. Enter the PERMUTATIONA formula in [B5]:
=PERMUTATIONA(B2,B3)
  1. Press Enter. The result is 1000 (ten cubed).

Why it works
Each of the three character slots can be any of ten digits. PERMUTATIONA multiplies ten by itself three times and produces 1000.

Common variations

  • Four-digit codes: change [B3] to 4; the formula updates to 10,000.
  • Using six letters plus four digits (total 10 symbols): same calculation applies.
  • Restricting repetitions? Then PERMUT would be correct instead, returning 720 for three positions (10P3).

Troubleshooting
If you see a #VALUE! error, check that [B2] or [B3] are not blank text labels. If you mistakenly entered 3.5 in [B3], Excel truncates to 3 silently, so use Data Validation to enforce whole numbers.

Screenshot description
Imagine column A for labels and column B for values. The result cell [B5] displays 1000 in bold, and the formula bar shows `=PERMUTATIONA(`B2,B3).

Example 2: Real-World Application — Generating SKU Configurations

A clothing retailer offers a T-shirt in four sizes (S, M, L, XL) and five colors (Black, White, Red, Blue, Green). They plan to run a three-item bundle promotion where customers can pick any color-size combination, and items can repeat (two red large, one blue medium, for instance). Before launching, inventory planners need to know the maximum bundle count.

Business data setup

  • Distinct color-size combinations: 4 sizes × 5 colors = 20 SKUs.
  • Bundle length: 3 items.
    Enter 20 in [B2] and 3 in [B3] as before.

Formula

=PERMUTATIONA(B2,B3)

Result: 8000 bundles.

Walkthrough

  1. Distinct SKUs act as “symbols.”
  2. Repetition is allowed because a bundle may contain duplicates.
  3. PERMUTATIONA raises 20 to the 3rd power, yielding 8000.

Business benefit
Knowing 8000 possible bundles tells marketing how many coupon codes or website links they may need. IT can provision space for up to 8000 database records. If they later expand to a four-item bundle, planners instantly see the count jump to 20^4 = 160,000 without rewriting any formula.

Integration with other features
Combine PERMUTATIONA with the STOCKHISTORY or VLOOKUP functions to price each bundle scenario. Use Data Tables to simulate different bundle lengths automatically in a matrix. Conditional Formatting can highlight lengths that overwhelm warehouse capacity.

Performance considerations
Raising 20 to the 5th power returns 3.2 million bundles—Excel still calculates instantly, but downstream lookup tables may slow, so filter by demand probability.

Example 3: Advanced Technique — Avoiding Precision Loss for Very Large Counts

A telecom provider designs 15-digit phone authentication tokens composed of 36 alphanumeric symbols (0-9 plus A-Z). They need to verify the theoretical number of unique tokens to assess collision risk in their security model.

Setup

  • Cell [B2] = 36 symbols.
  • Cell [B3] = 15 positions.

Direct formula

=PERMUTATIONA(B2,B3)

Excel returns 2.821109908E+23 (scientific notation). The full integer is 282,110,990,745,671,000,000,000—24 digits.

Edge case management
Excel displays only 15 significant digits in a standard Number format. To capture the full precision:

  1. Switch [B5] to text format before entering the formula, then copy the result from the Formula Bar—not ideal for dynamic models.
  2. Use the POWER function and the ROUND or TEXT functions:
=TEXT(POWER(B2,B3),"0")

This forces Excel to display the exact integer as text up to 32,767 characters.

Optimization
Large exponentiation is fast, but downstream formulas such as indexing arrays of every permutation would be impossible. For security analytics, you generally need only the count, so leave the value in scientific notation for readability, or store it as text when exporting reports.

Professional tip
Name the inputs Symbols and Positions, and then define a Named Formula BigPerm as:

=POWER(Symbols, Positions)

Use BigPerm in dashboards. You can later swap the definition to PERMUTATIONA without editing visuals.

Tips and Best Practices

  1. Label Inputs Clearly – Use cell names like Symbols and Positions to avoid confusion between the two arguments, especially when they come from separate sheets.
  2. Use Whole-Number Validation – Data Validation (Allow: Whole number, Minimum 0) prevents #VALUE! errors from accidental text or decimals.
  3. Document Repetition Assumptions – Add a note or comment explaining that repetition is allowed; future users might otherwise replace PERMUTATIONA with PERMUT incorrectly.
  4. Format Large Results as Scientific – Scientific notation keeps worksheets compact, while still conveying scale. Provide a helper cell that uses TEXT for the fully expanded value when necessary.
  5. Combine with Scenario Tools – Create a two-variable Data Table varying both symbols and positions to explore growth curves; this visualizes exponential scaling for stakeholders.
  6. Avoid Hard-Coding – Reference cells rather than typing numbers inside the formula; this supports what-if analysis and reduces maintenance errors.

Common Mistakes to Avoid

  1. Confusing PERMUTATIONA with PERMUT

    • Symptom: You underestimate counts where repetition is allowed.
    • Fix: Replace PERMUT with PERMUTATIONA or POWER, and double-check business rules.
  2. Using Negative or Decimal Inputs

    • Symptom: #NUM! or unexpected truncation occurs.
    • Fix: Validate inputs; wrap them with INT or ABS only if mathematically appropriate.
  3. Overflowing Cell Width

    • Symptom: Cells display #### instead of values.
    • Fix: Expand column width or set format to Scientific.
  4. Precision Loss in Large Integers

    • Symptom: Values over 15 digits round off.
    • Fix: Store as text using TEXT or place the result in a comment/documentation cell.
  5. Copying Results into Other Systems Without Notation Awareness

    • Symptom: External software misreads 2.82E+23 as 2.82.
    • Fix: Convert to full text string before export, or supply both forms and include units.

Alternative Methods

While PERMUTATIONA is purpose-built, alternative approaches may fit specific situations.

MethodFormula ExampleRepetition Allowed?ProsCons
PERMUTATIONA`=PERMUTATIONA(`n,k)YesSelf-documenting, simpleRequires Excel 2013+
Exponentiation=n^kYesUniversal math, available in all versionsLess descriptive; users may misinterpret its meaning
POWER Function`=POWER(`n,k)YesWorks in older Excel and other spreadsheetsSame clarity issue as exponentiation
PERMUT`=PERMUT(`n,k)NoCorrect when repetition not allowedWrong result if repetition permitted
COMBIN + factorial logic`=FACT(`k+n-1)/(FACT(k)*FACT(n-1))Yes (for combinations with repetition)Handles combination counts, useful for samplingComplex, not for ordered permutations

When to choose each

  • Use PERMUT if you need permutations without repetition (e.g., seating arrangements where a seat cannot be reused).
  • Use exponentiation or POWER when you are limited to an older Excel version (pre-2013) but still need repetition counts.
  • For unordered selections with repetition, apply combinatorial formulas (COMBIN variations) instead.

Switching methods
Because PERMUTATIONA equals POWER(n,k), migrating between the two only requires changing the function name, leaving references intact.

FAQ

When should I use this approach?

Use PERMUTATIONA anytime you need the number of ordered arrangements where items may be reused—passwords, dice rolls, product bundles with optional repeats, or multi-stage processes where the same resource can appear twice.

Can this work across multiple sheets?

Absolutely. Place inputs on a Parameters sheet (Symbols in [Parameters!B2], Positions in [Parameters!B3]), then reference them in a Calculations sheet:

=PERMUTATIONA(Parameters!B2, Parameters!B3)

Naming the cells across sheets further clarifies links.

What are the limitations?

  • Available only in Excel 2013 or later.
  • Precision limited to 15 digits when stored as numeric values.
  • Extremely large exponents can produce numbers exceeding Excel’s 10^308 maximum, returning #NUM!. Break the problem into smaller segments or use logarithms if this occurs.

How do I handle errors?

  • #VALUE! – Ensure both arguments are numeric.
  • #NUM! – Inputs must not be negative and result must not exceed Excel’s limit. Consider using logarithmic approaches or split calculations if you hit the ceiling.
  • Incorrect counts – Review whether repetition is truly allowed; if not, swap to PERMUT.

Does this work in older Excel versions?

PERMUTATIONA is unavailable before Excel 2013. In Excel 2010 or 2007, use:

=POWER(n,k)

The result is identical, though the intent is less clear. Document this workaround in a comment.

What about performance with large datasets?

PERMUTATIONA itself calculates in microseconds, even for enormous exponents. The bottleneck arises if you generate every permutation explicitly in a table—avoid that unless dataset size is manageable. For dashboards, display only the count, or sample a subset using RAND for demonstrations.

Conclusion

Counting permutations with repetition is crucial for everything from coupon code capacity to security token design. Excel’s PERMUTATIONA function makes the task effortless: two inputs, instantaneous results, and clarity for anyone reviewing your model. Mastering this function enriches your combinatorial toolkit and sharpens your ability to conduct scenario analysis, forecast inventory, and design robust systems. Practice with the examples above, integrate the technique into your own workflows, and explore related functions like COMBIN, PERMUT, and POWER to round out your mathematical proficiency. With repetition problems tamed, you can focus on higher-level insights and drive smarter business decisions.

We use tracking cookies to understand how you use the product and help us improve it. Please accept cookies to help us improve.