Permutation & Combination Calculator
Calculate permutations (nPr) and combinations (nCr).
What this calculator does
This tool counts how many ways you can pick items from a group. It gives two answers. The permutation counts every different order. The combination counts each group once, no matter the order.
Use it for race results, seating plans, team line-ups, committees and lottery-style draws. Pick the answer that fits your question.
A worked example
A high school in Surrey has 25 students running for student council, and 3 of them will be chosen.
If the three spots are president, vice-president and treasurer, order matters, because each spot is a different job. There are 13,800 possible line-ups. If the winners simply form an equal committee, order does not matter, and there are 2,300 possible groups. The permutation is bigger because every committee of three can be split into the three jobs in several different ways.
How we work it out
A factorial, written n!, multiplies every whole number from 1 up to n. So 5! is 5 × 4 × 3 × 2 × 1.
The permutation is n! divided by (n minus r)!. The combination takes that answer and also divides by r!, because each group of r items can be arranged in r! orders and we only want to count it once.
Both answers assume each item can be picked only once. Both must be whole numbers. The total, n, can be up to 170, and r cannot be more than n.
Order or no order
Picture swapping two of the chosen items. If that gives a different result, use the permutation. If it gives the same result, use the combination.
- Gold, silver and bronze in a race: the same three runners in a different order is a different result. Permutation.
- Three toppings on a pizza: mushrooms, peppers and olives make the same pizza in any order. Combination.
- A draw where you pick 6 numbers out of 49: the order the balls come out does not change your ticket. Combination.
- Choosing a captain and an assistant captain for a hockey team: the two jobs differ. Permutation.
When this tool is not the right fit
Both formulas assume each item is used at most once. A four-digit PIN can repeat digits, such as 1-1-2-2. For choices with repeats where order matters, multiply the number of options by itself once for each position. A PIN has 10 options for each of its 4 positions, so you multiply 10 × 10 × 10 × 10. The exponent calculator does that in one step.
The tool also treats every item as different from the others. If some items are identical, like the repeated letters in a word such as BANANA, the real number of different orders is smaller than the permutation shown.
Very large answers
These counts grow very fast. Adding one more item to choose from can multiply the answer many times over. The largest n the tool accepts is 170. Even at that size, every digit shown is exact, so you can copy a long answer straight into homework or a report.
Big counts are also a useful reality check. When the number of possible groups runs into the millions, guessing the right one by chance is extremely unlikely.
What this does not include
- Items that can repeat, such as digits in a PIN
- Every item is treated as different. Identical items are not grouped
- n is limited to 170, and both inputs must be whole numbers
- Circular arrangements, such as seats around a round table
Common questions
Which one do I need?
A lock code cares about order. 1-2-3 is not the same as 3-2-1. A lottery draw does not. The balls can come out in any order and your ticket still wins. If swapping two chosen items changes the outcome, you need the permutation. If not, use the combination.
Why is the combination smaller than the permutation?
The permutation counts every order of the same group as a separate result. The combination counts the group once. Each group of r items can be put in order in r! ways, so the permutation is r! times bigger. The two match only when you choose 0 or 1 item.
What is a factorial?
It is the product of every whole number from 1 up to a given number. Four factorial, written 4!, is 4 × 3 × 2 × 1. By definition 0! is 1, which is why choosing zero items gives exactly one way: choose nothing.
How many ways can a group line up?
Enter the number of people as both n and r. The permutation is then the number of different line-ups. For a family photo or a row of seats, that is the answer you want. Seats around a round table are a different problem, because moving everyone one seat over gives the same arrangement.
Is a combination lock really a combination?
Not in the maths sense. The order of the numbers matters, so it is closer to a permutation. Many locks also let a number repeat, such as 7-7-2, which this tool does not allow. For codes with repeats, multiply the number of choices for each position together.
Sources
- §26.3 Lattice Paths: Binomial Coefficients, NIST Digital Library of Mathematical Functions
Last reviewed October 18, 2026. How we check our numbers.
This is an estimate to help you plan. It is not financial, medical, or legal advice. Talk to a professional before you make a big decision.