Result

Enter n and r.

How to use this calculator

  • Enter n (total items) and r (items chosen).
  • See combinations, permutations, and both with repetition allowed.

Formula

  • Combinations: C(n, r) = n! ÷ (r! (n − r)!)
  • Permutations: P(n, r) = n! ÷ (n − r)!
  • With repetition: nʳ arrangements and C(n + r − 1, r) selections.

Worked example

Poker hands

The number of 5-card hands from a 52-card deck is C(52, 5) = 2,598,960. Choosing 2 of 5 gives 10 combinations and 20 permutations.

Assumptions and limitations

  • Everything runs in your browser; nothing you enter is uploaded or stored.
  • Results are exact; very long numbers are also shown in scientific notation.

Frequently asked questions

When does order matter?

Use permutations for rankings, codes and seating plans; use combinations for teams, lottery numbers and hands of cards.

What if r is larger than n?

Without repetition there are no ways to choose, so nPr and nCr are 0.