Home
Calcolia

Combinations and permutations calculator

The question is always whether order matters. If it does, you want permutations; if it does not, combinations. Both are shown, with and without repetition.

Combinations C(n,r)13,983,816
Permutations P(n,r)
10,068,347,520
Ordered, with repetition
13,841,287,201
Unordered, with repetition
25,827,165
Odds of one specific combination
1 : 13,983,816
n!
—
C(n, n−r), which is equal
13,983,816

The formula

P(n,r) = n! / (n−r)!. C(n,r) = n! / (r!(n−r)!). With repetition: nʳ when order matters, and C(n+r−1, r) when it does not. Combinations are computed multiplicatively, so large values stay exact where a ratio of factorials would lose precision.

Worked example

Choosing 6 numbers from 49 gives 13,983,816 combinations — the odds of a jackpot on a 6-from-49 lottery. If order mattered it would be 10,068,347,520.

How to use it

  1. 1Order matters for a podium, a password or a race result: use permutations.
  2. 2Order does not matter for a lottery, a committee or a hand of cards: use combinations.
  3. 3Repetition means an item can be chosen more than once, as with a 4-digit PIN where digits can repeat.

Questions people ask

Why is C(49,6) the lottery odds?

Because a ticket is an unordered set of six numbers and every set is equally likely. One in 13,983,816 is the chance of matching all six.

Why does C(n,r) equal C(n, n−r)?

Choosing which 6 of 49 to include is the same act as choosing which 43 to leave out. The two counts have to agree.

Last reviewed: 2026-10-20