This permutation combination calculator counts arrangements and selections, including permutations with replacement and password combinations. Enter n and r to get both P(n,r) and C(n,r).
Permutation and Combination Calculator
Enter n and r, choose whether order matters, and get nPr or nCr with the full factorial working shown.
Enter your values
Fill in the fields below — the result appears with every step shown.
Your result will appear here
Enter your values above, then press Calculate — or press Enter in any field.TinyExe · Permutation and Combination Result
Calculated locally in your browser
—
Name
—
Total items n
—
Items chosen r
—
Calculation
—
How this was calculated
What to do next
TinyExe PDF & PNG exports carry the TinyExe logo and tinyexe.com header & footer.
Runs 100% in your browser — your numbers never leave this tab; nothing is uploaded or stored.
The short answer
A permutation counts arrangements where order matters: nPr equals n factorial divided by (n minus r) factorial. A combination counts selections where order does not matter: nCr equals n factorial divided by r factorial times (n minus r) factorial. For n equals 10 and r equals 3, nPr is 720 and nCr is 120.
- nPr = n! / (n-r)!
- nCr = n! / (r! (n-r)!)
- 0! = 1 by definition
Factorials used by this calculator
Reference values for this calculator.
| n | n! | Note |
|---|---|---|
| 5 | 120 | |
| 8 | 40,320 | |
| 10 | 3,628,800 | |
| 12 | 479,001,600 | Largest in many textbook problems |
The formula
The exact formula this calculator uses — every variable in it is explained in the card below.
The formula
Ideas enhancement: one tool with an explicit order-matters switch, showing both factorial values in the steps so the classic nPr-versus-nCr confusion is answered inside the calculation.
Worked examples
Worked examples with the full working shown — try them in the calculator to check.
Example 1
Committee of 3 from 10
n=10, r=3, combinations
| Calculation | Steps |
|---|---|
| nCr = 10! / (3! x (10-3)!) = 3,628,800 / (6 x 5,040) = 120. | Result: 120 combinations. |
Result
Example 2
Podium from 10 runners
n=10, r=3, permutations
| Calculation | Steps |
|---|---|
| nPr = 10! / (10-3)! = 3,628,800 / 5,040 = 720. | Result: 720 permutations. |
Result
Example 3
Choose all 5
n=5, r=5, combinations
| Calculation | Steps |
|---|---|
| nCr = 5! / (5! x (5-5)!) = 120 / (120 x 1) = 1. | Result: 1 combinations. Only one way to take everything. |
Result
How to use this calculator
Step 1
Enter n, the total number of items available.
Step 2
Enter r, how many are chosen or arranged.
Step 3
Pick permutations if order matters (podiums, codes, rankings).
Step 4
Pick combinations if order does not matter (teams, hands, committees).
Step 5
Read the count and check the factorial steps shown.
Frequently asked questions
When do I use permutations instead of combinations?
Use permutations when the arrangement matters — first, second and third place are different outcomes. Use combinations when only the group matters, like choosing a committee.
Why is 10P3 (720) so much bigger than 10C3 (120)?
Every combination of 3 items can be arranged in 3! = 6 orders, and 120 x 6 = 720. Permutations count each of those orders separately.
What does the ! symbol mean?
Factorial: n! means n x (n-1) x ... x 1. By definition 0! = 1, which is why choosing all or none of the items always gives exactly 1 way.
Can r be bigger than n?
No. You cannot choose or arrange more distinct items than exist, so this calculator requires r <= n unless repetition is allowed, which is a different formula.
Does this calculator allow repetition?
No. It covers selections without repetition. Choosing with repetition uses (n+r-1)Cr for combinations and n^r for permutations.
About this calculator
A permutation and combination calculator counts how many ways r items can be drawn from n items. Permutations count ordered arrangements such as podium finishes; combinations count unordered selections such as committees or lottery tickets.
The whole subject turns on one question: does swapping two chosen items create a new outcome? For a race podium, gold-silver-bronze in a different order is a different result, so permutations apply and the count is large. For a three-person committee, the same three people in any order are the same committee, so combinations apply.
Factorials drive both formulas because arranging k distinct items can be done in k! ways. Dividing n! by (n-r)! cancels the items never chosen in a permutation; a combination then divides again by r! to erase the internal orderings of each chosen group.
Use it for probability denominators, card hands, team selections, password-style counting problems and any textbook question that hinges on whether order matters.
How to calculate it yourself
Step 1
Decide whether order matters for your problem.
Step 2
Count the total pool n and the number drawn r.
Step 3
For permutations compute n! / (n-r)!.
Step 4
For combinations compute n! / (r! (n-r)!).
Step 5
Sanity-check: the permutation count is always at least the combination count.
Real-life examples
Picking a quiz team
A teacher must pick 3 students from a class of 10 for a quiz team where roles are not assigned, so order does not matter.
nCr = 10! / (3! x (10-3)!) = 3,628,800 / (6 x 5,040) = 120.
Result: 120 combinations. There are 120 possible teams.
Setting a podium
The same 10 students run a race and gold, silver and bronze medals are awarded, so finishing order matters.
nPr = 10! / (10-3)! = 3,628,800 / 5,040 = 720.
Result: 720 permutations. There are 720 possible podiums — six times the team count.
Ideas & use cases
- Lottery check: compare a combinations result for ticket numbers with the permutations result to see why order-free draws are easier to win.
- Seating plans: run permutations for assigned seats, then combinations for just choosing who attends.
- Password audit: use n^r thinking alongside this tool to feel how repetition changes the count scale.
Limitations & sources
- Selections without repetition only, and n is capped at 170 because larger factorials overflow standard double-precision arithmetic.
Sources: Standard counting formulas: OpenStax Algebra and Trigonometry, counting principles chapter; NIST Digital Library factorial definition
