Skip to content
Omnikalc

Combinations and permutations calculator: nCr and nPr

Count the ways to choose or arrange r items among n, with or without repetition, and the factorial of n.

Updated on
Your inputs

Value out of range

Value out of range

Results

Combinations nCr (order does not matter)

120

Permutations nPr (order matters)

720

Combinations with repetition
220
Permutations with repetition (n^r)
1,000
n! (n factorial)
3,628,800
Chance of one given combination
0.8333%

Other values of r for the same n

Combinations nCr (order does not matter)Permutations nPr (order matters)
r = 1 current1010
r = 2 current4590
r = 3 current120720
r = 4 current2105,040
r = 5 current25230,240
r = 6 current210151,200

Counting choices

How many ways are there to pick 3 people from 10? To arrange them on a podium? To set a 4-digit code? These questions belong to combinatorics, and they come down to two ideas: whether order matters and whether items can be repeated. This calculator gives all four counts at once, plus the factorial of n.

The formulas

  • Combinations (order ignored): nCr = n! ÷ (r! (n − r)!)
  • Permutations (order matters): nPr = n! ÷ (n − r)!
  • Combinations with repetition: (n + r − 1)C r
  • Permutations with repetition: nʳ
  • Factorial: n! = n × (n − 1) × … × 2 × 1, with 0! = 1

Very large results are shown in scientific notation, such as 3.04 × 10⁶⁴ for 50!.

Worked example

A club of 10 members picks 3 people.

  1. To form a committee, order does not matter: 10C3 = 3,628,800 ÷ (6 × 5,040) = 120.
  2. To elect a president, a treasurer and a secretary, order matters: 10P3 = 10 × 9 × 8 = 720.
  3. If one person may hold several roles, there are 10³ = 1,000 possibilities.
  4. Any single committee has a 1 in 120 chance, or 0.83%, of being drawn at random.

Which formula to use

Order matters? Repetition allowed? Example Formula
No No lottery numbers, a committee nCr
Yes No a race podium, seat assignments nPr
No Yes choosing 3 scoops from 10 flavors (n + r − 1)C r
Yes Yes a PIN code, a combination lock nʳ

Lottery odds

The Powerball jackpot requires 5 white balls out of 69, in any order, plus 1 red ball out of 26. That is 69C5 × 26 = 11,238,513 × 26 = 292,201,338 combinations, so a single ticket has a 1 in 292 million chance.

Factorials grow fast

n n!
5 120
10 3,628,800
13 6,227,020,800
20 about 2.43 × 10¹⁸
52 about 8.07 × 10⁶⁷

A shuffled deck of 52 cards has 52! possible orders, so almost certainly no two well-shuffled decks in history have ever been in the same order.

Symmetry

Choosing r items to keep is the same as choosing n − r items to leave out, so nCr = nC(n − r): there are as many ways to pick 7 people out of 10 as to pick 3. The comparison table shows the counts rising, then falling symmetrically.

Frequently asked questions

What is the difference between combinations and permutations?

Combinations ignore order (choosing 3 people for a committee); permutations count order (awarding gold, silver and bronze). With 10 people: 120 combinations, 720 permutations.

What is the formula for nCr?

nCr = n! ÷ (r! (n − r)!). For 10 choose 3: 3,628,800 ÷ (6 × 5,040) = 120.

What are the odds of winning the Powerball jackpot?

1 in 292,201,338: 69 choose 5 for the white balls (11,238,513) times 26 for the red Powerball.

What does with repetition mean?

Items can be picked more than once, like digits in a PIN code. A 4-digit PIN has 10⁴ = 10,000 possibilities.

Was this calculator helpful?

Thanks for your feedback!

Results are estimates provided for information purposes. They do not replace professional advice.