Permutation and Combination Calculator (nPr and nCr)

Search Engine Optimization
  1. Home
  2. Math Tools
  3. Permutation and Combination Calculator
Share: Report

Permutation and Combination Calculator

100% free · Runs 100% in your browser · Nothing is uploaded · No signup needed

Did you know? nPr counts arrangements where order matters, and nCr counts selections where it does not. For n = 10 and r = 3, nPr is 720 and nCr is 120, because each selection can be arranged in 6 orders. The result updates live as you type.

Your numbers are processed locally in your browser and are never sent to any server.

Sobre Permutation and Combination Calculator

What Is a Permutation and Combination Calculator?

A permutation and combination calculator works out how many ways you can choose or arrange items from a larger set. Give it two numbers, n for the total number of items and r for how many you pick, and it returns both answers: the number of permutations, written nPr, where the order matters, and the number of combinations, written nCr, where the order does not matter. It also shows every factorial step, so you can follow the working and use it to check your homework.

The difference between the two is simple but important. A permutation counts arrangements: picking a president, a secretary, and a treasurer from ten people gives a different result for every order, because the roles are different. A combination counts selections: picking any three people for a team gives the same team no matter what order you name them in. Permutations always give a bigger number than combinations for the same n and r, because each combination can be arranged in several different orders.

How to Use the Permutation and Combination Calculator

Enter n, the total number of items you are choosing from, and r, the number of items you pick. Then click calculate. The tool shows nPr and nCr side by side, together with the factorial working for each one, so you can see exactly where the numbers come from. If r is larger than n, the tool will tell you that the calculation is not possible, because you cannot pick more items than you have.

Try the example button to load a ready-made pair of values, such as n = 10 and r = 3, and watch the steps appear. Everything is calculated instantly in your browser, and the tool works with the whole numbers you meet in school, exams, and everyday counting problems.

The Formulas: nPr and nCr

Both formulas are built on factorials. The factorial of a number, written with an exclamation mark, is the product of all whole numbers from 1 up to that number. So 5! = 5 x 4 x 3 x 2 x 1 = 120, 4! = 24, 3! = 6, 2! = 2, 1! = 1, and by definition 0! = 1. Factorials grow fast: 10! is already 3,628,800, which is why the calculator shows the steps instead of asking you to multiply long chains by hand.

The permutation formula is nPr = n! / (n - r)!. You take the factorial of the total, and divide by the factorial of the items left over. The combination formula is nCr = n! / (r! x (n - r)!), which is the same as nPr divided by r!, because dividing by r! removes all the repeated orders of the same selection. That is why combinations are always smaller than permutations when r is bigger than 1.

Worked Example: n = 10, r = 3

This is the classic example, and it shows the difference clearly. For permutations, nPr = 10! / (10 - 3)! = 10! / 7!. Instead of writing out all ten factors, cancel 7! from the top and bottom, leaving 10 x 9 x 8 = 720. So there are 720 ways to arrange 3 items chosen from 10 when order matters, for example 720 ways to fill three different offices from ten candidates.

For combinations, nCr = 10! / (3! x 7!) = (10 x 9 x 8) / (3 x 2 x 1) = 720 / 6 = 120. So there are 120 ways to choose any 3 people from 10 when order does not matter, for example 120 possible three-person teams. Notice that 720 divided by 6 equals 120, because each team of 3 can be arranged in 3! = 6 different orders.

More Worked Examples

A smaller example makes the idea easy to check by hand. With n = 5 and r = 2, nPr = 5! / 3! = 5 x 4 = 20, and nCr = 5! / (2! x 3!) = 20 / 2 = 10. You can list all ten pairs from five items, such as A, B, C, D, and E, and confirm there are exactly ten, while the ordered pairs number twenty because each pair can be written in two orders.

With n = 8 and r = 3, nPr = 8! / 5! = 8 x 7 x 6 = 336, and nCr = 336 / 6 = 56. With n = 7 and r = 3, nPr = 7 x 6 x 5 = 210, and nCr = 210 / 6 = 35. With n = 12 and r = 4, nPr = 12 x 11 x 10 x 9 = 11,880, and nCr = 11,880 / 24 = 495, because 4! = 24. These numbers come up often in lottery and card problems, and the calculator reproduces every one of them with the steps shown.

Permutations or Combinations: Which One Do I Need?

  • Use permutations (nPr) when the order matters: race results, passwords, PIN codes, seating plans, and filling different job roles.
  • Use combinations (nCr) when the order does not matter: lottery tickets, card hands, team selections, and choosing committee members.
  • Ask one question: if you swap two chosen items and the result changes, it is a permutation. If the result stays the same, it is a combination.
  • Watch for repetition: these formulas assume each item is used once. If items can repeat, such as digits in a PIN code, the count is different.

A password example shows why the distinction matters. A 4-digit PIN using the digits 0 to 9 with no repeats has 10P4 = 10 x 9 x 8 x 7 = 5,040 possibilities, because the order of the digits matters. A lottery ticket where you pick 6 numbers from 49 is a combination, 49C6 = 13,983,816, because the order the balls are drawn in does not change your ticket. The same two formulas answer both questions.

Where Permutations and Combinations Are Used

These counts appear far beyond the classroom. In probability, the number of favourable combinations divided by the total number of combinations gives the chance of an event, such as being dealt a particular poker hand. In computing, they measure how many passwords or keys an attacker would need to try. In sport, they count possible league outcomes and tournament draws, and in business they count ways to choose project teams or product bundles.

Students meet nPr and nCr in school and university exams, where showing the working earns marks even if the final number is wrong. That is why this tool shows the factorial steps instead of just the answer: you can copy the working into your notes, check it line by line, and understand the method rather than just trusting a number on a screen. For more maths help, try our Scientific Calculator for general calculations, or the Mean Median Mode Calculator for averages and data summaries.

Studying maths or building your first website? FistHost shared hosting starts at just $0.99 per month, and the annual plan includes a free domain name, so you can publish your notes, your portfolio, or your class project online for very little. Get started at FistHost, or pick a domain name at FistHost Domains.

Frequently Asked Questions

What is the difference between nPr and nCr?

nPr counts arrangements where order matters, and nCr counts selections where order does not matter. For n = 10 and r = 3, nPr is 720 and nCr is 120, because each selection of 3 can be arranged in 6 orders, and 720 divided by 6 is 120.

What is 10P3 and 10C3?

10P3 = 720 and 10C3 = 120. The working is 10P3 = 10 x 9 x 8 = 720, and 10C3 = 720 / (3 x 2 x 1) = 720 / 6 = 120.

What is 0! and why does it equal 1?

0! equals 1 by definition. It makes the formulas work when r equals n or r equals 0: for example, nCn = n! / (n! x 0!) = 1, which is correct, because there is exactly one way to choose all n items.

Can r be larger than n?

No. You cannot choose more items than you have, so nPr and nCr are not defined when r is larger than n. The calculator will ask you to enter values with r no larger than n.

Good tools make hard maths simple, and good hosting makes a website simple too. FistHost shared hosting from $0.99 per month, with a free domain on the annual plan, gives you a fast and reliable place to share your work with the world. Visit FistHost to start today, or browse domain names at FistHost Domains.

User Reviews

No reviews yet. Be the first to review this tool!

Write a Review

★★★★★

Captcha

Reviews are protected by captcha and moderated before they appear.


Deal

More Than Just Hosting

Free domain, easy control panel
and room to grow

Grab the Deal
WordPress WordPress Hosting Made Easy One-click installs on fast, · secure servers Launch WordPress