Calculators
Permutation & Combination Calculator
Calculate exact nPr and nCr values and understand when order matters.
This calculator assumes selection without replacement. Use permutations when order matters and combinations when order does not matter.
Permutation nPr
720
Combination nCr
120
About This Tool
Count how many ways you can select r items from n distinct items without replacement. The calculator returns both permutations, where different orders count as different outcomes, and combinations, where the same selected items count once regardless of order. Results use exact integer arithmetic, so large valid counts are not rounded into scientific notation. This makes the tool useful for combinatorics exercises, probability setup, scheduling choices, team selection, codes, and other counting problems.
How To Use It
- Enter the total number of distinct available items as n.
- Enter how many items are selected as r. For selection without replacement, r must be between 0 and n.
- Use nPr when the order of selected items matters; use nCr when only which items were selected matters.
Examples
Choose 3 people from 10
If you only need a three-person committee, order does not matter: 10C3 = 120. If the three people fill distinct first, second, and third roles, order matters: 10P3 = 720.
Arrange 2 books from 5
Selecting and ordering two different books from five gives 5P2 = 5 × 4 = 20 arrangements. Ignoring order gives 5C2 = 10 pairs.
Select nothing
For any valid n, selecting zero items has one outcome: the empty selection. Therefore nP0 = 1 and nC0 = 1.
Select every item
There is exactly one combination containing all n items, so nCn = 1, while arranging all items gives nPn = n!.
Useful Notes
Permutation formula
For distinct items selected without replacement, nPr = n! / (n − r)!. The implementation multiplies only the r required factors rather than calculating two full factorials.
Combination formula
When order does not matter, nCr = n! / (r!(n − r)!). The calculator uses the symmetry nCr = nC(n − r) and performs exact integer multiplication and division to reduce unnecessary work.
Order is the key distinction
Ask whether swapping two selected positions creates a different outcome. A podium with gold, silver, and bronze positions is a permutation problem. A committee whose members have no ordered positions is a combination problem.
Exact large integers
Counting results grow rapidly. This tool uses JavaScript BigInt for the result rather than floating-point arithmetic, preserving exact whole-number counts for valid inputs instead of rounding large answers.
FAQ
What is the difference between nPr and nCr?
nPr counts ordered selections, while nCr counts unordered selections. For the same n and r, nPr equals nCr multiplied by r! because each combination can usually be arranged in r! orders.
Can r be greater than n?
Not for the without-replacement model used here. You cannot select more distinct items than are available, so r must be no greater than n.
Why is 0! treated as 1?
The standard factorial definition sets 0! = 1. This keeps counting identities consistent, including nP0 = nC0 = 1.
Does this calculator handle repeated items or replacement?
No. It assumes n distinct items and selection without replacement. Problems involving repeated identical objects or replacement use different counting formulas.
Related Tools
Scientific Calculator
Scientific math functions with degree and radian modes.
Statistics Calculator
Mean, median, mode, variance, standard deviation, and more.
Fraction Calculator
Calculate and simplify arithmetic with two fractions.
Basic Calculator
PopularA simple arithmetic calculator for quick results.