Permutation and Combination Calculator

Permutations count ordered selections, P(n, r) = n! ÷ (n − r)!, and combinations count unordered ones, C(n, r) = n! ÷ (r! × (n − r)!). Choosing 3 of 10 people gives C(10, 3) = 120 groups but P(10, 3) = 720 ordered line-ups. A 5-card hand from 52 cards has C(52, 5) = 2,598,960 possibilities.

Inputs

Result
–

Results are calculated in your browser for convenience. Double-check important figures before relying on them.

Permutation or combination?

Ask whether order matters. Permutations count different orders as different results: the gold, silver and bronze places for 10 runners can be filled in 10 × 9 × 8 = 720 ways. Combinations do not care about order: choosing 3 runners from 10 for a relay team gives 720 ÷ 6 = 120 teams, because each team of 3 can be ordered 3! = 6 ways.

P(n, r) = n! ÷ (n − r)! C(n, r) = n! ÷ (r! × (n − r)!) n! = n × (n − 1) × … × 2 × 1

With repetition

TypeFormulaExample n = 10, r = 3
Permutations with repetitionnʳ1,000
Combinations with repetitionC(n + r − 1, r)220

A 3-digit PIN (digits can repeat, order matters) has 10³ = 1,000 possibilities. Choosing 3 scoops of ice cream from 10 flavours when you can repeat a flavour and order does not matter gives 220.

Where counting is used

  • Lottery odds: choosing 6 numbers from 49 gives C(49, 6) = 13,983,816 combinations.
  • Passwords, PINs and licence plates.
  • Committees, team selection and seating plans.
  • The basis of the binomial probability formula.

Combine with the probability calculator and the random number generator. The results are exact, even for large inputs.

Complete guide to the Permutation and Combination Calculator

How to use the Permutation and Combination Calculator, step by step

  1. Enter n and r.
  2. Read nCr and nPr.
  3. Check the repetition versions if items can repeat.
  4. Use factorials for full arrangements.

Common mistakes to avoid

  • Using permutations when order does not matter.
  • Letting r exceed n.
  • Forgetting repetition rules.

Key terms explained

Factorial
The product of whole numbers down to 1.
Permutation
An ordered arrangement.
Combination
An unordered selection.
Repetition
Allowing items to be chosen more than once.

Frequently asked questions

What is the difference between a permutation and a combination?

In a permutation the order matters, so ABC and CBA are different. In a combination order does not matter, so they count as one.

What is n factorial?

n! is the product of all whole numbers from 1 to n. For example 5! = 5 × 4 × 3 × 2 × 1 = 120, and by definition 0! = 1.

What does nCr mean?

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

Why is 0! equal to 1?

There is exactly one way to arrange zero items: do nothing. It also keeps formulas such as C(n, 0) = 1 consistent.

How many five-card poker hands are there?

C(52, 5) = 2,598,960 different hands, which is the denominator for most poker probabilities.

How large can n be in this calculator?

Up to 500. The answers are exact whole numbers using big-integer arithmetic, so large results are not rounded.

How do I calculate the chance of winning a lottery?

Divide 1 by the number of combinations. For choosing 6 from 49, the chance is 1 in 13,983,816.

Related calculators

Guides worth reading