Skip to content
Saha Hesap

Combination, Permutation and Factorial Calculator

n!, P(n, r), C(n, r), permutations of repeated items, combinations with repetition and circular permutations. Exact to the last digit, with the expansion shown.

Permutation or combination?

Both answer the question "in how many ways" and the difference is whether order matters. Use a permutation when it does and a combination when it does not. Choosing a chair, a deputy and a treasurer from 10 people is a permutation: P(10, 3) = 10 · 9 · 8 = 720. Choosing a committee of 3 from the same 10 people is a combination: C(10, 3) = 720 / 6 = 120.

Formulas

  • Factorial: n! = n · (n − 1) · … · 2 · 1 and 0! = 1.
  • Permutation: P(n, r) = n! / (n − r)!
  • Combination: C(n, r) = n! / (r! · (n − r)!)
  • Repeated items: when some of the n objects are identical, n! / (n₁! · n₂! · …)
  • Combination with repetition: choosing r items from n kinds when a kind may be picked again, C(n + r − 1, r)
  • Circular permutation: n people can sit at a round table in (n − 1)! ways.

Examples

The number of 5 card hands from a 52 card deck is C(52, 5) = 2 598 960. The letters of MISSISSIPPI can be arranged in 11! / (4! · 4! · 2!) = 34 650 different ways, because I and S appear four times each and P twice. Five people can sit at a round table in 4! = 24 ways.

Why is the result so long?

Factorials grow very quickly: 20! has nineteen digits and 100! has 158. Pocket calculators round such numbers. This tool uses whole number arithmetic and gives every digit, together with the digit count and scientific notation.

Limits

n can be at most 10 000. n and r must be whole numbers, and factorials of fractional values (the gamma function) are outside the scope of this tool. It counts arrangements only and does not compute probabilities.

Related calculators

Found a mistake or something missing?

If a value looks wrong, a size is missing or you need a feature, write to us and we will fix it.

Send an email