Permutation and Combination Calculator: nPr, nCr and n! with Working

Enter n and r to get the number of permutations (nPr), the number of combinations (nCr) and n! with the full working. The answers are exact even for very large values, such as 100C50 or 1000!. It follows the formulas of the Class 11 Maths chapter Permutations and Combinations and is useful for checking textbook answers.

Whole number from 0 to 1000
Whole number, 0 ≤ r ≤ n

Factorial

The product of the first n natural numbers is called n factorial, written n!.

n! = n × (n − 1) × (n − 2) × … × 3 × 2 × 1, and by definition 0! = 1.

So 5! = 5 × 4 × 3 × 2 × 1 = 120. Factorials grow very fast: 10! is already 36,28,800.

Permutations: when order matters

A permutation is an arrangement. Choosing a captain and a vice-captain, making 3-digit numbers, or seating people in a row are permutations, because changing the order gives a different result. The number of permutations of n different objects taken r at a time (no repetition) is:

nPr = n! ÷ (n − r)!, where 0 ≤ r ≤ n

A quick way to work it out: start from n and multiply r numbers going down. For example, 7P3 = 7 × 6 × 5 = 210. This comes from the fundamental principle of counting: the first place can be filled in n ways, the second in n − 1 ways, and so on.

Combinations: when order does not matter

A combination is a selection. Choosing a team of 3 from 10 players, or picking 5 cards from a pack, are combinations, because the same people or cards in a different order are the same selection.

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

Each selection of r objects can be arranged in r! ways, which is why we divide the permutations by r!. Two useful results: nCr = nCn−r and nCr + nCr−1 = n+1Cr.

Worked example

Question: There are 10 students in a group. (a) In how many ways can a president, a secretary and a treasurer be chosen? (b) In how many ways can a committee of 3 be chosen?

(a) The three posts are different, so order matters. This is a permutation with n = 10, r = 3.
10P3 = 10! ÷ 7! = 10 × 9 × 8 = 720 ways.

(b) In a committee all three members are equal, so order does not matter. This is a combination.
10C3 = 10P3 ÷ 3! = 720 ÷ 6 = 120 ways.

Check: 10C3 = 10C7 = 120, and 120 × 3! = 720 = 10P3.

Common mistakes

  • Using nCr when the order matters (posts, ranks, digits of a number, seating) or nPr when it does not (teams, committees, groups of cards). Ask yourself: if I swap two of the chosen items, do I get something new?
  • Taking 0! as 0. It is 1, which is why nC0 = nCn = 1 and nPn = n!.
  • Writing n!/(n − r)! as (n − r) or cancelling wrongly. Cancel the common factorial: 10!/7! = 10 × 9 × 8, not 10/7.
  • Using these formulas when repetition is allowed. If each of r places can be filled by any of n objects again and again, the number of ways is nr, not nPr.
  • Forgetting that nPr and nCr need r ≤ n. You cannot choose 7 things from 5.

Practise with

The calculator works for whole numbers 0 ≤ r ≤ n ≤ 1000 and gives exact values. Numbers with more than 60 digits are shown in full in a scrollable box.