Permutation & Combination Calculator

Number of permutations (nPr) and combinations (nCr).

Enter details

Combinations (nCr)

120

Permutations (nPr)
720
With repetition (nʳ)
1,000

How combinations (ncr) changes with

Total items (n): 5 → 1015 → 455

The dot is your current value. The graph updates as you type.

Formula: nPr = n!/(n−r)!; nCr = n!/(r!(n−r)!)

Permutation and Combination Calculator: nPr and nCr

Short answer

This calculator determines the total possible ways to select a subset of items from a larger set, both when arrangement order matters (permutations) and when it does not (combinations). For instance, selecting 3 items from a group of 10 yields 120 unique combinations, 720 ordered permutations, and 1,000 possibilities if repetition is permitted.

Formula

nPr = n! / (n - r)! | nCr = n! / [r! * (n - r)!] | Repetition = n^r

n represents the total number of items in the set; r represents the number of items being selected or chosen; ! denotes the factorial operation (the product of all positive integers less than or equal to that number, with 0! defined as 1); nPr represents the number of permutations where order matters; nCr represents the number of combinations where order does not matter; n^r represents the total possibilities when items can be selected repeatedly in an ordered sequence.

Worked example

Total items (n)
10
Chosen (r)
3
  • Combinations (nCr): 120
  • Permutations (nPr): 720
  • With repetition (nʳ): 1,000

What Permutations and Combinations Calculate

Combinatorics is the branch of mathematics dealing with counting, arrangement, and grouping. When analyzing a set of distinct items, two fundamental questions arise: how many items are available in total ($n$), and how many are being selected ($r$)?

The Permutation and Combination Calculator computes three primary values:

  1. Combinations ($nCr$): The number of ways to pick $r$ items from $n$ distinct items when the order of selection does not matter.
  2. Permutations ($nPr$): The number of ways to pick and arrange $r$ items from $n$ distinct items when the order of selection is strictly important.
  3. With Repetition ($n^r$): The total number of ordered arrangements possible if items can be chosen multiple times (sampling with replacement).

These principles form the foundation of discrete mathematics, probability theory, computer science data structures, cryptography, statistical mechanics, and experimental design.


Step-by-Step Worked Example

To understand how these formulas operate, consider an example with a total pool of $n = 10$ items, from which $r = 3$ items are selected.

1. Combinations ($nCr$)

Combinations determine how many unique subsets of size 3 can be formed from 10 items, regardless of sequence: $$ \text{Formula: } nCr = \frac{n!}{r!(n - r)!} $$ Substitute the values: $$ {}{10}C_3 = \frac{10!}{3!(10 - 3)!} = \frac{10!}{3! \times 7!} $$ Expand the factorials and cancel out the common $7!$ terms: $$ {}{10}C_3 = \frac{10 \times 9 \times 8 \times 7!}{3 \times 2 \times 1 \times 7!} = \frac{10 \times 9 \times 8}{3 \times 2 \times 1} = \frac{720}{6} = 120 $$ There are 120 distinct combinations.

2. Permutations ($nPr$)

Permutations determine how many ordered arrangements of 3 items can be made from 10 unique items: $$ \text{Formula: } nPr = \frac{n!}{(n - r)!} $$ Substitute the values: $$ {}_{10}P_3 = \frac{10!}{(10 - 3)!} = \frac{10!}{7!} = \frac{10 \times 9 \times 8 \times 7!}{7!} = 10 \times 9 \times 8 = 720 $$ There are 720 distinct permutations. Notice that $720 = 120 \times 3!$.

3. Ordered Selection with Repetition ($n^r$)

If an item can be reused after being selected (such as choosing a 3-digit PIN using digits 0–9): $$ \text{Formula: } n^r = 10^3 = 10 \times 10 \times 10 = 1,000 $$ There are 1,000 total possibilities when repetition is permitted.


Input Sensitivity Comparison

Changing the total set size ($n$) while holding the selected subset ($r = 3$) constant highlights how combinatorial spaces expand:

  • Lower Input ($n = 8, r = 3$): $${}_8C_3 = \frac{8 \times 7 \times 6}{3 \times 2 \times 1} = 56$$
  • Base Example ($n = 10, r = 3$): $${}_{10}C_3 = \frac{10 \times 9 \times 8}{3 \times 2 \times 1} = 120$$
  • Higher Input ($n = 12, r = 3$): $${}_{12}C_3 = \frac{12 \times 11 \times 10}{3 \times 2 \times 1} = 220$$

As $n$ grows, possible combinations increase rapidly, demonstrating non-linear factorial growth.


How to Read and Interpret Results

  • Order Irrelevant vs. Order Critical: If creating a committee of 3 people from 10 candidates, use $nCr$ (120) because a committee has no sequential hierarchy. If assigning specific roles (President, Vice President, Treasurer) to those 3 people, use $nPr$ (720) because job titles introduce order.
  • Symmetry Property of Combinations: Combinations exhibit symmetry where $nCr = nC(n - r)$. Choosing 3 items out of 10 (${}{10}C_3 = 120$) produces the exact same number of outcomes as leaving 7 items behind (${}{10}C_7 = 120$).
  • Extremes: Selecting 0 items ($nC0$) or all items ($nCn$) always equals 1. Selecting 1 item ($nC1$) always equals $n$.

Practical Tips for Counting Problems

  1. Identify the Physical Process: Ask whether swapping two elements creates a new outcome. If yes, compute permutations; if no, compute combinations.
  2. Break Down Multi-Stage Selections: When selecting from multiple distinct pools (e.g., choosing 2 men from 5 and 3 women from 6), calculate the combinations of each pool separately and multiply the totals: ${}_5C_2 \times {}_6C_3$.
  3. Cancel Early When Working by Hand: Avoid multiplying full factorials directly. Always cancel the largest common factorial between the numerator and denominator before multiplying the remaining terms.

When Not to Rely on Basic Permutation and Combination Formulas

Standard $nPr$ and $nCr$ models assume two strict conditions: all $n$ items are distinct, and selections are made without replacement. Do not use these baseline formulas if:

  • Duplicates Exist in the Set: If rearranging letters in words with repeated characters (like "LEVEL"), standard $n!$ overcounts identical arrangements. You must divide by duplicate factorials ($5! / (2! \times 2!)$).
  • Unordered Grouping with Replacement: If selecting an unordered collection where items can be picked multiple times (such as selecting 5 scoops of ice cream from 3 available flavors), use multiset combinations: $\binom{n + r - 1}{r}$.
  • Circular Arrangements: Items arranged in a circle eliminate fixed endpoints, changing total permutations to $(n - 1)!$.

Comparison

ScenarioInputResult
Lower inputTotal items (n): 8Combinations (nCr): 56
Base exampleTotal items (n): 10Combinations (nCr): 120
Higher inputTotal items (n): 12Combinations (nCr): 220

Common mistakes

  • Confusing permutations with combinations by treating ordered sequences as unordered groups.
  • Setting r greater than n when sampling without replacement, which is mathematically impossible in standard counting.
  • Assuming 0! equals 0 rather than 1, leading to false division-by-zero errors in formulas.
  • Using standard nPr or nCr formulas when items can be picked multiple times instead of applying exponential or multiset rules.
  • Ignoring indistinguishable items, which overcounts unique outcomes (e.g., anagrams with duplicate letters).

Checklist

  • Verify that the total items (n) is a non-negative integer.
  • Ensure the chosen items (r) is a non-negative integer less than or equal to n for standard nPr and nCr.
  • Determine whether the sequence or arrangement order matters for your scenario.
  • Check whether items can be selected multiple times (sampling with replacement versus without replacement).
  • Identify identical or indistinguishable items within the total set before running standard formulas.
  • Use factorial expansion cancellations to simplify large manual calculations.

Calculators Percentage Editorial Team

Calculator guides from the Calculators Percentage team. These introductory examples are educational, not professional advice.

Last reviewed:

This tool provides mathematical calculations based on classical discrete probability formulas. It assumes all items in the total set are distinct and that inputs are whole non-negative integers.

Frequently Asked Questions

What is the primary difference between a permutation and a combination?

The key distinction is order. In a permutation, the arrangement order is essential, meaning {A, B} and {B, A} represent two distinct outcomes. In a combination, order does not matter, meaning {A, B} and {B, A} count as the exact same single group.

How is 0 factorial (0!) calculated, and why does it equal 1?

In combinatorial mathematics, 0! is defined as 1 to maintain consistency across algebraic formulas. For example, selecting all items from a set (nCn) equals n! / [n! * (n - n)!], which simplifies to n! / [n! * 0!]. For this value to correctly equal 1, 0! must equal 1.

Why is nCr always less than or equal to nPr?

Combinations represent unordered groups, while permutations account for every unique ordering of those same groups. Because each combination of r items can be ordered in r! different ways, nPr equals nCr multiplied by r!. Consequently, nCr is always smaller than nPr, except when r is 0 or 1, where they are equal.

What does selection with repetition mean?

Selection with repetition, calculated as nʳ, occurs when each chosen item is returned to the pool before the next selection. A common example is a digital keypad lock with digits 0 through 9: entering a 3-digit code allows repeated numbers, producing 10³ or 1,000 distinct permutations.

Why is a typical padlock called a combination lock if order matters?

In everyday language, lock codes are referred to as combinations, but mathematically they are permutations with repetition. Because the sequence 10-20-30 will open the lock while 30-20-10 will not, order is strictly required.

Can n or r be negative numbers or decimals?

Standard combinatorial counting requires n and r to be non-negative integers (0, 1, 2, 3, etc.). While advanced calculus and the Gamma function extend factorials to non-integers, classical discrete counting applies only to whole individual items.

Sources & references

Formulas are tested against hand-checked answers. How we check our calculators.

Estimates only. Confirm final figures, terms and fees with your bank, provider or a qualified professional.

Last updated: January 15, 2026