ThisCalculator

Technology

Permutation vs Combination Calculator: Key Differences

Updated · Standard formula, shown below

The calculator for this page is switched off while it is checked. The formula is below, and the worked example in the article shows how to use it by hand.

Permutation vs Combination Calculator: Key Differences

A permutation vs combination calculator works out the number of ways to arrange or select items from a set. You enter the total number of items (n) and the number you are choosing (r), and the calculator returns either the number of ordered arrangements (permutations) or unordered selections (combinations). The key difference is whether order matters: permutations count different sequences as distinct, while combinations treat the same items in any order as one result.

Formula

The calculator uses the standard factorial formulas. For permutations (order matters), the number of ways to choose and arrange r items from n is:

P(n, r) = n! / (n − r)!

For combinations (order does not matter), the number of ways to select r items from n is:

C(n, r) = n! / [r! × (n − r)!]

Where n! (n factorial) means multiplying all whole numbers from n down to 1. For example, 5! = 5 × 4 × 3 × 2 × 1 = 120. Both formulas assume you are choosing without replacement, meaning once an item is used, it cannot be chosen again.

Worked Example

Using the calculator defaults: n = 10, r = 3, and the type set to permutation.

  1. Calculate 10! = 10 × 9 × 8 × 7 × 6 × 5 × 4 × 3 × 2 × 1 = 3,628,800
  2. Calculate (10 − 3)! = 7! = 7 × 6 × 5 × 4 × 3 × 2 × 1 = 5,040
  3. Divide: 3,628,800 ÷ 5,040 = 720

So P(10, 3) = 720. If you switch the type to combination, the result becomes 720 ÷ 3! = 720 ÷ 6 = 120. That matches C(10, 3) = 120.

How to Choose Between Permutation and Combination

The single most important question is: does the order of the selected items matter? If yes, use permutations. If no, use combinations. Here are concrete examples to guide you:

  • Permutation example: A race with 10 runners and 3 medals (gold, silver, bronze). The order of the top three finishers matters because gold, silver, and bronze are distinct. The number of possible medal outcomes is P(10, 3) = 720.
  • Combination example: Choosing 3 students from a class of 10 to form a committee. The committee is the same regardless of the order in which the students are picked. The number of possible committees is C(10, 3) = 120.
  • Another permutation example: Arranging 3 books from a shelf of 10 on a reading list. The sequence of books matters because the order of reading is different.
  • Another combination example: Selecting 3 flavors from a menu of 10 for a tasting box. The order you list them does not change the set of flavors.

Common Mistakes and Misconceptions

A frequent error is confusing the two when the problem involves grouping or selection. If the problem says “arrange,” “order,” “sequence,” or “rank,” it is a permutation. If it says “choose,” “select,” “pick,” or “committee,” it is a combination. Another common mistake is forgetting that these formulas assume no repetition. If you can reuse items (like a lock combination where digits can repeat), you need different formulas: n^r for permutations with repetition, and C(n + r − 1, r) for combinations with repetition. Also, be careful with the factorial of zero: 0! is defined as 1, which is why P(n, n) = n! and C(n, n) = 1.

Real-World Applications

Permutations and combinations appear in many everyday situations beyond math class. In lottery games, the number of possible ticket combinations uses the combination formula because the order of drawn numbers does not matter. In password security, the number of possible passwords with a fixed length and character set uses permutations with repetition (n^r). In sports scheduling, the number of matches in a round-robin tournament is a combination problem (choosing 2 teams from n). In genetics, the number of possible gene combinations from parent alleles uses combinations. Even in computer science, algorithms that generate all subsets or all orderings rely on these counts.

Permutation vs Combination: A Side-by-Side Comparison

Here is a quick reference table to solidify the difference:

  • Order matters? Permutation: yes; Combination: no.
  • Formula: P(n, r) = n!/(n−r)!; C(n, r) = n!/[r!(n−r)!].
  • Result for n=10, r=3: P = 720; C = 120.
  • Typical wording: Permutation: “arrange,” “order,” “rank”; Combination: “choose,” “select,” “group.”
  • Example: Permutation: top 3 finishers in a race; Combination: 3-person committee from 10 people.

Limitations of the Calculator

This calculator only handles the basic case of choosing without replacement, where each item is distinct. It does not handle scenarios with identical items (e.g., arranging letters where some repeat) or with replacement (e.g., rolling dice multiple times). For those, you need adjusted formulas. Also, the calculator works with whole numbers for n and r. If you enter a value for r greater than n, the result will be zero because you cannot choose more items than are available. The factorial function grows extremely fast, so for large n (above 170), the numbers exceed the capacity of most calculators and will display as infinity or an error. In practice, most real-world problems use n below 100.

Frequently Asked Questions

What is the difference between permutation and combination?

Permutation counts arrangements where order matters, while combination counts selections where order does not matter. For example, the set {A, B, C} is one combination but can be arranged in 6 different permutations (ABC, ACB, BAC, BCA, CAB, CBA).

When do I use nPr vs nCr?

Use nPr (permutation) when the sequence or arrangement is important, such as assigning titles or positions. Use nCr (combination) when you are just forming a group or subset, such as picking team members or lottery numbers.

Can I use the calculator for problems with repetition?

No, this calculator assumes no repetition. If repetition is allowed, use n^r for permutations with repetition (e.g., a 4-digit PIN from 0-9 gives 10^4 = 10,000) or C(n + r − 1, r) for combinations with repetition (e.g., choosing 3 scoops from 5 flavors, allowing repeats).

What does n! mean and why is 0! = 1?

n! (n factorial) is the product of all positive integers from 1 to n. For example, 4! = 4 × 3 × 2 × 1 = 24. 0! is defined as 1 by convention so that formulas like C(n, n) = 1 work correctly. It also matches the idea that there is exactly one way to arrange zero objects.

Why does the calculator show 0 when r > n?

You cannot choose more items than are available. If you try to select 5 items from a set of 3, there are zero ways to do it, so the formula correctly returns 0. Always ensure r ≤ n for meaningful results.

Related

Formula used
in n | Total items (n) | - | 10 | 0
in r | Items chosen (r) | - | 3 | 0
sel type | Calculation type | Permutation=1, Combination=2
out result | Result | - | (n! / (n - r)!) * (type == 1 ? 1 : 1 / r!) | 0

Each line is one input (in, sel, list) or one result (out: label, unit, formula, decimals). How the calculators work

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.