Permutation and Combination Calculator
Calculate nPr and nCr instantly, compare whether order matters, and explore counts with or without repetition using exact integer results.
Enter your values
Exact integer arithmetic is used for the results. To keep calculations responsive and output manageable, n is limited to 1,000.
Your results
Formula and working
nCr = n! / [r! × (n − r)!] = 10! / (3! × 7!) = 120
What are permutations and combinations?
A permutation counts arrangements where order matters. A combination counts selections where order does not matter. For example, choosing a president and a secretary from a group assigns different roles, so order matters; choosing two people for the same committee does not depend on order.
Formulas without repetition
Combination: C(n, r) = n! / [r! × (n − r)!]
Factorial: n! = n × (n − 1) × … × 2 × 1, and 0! = 1
Formulas with repetition
Unordered selections: C(n + r − 1, r) = (n + r − 1)! / [r! × (n − 1)!]
When repetition is allowed, the same item may appear more than once. Ordered selections then have n choices for each of r positions. For unordered selections with repetition, the combination formula uses n + r − 1 available positions.
How to use this calculator
- Enter n, the total number of available items.
- Enter r, the number of items selected or arranged.
- Enable repetition if items can be chosen more than once.
- Review both nPr and nCr, then read the formula steps.
- Use the copy button to copy the results for notes or homework.
Worked example: n = 5 and r = 2
Without repetition, P(5, 2) = 5 × 4 = 20 ordered arrangements. C(5, 2) = 5! / (2! × 3!) = 10 unordered selections. There are twice as many permutations because each selected pair can be arranged in 2! ways.
Frequently asked questions
What is the main difference between nPr and nCr?
nPr counts arrangements where order matters. nCr counts selections where order does not matter. With the same n and r and no repetition, nPr = nCr × r!.
Can r be greater than n?
Without repetition, r must be less than or equal to n because an item cannot be selected more than once. With repetition allowed, r can be greater than n.
What does factorial mean?
The factorial of a non-negative integer n, written n!, is the product n × (n−1) × … × 1. By definition, 0! = 1.
When should I allow repetition?
Allow repetition when each pick can reuse an item, such as creating a code where digits may repeat. Leave it off when each item can be used only once, such as choosing people from a group.
Why can the result become very large?
Factorials and counting results grow quickly as n increases. This calculator uses exact integer arithmetic, so large results may contain many digits.
What are common real-life uses?
Permutations are useful for rankings, schedules, and assigning distinct roles. Combinations are useful for teams, committees, card hands, and selecting a group when order is irrelevant.
Use the permutation formula when changing the order creates a different outcome; use the combination formula when only the selected group matters.