Combinations and permutations calculator

How many ways to arrange or choose r items from n, with and without order mattering.

Enter your values and press Calculate. Your inputs stay in the address, so you can switch language or share the link.

Formula

nPr = n! ÷ (n − r)! nCr = n! ÷ (r! × (n − r)!)

How it works

A permutation counts arrangements where order matters; a combination counts selections where it does not. Both start from n! (n factorial), the product of every whole number from 1 to n.

Worked example

The same calculation with the default values:

  • Total items (n) 8
  • Items chosen (r) 3
  1. nPr = 8! ÷ (8 − 3)! = 336
  2. nCr = 8! ÷ (3! × (8 − 3)!) = 56

Result: Permutations (nPr): 336 · Combinations (nCr): 56

Permutations count arrangements where order matters, while combinations count selections where order does not - the same n and r values give a very different (always larger for permutations) result depending on which question is actually being asked.

Common mistakes

  • Using the permutation formula when order genuinely doesn't matter (e.g. choosing a committee) or the combination formula when it does (e.g. awarding 1st/2nd/3rd place) - mixing these up gives a result too large or too small by a large factor.
  • Entering r larger than n - you cannot choose or arrange more items than exist in the set; this should be flagged as an invalid input, not silently computed.
  • Forgetting how quickly factorials grow - n! becomes astronomically large for even moderately sized n, which is why these formulas divide out common factors rather than compute full factorials directly.

Related calculators