🎲Permutations & Combinations Calculator

Calculate permutations P(n,r) and combinations C(n,r) for any values of n and r. Includes factorials and probability applications.

Prefer to skip the form? Scroll down and Ask AI Instead. Just describe your situation and let AI handle the math for you in seconds.

Combinations C(n,r)

120

P(10,3) = 720 arrangements (order matters). C(10,3) = 120 selections (order does not matter). Each combination corresponds to 6 permutations (3! arrangements).

Permutations P(n,r)720
Combinations C(n,r)120
Ratio P/C = r!6
n! (n factorial)3,628,800
r! (r factorial)6
(n-r)! factorial5,040

Counting Results

720

120

3,628,800

6

Advertisement

728 × 90

✦ Ask AI Instead

Permutations and Combinations Calculator: nPr and nCr Explained

This permutations and combinations calculator computes nPr (permutations) and nCr (combinations) for any values of n and r. The central question in every counting problem is whether order matters. When it does, count permutations. When it does not, count combinations. Getting this distinction right is the key to solving probability, statistics, and combinatorics problems accurately.

How to Calculate Permutations vs. Combinations

Both formulas use the factorial function. The factorial of n (written n!) is the product of all positive integers from 1 to n. For example, 5! = 5 x 4 x 3 x 2 x 1 = 120. Factorials grow rapidly: 10! = 3,628,800 and 20! is approximately 2.4 x 10^18.

  • Permutations (nPr): P(n, r) = n! / (n - r)!. Use this when you are choosing r items from n and the order of the chosen items matters. Selecting the same items in a different sequence counts as a different result.
  • Combinations (nCr): C(n, r) = n! / (r! x (n - r)!). Use this when you are choosing r items from n and the order does not matter. Any arrangement of the same selected items counts as one result.

The relationship between them is: P(n, r) = C(n, r) x r!. Every combination of r items can be arranged in r! different orders, so multiplying the combination count by r! gives the permutation count.

What Are Permutations? When Order Matters

A permutation is an ordered arrangement. P(n, r) counts all distinct ordered sequences of r items drawn from a pool of n. If you have 8 runners in a race and want to assign gold, silver, and bronze medals, each possible podium is a different permutation even if the same three runners appear. P(8, 3) = 8! / 5! = 8 x 7 x 6 = 336 possible medal orderings.

Order matters whenever position, rank, or sequence makes two outcomes distinct:

  • Creating a PIN or password (1234 and 4321 are different codes).
  • Assigning ranked prizes: 1st, 2nd, and 3rd place represent different outcomes for the same three finishers.
  • Scheduling ordered tasks where sequence changes the result.
  • Determining the batting order in a sports lineup.

Permutation Calculator with Repetition

The standard formula P(n, r) = n! / (n - r)! assumes no item is reused. When repetition is allowed (for example, each digit in a PIN can appear multiple times), the count is simply n^r. A 4-digit PIN from digits 0 through 9 with repetition allowed has 10^4 = 10,000 possibilities. Without repetition it would be P(10, 4) = 10 x 9 x 8 x 7 = 5,040.

What Are Combinations? When Order Does Not Matter

A combination is an unordered selection. C(n, r) counts the number of distinct groups of r items you can choose from n, where rearranging the chosen items does not create a new outcome. Selecting a 5-card poker hand from 52 cards is a combination problem: the hand {A, K, Q, J, 10} is the same hand regardless of the order the cards were dealt. C(52, 5) = 2,598,960 possible distinct hands.

Order does not matter when membership in a group is what you are counting:

  • Choosing a committee or a team (no assigned roles).
  • Selecting pizza toppings (the pizza is the same regardless of which topping goes on first).
  • Picking lottery numbers where the winning condition depends only on which numbers were drawn.
  • Choosing which questions to answer on an exam.

Combination Calculator for Lottery Numbers

Lottery problems are a classic application of combinations because winning depends entirely on which numbers match, not the order they were drawn. For a lottery that asks you to pick 6 numbers from 1 to 49, the total number of possible tickets is C(49, 6) = 13,983,816. The probability of holding the single winning ticket is 1 in 13,983,816, roughly 0.0000072 percent. Adding a bonus ball drawn from the remaining 43 numbers multiplies the sample space by 43, reaching over 600 million possibilities in some formats.

How Permutations and Combinations Apply to Probability

Probability calculations frequently use these counting techniques to determine the size of the sample space (all possible outcomes) and the number of favorable outcomes. The probability of an event equals the number of favorable outcomes divided by the total number of equally likely outcomes.

Example: what is the probability of being dealt a three-of-a-kind in a 5-card poker hand? Favorable outcomes: choose 1 rank from 13 for the triple (C(13,1)), choose 3 suits from 4 (C(4,3)), choose 2 different ranks from the remaining 12 for the pair of singletons (C(12,2)), and choose 1 suit for each singleton (4 x 4). Total favorable = 13 x 4 x 66 x 16 = 54,912. Total possible hands = C(52,5) = 2,598,960. Probability = 54,912 / 2,598,960 approximately 2.11 percent.

Pascal's Triangle and the Counting Principle

Combination values form Pascal's triangle, where the entry in row n at position r is C(n, r). The identity C(n, r) = C(n-1, r-1) + C(n-1, r) shows that each entry is the sum of the two directly above it. Row 5 reads: 1, 5, 10, 10, 5, 1, corresponding to C(5,0) through C(5,5). Pascal's triangle is central to the binomial theorem, which expands (a + b)^n using combination coefficients as the multipliers for each term.

Frequently Asked Questions

What is the difference between a permutation and a combination?

A permutation is an ordered arrangement where the sequence matters. A combination is an unordered selection where only the membership of the group matters. Assigning gold, silver, and bronze medals to 3 runners chosen from 10 is a permutation because the order of finish is distinct: P(10,3) = 720 outcomes. Choosing a 3-person committee from 10 people is a combination because the roles are equal: C(10,3) = 120 outcomes. The ratio between them is r! = 3! = 6, the number of ways to arrange 3 items.

How do I calculate nCr (combinations)?

Use the formula C(n, r) = n! / (r! x (n - r)!). For C(7, 2): C(7,2) = 7! / (2! x 5!) = (7 x 6) / (2 x 1) = 42 / 2 = 21. A useful shortcut: cancel as much as possible before multiplying. The top of the fraction is n x (n-1) x ... x (n-r+1), which has exactly r terms, divided by r!. This avoids computing large factorials in full.

How do I know when to use permutations vs. combinations?

Ask yourself: if I swap two chosen items, do I get a different result? If yes, use permutations because order matters. If no, use combinations because order does not matter. Assigning president and vice-president from a group is a permutation (swapping the roles creates a different outcome). Choosing two co-leads from a group is a combination (swapping them gives the same pair). When in doubt, write out a small example and count the distinct outcomes manually to check which formula matches.

How are permutations used in probability?

Permutations define the size of sample spaces for ordered outcomes. The probability of a specific ordered sequence equals 1 divided by the total number of permutations. For example, the probability that a randomly shuffled 4-card hand from a standard deck appears in one specific order is 1 / P(52, 4) = 1 / 6,497,400. Permutations also appear in calculating the probability that all chosen items are distinct, such as the chance that no two people in a group share a birthday.