Combination Calculator (nCr and nPr)

This combination calculator works out nCr, the number of ways to choose r items from n when order does not matter. It also gives permutations (nPr, where order matters) and both counts with repetition, with the working shown.

Checks on your data

  • Ask whether swapping two chosen items gives a different outcome. If yes, order matters (permutation); if no, it does not (combination). Also decide whether the same item can be chosen more than once. Repetition allowed? →

Results

Combinations C(n, r)
120
Permutations P(n, r)
720
Orderings of each group (r!)
6
P(n, r) = C(n, r) × r!
Total subsets of all sizes (2ⁿ)
1,024
Chance a random subset has exactly 3 items
0.117188
Number of ways to choose k items from 10 (row 10 of Pascal's triangle)
01002000: 1011: 101102: 452453: 12031204: 21042105: 25252526: 21062107: 12071208: 458459: 1091010: 1101
Combinations and permutations for n = 10
rC(n, r)P(n, r)
011
11010
24590
3120720
42105,040
525230,240
6210151,200
7120604,800
8451,814,400
9103,628,800
1013,628,800
Show step-by-step solution
  1. Combinations: C(10, 3) = 10! ÷ (3! × 7!) = 10 × 9 × 8 ÷ 3 × 2 × 1 = 120.
  2. Permutations: P(10, 3) = 10! ÷ 7! = 10 × 9 × 8 = 720.
  3. Check: order matters for permutations, not for combinations, so P = C × r! = 120 × 6 = 720.
Combinationn! ÷ (r!(n − r)!)
Permutationn! ÷ (n − r)!
Order matters?Permutation yes, combination no
ExactBig-integer arithmetic

What Is Combinations and Permutations?

A combination is a selection of r items from a set of n where the order of selection is irrelevant: choosing a committee of 3 from 10 people is one combination whichever order you name them in. The count is written nCr, C(n, r) or "n choose r".

If order does matter, as with a podium finish or a password, the count is a permutation (nPr). Use the options above to switch between combinations and permutations, with or without repetition. The decision guide below explains which one a problem needs, and the examples show how nCr feeds into probability questions.

You will also find the formula for each case, a table of variables and a Pascal's triangle chart that shows where the values of C(n, r) come from.

How to Use the Combinations and Permutations Calculator

  1. Enter n, the total number of items to choose from, and r, the number you are choosing.
  2. Leave repetition off if each item can be used only once, such as dealing cards. Turn it on if items can be picked again, such as choosing ice-cream scoops from a fixed set of flavours.
  3. Read nCr and nPr in the results, and open the step-by-step solution to see the formula filled in.

Combinations and Permutations Formula

Combinations (no repetition)

C(n,r)=(nr)=n!r! (n−r)!C(n,r)=\binom{n}{r}=\frac{n!}{r!\,(n-r)!}

Permutations (no repetition)

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

Combinations with repetition

(n+r−1r)\binom{n+r-1}{r}

Permutations with repetition

nrn^{r}
Combination or permutation?
Question to askCombinationPermutation
Does order matter?NoYes
Typical examplesLottery numbers, committees, card handsRace finishes, passwords, seating plans
Formulan! ÷ (r! (n − r)!)n! ÷ (n − r)!
Relative sizeSmallerLarger by a factor of r!

Combinations and Permutations Variables Explained

SymbolMeaningNotes
nTotal number of items to choose fromWhole number, n ≥ 0
rNumber of items chosenWithout repetition, 0 ≤ r ≤ n
n!n factorialn × (n − 1) × … × 1, with 0! = 1
nCrCombinations (order ignored)n! ÷ (r! (n − r)!)
nPrPermutations (order counted)n! ÷ (n − r)!

Combinations and Permutations Worked Example

Using the example values (press “Load example” above to try them):

  1. Combinations: C(10, 3) = 10! ÷ (3! × 7!) = 10 × 9 × 8 ÷ 3 × 2 × 1 = 120.
  2. Permutations: P(10, 3) = 10! ÷ 7! = 10 × 9 × 8 = 720.
  3. Check: order matters for permutations, not for combinations, so P = C × r! = 120 × 6 = 720.

Result: Combinations C(n, r) = 120; Permutations P(n, r) = 720.

Combination or permutation? A decision guide

Ask yourself: if I swap two chosen items, do I get a different outcome? If yes, order matters and you want permutations. If no, you want combinations. A second question decides repetition: can the same item be chosen more than once?

Four counting cases
Order matters?Repetition allowed?NameFormulaExample
NoNoCombinationn! ÷ (r!(n − r)!)Choosing 3 team members from 10
YesNoPermutationn! ÷ (n − r)!Gold, silver and bronze from 10 runners
NoYesCombination with repetition(n + r − 1)! ÷ (r!(n − 1)!)3 scoops from 5 flavours, repeats allowed
YesYesPermutation with repetitionnʳ4-digit PIN (10⁴ = 10,000)

Worked examples

  • Poker hands: C(52, 5) = 2,598,960 five-card hands.
  • Lottery 6 from 49: C(49, 6) = 13,983,816, so one ticket wins with probability 1 in 13,983,816.
  • Committee of 3 from 10 people: C(10, 3) = 120; if the three hold different offices (president, secretary, treasurer) it is P(10, 3) = 720.
  • Seating 5 people in 5 chairs: P(5, 5) = 5! = 120.
  • Pizza with 3 toppings from 8, no repeats: C(8, 3) = 56.

Pascal’s triangle and symmetry

The bar chart shows row n of Pascal’s triangle. It is symmetric because C(n, r) = C(n, n − r), and each entry equals the sum of the two above it: C(n, r) = C(n − 1, r − 1) + C(n − 1, r). The row total is 2ⁿ, the number of subsets of an n-item set, and it is shown in the results.

Using combinations in probability

Probability by counting is favourable outcomes divided by total outcomes. For example, the chance of being dealt exactly 4 hearts in a 5-card hand needs C(13, 4) × C(39, 1) ÷ C(52, 5). The hypergeometric and binomial distributions are built on exactly these counts.

Where Combinations and Permutations Is Used

Committees and teams

Counting the ways to pick a group from a larger pool when roles are identical.

Probability problems

Counting favourable outcomes and total outcomes when every selection is equally likely.

Card hands and lotteries

Counting hands or tickets where the order of the cards or numbers is irrelevant.

Binomial coefficients

Finding the coefficients in a binomial expansion, which are the entries of Pascal's triangle.

Common Combinations and Permutations Mistakes to Avoid

  • Using permutations when order does not matter, which overcounts by r!.
  • Forgetting that r cannot exceed n without repetition.
  • Mixing up “at least” with “exactly” in probability questions.
  • Using rounded factorials; this calculator uses exact integers.
  • C(n, r) = C(n, n − r): choosing r items to take is the same as choosing n − r items to leave.
  • Permutations are always at least as large as combinations, because each group of r items can be ordered in r! ways.
  • Probability problems often use combinations to count favourable outcomes and total outcomes, then divide.

Combinations and Permutations Terms and Definitions

Factorial (n!)
The product of all positive integers up to n; 0! = 1.
Combination
An unordered selection of r items from n.
Permutation
An ordered arrangement of r items from n.
Binomial coefficient
Another name for C(n, r), written “n choose r”.
Pascal’s triangle
A triangle of binomial coefficients where each number is the sum of the two above it.

Combinations and Permutations FAQs

How do I calculate nCr by hand?

Multiply r consecutive numbers starting at n going down, then divide by r!. For C(10, 3): (10 × 9 × 8) ÷ (3 × 2 × 1) = 120.

What is the largest n this calculator handles?

Up to 1000 with exact big-integer results, which can run to hundreds of digits.

Why is C(n, 0) equal to 1?

There is exactly one way to choose nothing: the empty selection.

What is the difference between nCr and nPr?

nCr ignores order and nPr counts order. nPr = nCr × r!.

How many ways can 5 people be arranged in a row?

5! = 120 (that is P(5, 5)).

How is C(n, r) related to the binomial theorem?

The coefficients in the expansion of (a + b)ⁿ are C(n, 0), C(n, 1), ..., C(n, n), which is why they are called binomial coefficients.

Do combinations apply to the lottery?

Yes. The order the balls are drawn does not matter, so the number of possible tickets is a combination.

What is nCr?

nCr, also written C(n, r) or "n choose r", is the number of ways to choose r items from n when the order of selection does not matter.

What is the difference between nCr and nPr?

nPr counts ordered arrangements and nCr counts unordered groups. nPr = nCr × r!.

What is 0! and C(n, 0)?

0! is defined as 1, so C(n, 0) = 1 and C(n, n) = 1: there is exactly one way to choose nothing and one way to choose everything.

How many 5-card poker hands are there?

C(52, 5) = 2,598,960 distinct hands from a standard 52-card deck.

When do I use repetition?

Use it when the same item can be chosen more than once, for example picking 3 scoops from 5 flavours where you can repeat a flavour.

Related calculators

nCr Calculator: Combinations C(n, r) with Steps, Pascal’s Triangle and Formula

Calculate nCr, the number of ways to choose r items from n when order does not matter, with exact big-number arithmetic and full working.

nPr Calculator: Permutations P(n, r) with Steps, Factorials and Circular Arrangements

Count ordered arrangements: how many ways can r items be picked from n and arranged in order? Exact answers with the working shown.

Combinations with Repetition Calculator (Multichoose, Stars and Bars)

Count the ways to choose r items from n types when the same type can be picked more than once and order does not matter, with the stars-and-bars working.

Binomial Probability Calculator with Steps (Exact, Cumulative, Mean and SD)

Calculate exact and cumulative binomial probabilities, with every step of the formula shown and the distribution plotted.

Birthday Paradox Calculator: Shared Birthday Probability and Group Size

Discover how likely it is that two people in a group share a birthday, and how many people you need for any target probability. It works for any number of days, not only 365.

Probability Calculator: Chance, Odds, At Least Once and Exactly k Times

Find the chance of an event, convert it to odds, and see what happens over repeated tries: at least once, exactly k times and how many tries you need.

4 Event Probability Calculator: All, None, At Least One, Exactly k

Work out the probability that all four, none, at least one, or exactly one, two or three of four independent events happen.

Last updated 2026-11-09. See our disclaimer.