home / Math / permutation and combination calculator

Permutation and Combination Calculator

The Permutation and Combination Calculator is a free online tool for counting arrangements and selections. A permutation counts orderings, a combination counts groupings — and getting the two the wrong way round is the most common error in counting problems.

Modify the values and click the Calculate button to use.

Related: Probability Calculator | Factor Calculator | Statistics Calculator

Order Matters, or It Does Not

This is the entire distinction:

  • Permutation — order matters. Gold, silver and bronze from eight runners.
  • Combination — order does not matter. Six lottery numbers from 49.

P(n, r) = n! / (n − r)!     C(n, r) = n! / (r!(n − r)!)

The only difference is dividing by r! — the number of ways each selected group can be ordered. Permutations always outnumber combinations by exactly that factor.

The Lottery Example

Choosing 6 numbers from 49 gives 13,983,816 combinations — the familiar odds of about 1 in 14 million. As permutations it would be 10,068,347,520, because the draw order would then matter. Lotteries are combinations, which is why the smaller figure applies.

With and Without Repetition

TypeFormulaExample
Permutation without repetitionn! / (n−r)!Podium places from a field of runners
Permutation with repetitionnrA 4-digit PIN: 10⁴ = 10,000
Combination without repetitionn! / (r!(n−r)!)A lottery draw, a committee
Combination with repetition(n+r−1)! / (r!(n−1)!)Choosing 3 scoops from 10 flavours, repeats allowed

Factorials Grow Absurdly Fast

nn!
5120
103,628,800
151.31 × 1012
202.43 × 1018
528.07 × 1067

52! is the number of ways to shuffle a deck of cards. It exceeds the estimated number of atoms in the Milky Way. Any well-shuffled deck has, with near certainty, never existed in that order before.

Symmetry of Combinations

C(n, r) = C(n, n−r). Choosing 6 from 49 is the same count as choosing which 43 to leave out. This symmetry halves the work when computing large binomial coefficients, and it is why Pascal's triangle is symmetric.

Frequently Asked Questions

Why is 0! equal to 1?

Because there is exactly one way to arrange nothing. It also keeps the formulas consistent: C(n, n) = n!/(n!0!) must equal 1.

How do I know which one to use?

Ask whether swapping two chosen items produces a different outcome. If yes it is a permutation; if no it is a combination. A phone number is a permutation; a hand of cards is a combination.

What about circular arrangements?

Seating n people around a round table gives (n−1)! arrangements rather than n!, because rotating everyone by one seat produces the same arrangement.