Skip to content

Permutation & Combination Calculator

Work out nPr and nCr exactly, with the formula and the working shown.

How it works

Use permutations when the order of the chosen items matters (a podium, a PIN without repeats) and combinations when it does not (a committee, a hand of cards). The combination is the permutation divided by r!, the number of ways to reorder the r chosen items.

nPr = n! / (n − r)! = n × (n − 1) × … × (n − r + 1) nCr = n! / (r! × (n − r)!) = nPr / r!

Example

Choosing 3 from 10 items: 10P3 = 10 × 9 × 8 = 720. Dividing by 3! = 6 gives 10C3 = 720 / 6 = 120.

Common mistakes

  • Using permutations when order does not matter. Picking a team of 3 from 10 people is 120 teams, not 720.
  • Forgetting that items are not repeated. A 3-digit code with digits that may repeat is 10³ = 1,000, which is neither nPr nor nCr.
  • Typing r larger than n. You cannot choose 5 items from 3, so the tool asks for r ≤ n instead of returning 0.

About this calculator

Enter the total number of items n and the number you pick, r. The calculator returns nPr, the number of ordered arrangements, and nCr, the number of selections where order does not matter. Each item can be used at most once.

Results are exact whole numbers: the product n × (n − 1) × … × (n − r + 1) is multiplied out directly rather than through full factorials. n is limited to 5,000 to keep the page responsive. Answers longer than 25 digits are shown in scientific notation with the digit count, and a button copies the full integer.

Frequently asked questions

What is the difference between a permutation and a combination?

A permutation counts arrangements, so ABC and CBA are different. A combination counts selections, so ABC and CBA are the same group. For the same n and r, nPr is always r! times larger than nCr.

What are 0! and nC0?

0! is 1, and choosing 0 items from n can be done in exactly one way, so nC0 = 1 and nP0 = 1. nCn is also 1, and nPn = n!.

What does nCr = nC(n − r) mean?

Choosing r items to keep is the same as choosing the other n − r items to leave out, so both counts are equal. 10C3 and 10C7 are both 120. The breakdown shows this symmetry for your numbers.

Why is n limited to 5,000?

5000! already has 16,326 digits. Past that the page would start to slow down on phones, so the tool asks for n up to 5,000. Within the limit every digit is exact.

How are very large answers shown?

Up to 25 digits the full number is shown with digit grouping. Longer answers appear as a rounded scientific-notation figure with 6 significant digits and the digit count, and 'Copy full number' puts every digit on the clipboard.