Free Permutation and Combination Calculator

Enter n and r to calculate permutations and combinations

This Permutation and Combination Calculator (also referred to as an nPr Calculator and nCr Calculator) provides a simple way to compute the number of possible permutations (ordered arrangements) and combinations (unordered selections) for any given set of objects. As a counting calculator and arrangements calculator, it implements the standard permutation formula and combination formula, making it ideal for probability calculations, scheduling tasks, or any problem that requires counting distinct outcomes.

Understanding Permutations and Combinations

A permutation counts the number of ways a subset of items can be arranged when order is important. For instance, the sequences ABC and BCA are considered two different permutations because the order of letters differs. Permutations are commonly used in situations that involve rankings, codes, or sequential assignments (e.g., assigning gold, silver, and bronze medals).

A combination, on the other hand, counts the number of ways to select a subset without regard to order. Here, ABC and BCA represent the same combination because they contain the same three letters. Combinations appear in contexts like drawing lottery numbers, forming committees, or selecting a group of winners where the order does not matter.

Both metrics are fundamental in combinatorics and probability. Understanding when to apply each is crucial for correctly interpreting results.

Calculating Permutations and Combinations: Step‑by‑Step

Both formulas rely on the factorial operation, where n!n! denotes the product of all positive integers from 1 to nn. By definition, 0!=10! = 1.

Permutation Formula

The number of permutations of nn distinct objects taken rr at a time is:

P(n,r)=n!(n−r)!P(n, r) = \dfrac{n!}{(n - r)!}

Example: Suppose you have 6 items (n=6n = 6) and you want to form ordered sequences of size 3 (r=3r = 3).

  1. Identify the total number of objects: n=6n = 6.
  2. Determine the sample size: r=3r = 3.
  3. Substitute into the formula:
P(6,3)=6!(6−3)!=6!3!=7206=120P(6, 3) = \dfrac{6!}{(6-3)!} = \dfrac{6!}{3!} = \dfrac{720}{6} = 120

Thus, there are 120 distinct ordered arrangements.

Combination Formula

The number of combinations of nn objects taken rr at a time is:

C(n,r)=n!r! (n−r)!C(n, r) = \dfrac{n!}{r! \, (n - r)!}

Example: You have 7 items (n=7n = 7) and wish to select groups of 4 (r=4r = 4), with order irrelevant.

  1. Total objects: n=7n = 7.
  2. Sample size: r=4r = 4.
  3. Apply the formula:
C(7,4)=7!4! (7−4)!=7!4!⋅3!=504024×6=5040144=35C(7, 4) = \dfrac{7!}{4! \, (7-4)!} = \dfrac{7!}{4! \cdot 3!} = \dfrac{5040}{24 \times 6} = \dfrac{5040}{144} = 35

So there are 35 different groups of 4 that can be chosen.

Key Differences Between Permutation and Combination

AspectPermutation (nPr)Combination (nCr)
Order significanceOrder matters – different sequences count separatelyOrder does not matter – different sequences count as the same
FormulaP(n,r)=n!(n−r)!P(n,r) = \dfrac{n!}{(n-r)!}C(n,r)=n!r!(n−r)!C(n,r) = \dfrac{n!}{r!(n-r)!}
Typical applicationsArranging items in a line, setting passwords, assigning rolesSelecting members for a committee, lottery draws, hand of cards
Value relationAlways greater than or equal to the corresponding combination for same nn and rrSmaller or equal

When you encounter a problem that involves picking items, ask yourself: “Does the order of selection affect the outcome?” If yes, use the nPr calculation; if no, use the nCr calculation.

This calculator not only returns the final count but can also illustrate the step‑by‑step reasoning behind each computation. Whether you are a student studying combinatorics or a professional dealing with probability, the Permutation Calculator and Combination Calculator functionality saves time and reduces errors.

All results are positive integers for any valid input where n≥r≥0n \ge r \ge 0. The tool also handles large numbers efficiently, making it suitable for real‑world scenarios.

FAQ

1. How do I calculate the number of permutations?

Use the permutation formula: nPr = n! / (n-r)!. Determine n (total objects) and r (sample size), compute the factorials, and divide.

2. What is the difference between nPr and nCr?

nPr (permutation) counts ordered arrangements where sequence matters; nCr (combination) counts unordered selections where order is irrelevant. For the same n and r, nPr is always greater than or equal to nCr.

3. Can I use the same formula for both permutations and combinations?

No. The permutation formula divides by (n-r)! only, while the combination formula also divides by r!. The extra division by r! in combinations accounts for the fact that order does not matter.

4. What does factorial (n!) mean?

Factorial (n!) is the product of all positive integers from 1 to n. For example, 5! = 5 × 4 × 3 × 2 × 1 = 120. By definition, 0! equals 1.

5. When should I use a permutation instead of a combination?

Use permutations when the order of selection is important, such as ranking winners 1st, 2nd, 3rd. Use combinations when order does not matter, like forming a committee or selecting lottery numbers.

How to Use

  1. Enter the total number of objects (n) in the first input field.
  2. Enter the sample size (r) - the number of objects to arrange or select.
  3. View both permutations and combinations calculated automatically as you type.