Permutation and Combination Calculator
This permutation and combination calculator counts selections of distinct items without replacement. It reports both ordered arrangements and unordered groups using exact BigInt arithmetic for whole-number inputs up to 1000.
By Dr. Hassan Khames EliwaLast updated
Result
- Combinations (nCr)
- 120
How it works
Decide whether positions matter
Let n be the number of distinct available items and r the number selected. A permutation treats different orders of the same selected items as different outcomes. A combination treats those orders as the same group. Assigning a chair, secretary, and treasurer is ordered; choosing a three-person committee with no roles is unordered.
Both results assume selection without replacement. Once an item has been chosen, it cannot be selected again in the same outcome. The items must also be distinguishable. If several objects are treated as identical, or repeated selections are allowed, the formulas on this page no longer describe the counting problem.
Calculate arrangements and groups
The permutation formula is nPr = n! / (n-r)!. Operationally, the calculator multiplies n by n-1 and continues for r factors. Each factor represents the remaining choices for the next position. It avoids calculating two large factorials only to divide them afterward.
The combination formula is nCr = n! / (r! × (n-r)!). Dividing the ordered count by r! removes the different orders of each group. The implementation uses a multiplicative recurrence with the smaller of r and n-r, keeping the number of steps bounded while preserving integer results at every division.
Keep exact counts exact
JavaScript's ordinary number type cannot represent every sufficiently large integer. This calculator therefore performs the counting operations with BigInt and converts the result directly to a decimal string. The output is not rounded, shortened, or switched into scientific notation. Large valid results can consequently contain many digits.
Inputs must satisfy 0 ≤ r ≤ n ≤ 1000 and must be whole numbers. Selecting zero items has one outcome: the empty selection. When n is also zero, that same convention gives one permutation and one combination. The limit controls runtime and output length rather than implying that larger counting problems are mathematically invalid.
Worked example
Example 1: choose people or assign roles
Ten eligible colleagues are available, and three will be selected. Enter n = 10 and r = 3. Permutations (nPr) is 720, from ten choices for the first role, nine for the second, and eight for the third. Combinations (nCr) is 120. Use 720 when the three positions differ; use 120 when the selected colleagues form one committee without assigned roles.
Example 2: arrange or group four samples
A laboratory has eight distinct labeled samples and selects four without replacement. Enter n = 8 and r = 4. Permutations (nPr) is 1680, and Combinations (nCr) is 70. A four-position testing sequence uses the ordered count. A batch containing the same four labels regardless of processing order uses the unordered count. The physical samples are distinct because their labels identify them separately.
Expert tips
Common mistakes
- Dividing by r instead of r factorial. Removing order means removing every possible arrangement of the selected items. There are r! such arrangements when the selected items are distinct, not merely r.
- Treating identical objects as labeled choices. If repeated letters or indistinguishable components appear in a counting problem, their symmetry needs separate treatment. Entering the raw object total can overcount outcomes.
- Turning a count directly into a probability. A probability needs favorable outcomes and a complete outcome space with an appropriate sampling model. A combination count alone does not establish that every group is equally likely.
Frequently asked questions
Why do both results equal one when r is zero?
There is exactly one way to choose nothing: the empty selection. This convention also makes the standard counting formulas behave consistently at their boundaries.
Can r exceed n?
Not for selection without replacement. You cannot select more distinct items than are available, so the calculator rejects that input instead of displaying a misleading count.
Are large results approximate?
No. Every accepted count is calculated with integer BigInt operations and displayed as its full decimal expansion. Display length may be substantial, but the digits are not rounded.
Why are combinations symmetric?
Choosing r items uniquely determines the n-r items left out. That one-to-one relationship explains why choosing r from n gives the same number of groups as choosing n-r.
Does this support repeated choices?
No. Repetition changes the formulas and sometimes the meaning of order. State whether repetition is allowed before choosing a counting method, rather than trying to adapt these outputs afterward.
Related calculators
Related guides
MathPercentages people get wrong: change, difference and pointsThe denominator determines the answer. Learn to distinguish percentage change, symmetric difference and percentage-point movements.14 November 2026 · 7 min read
MathStandard deviation without the jargonThe average tells you the centre. Standard deviation helps describe the spread, provided you know what the data represents.14 November 2026 · 7 min readAbout the author
Dr. Hassan Khames Eliwa holds a PhD in Construction & Built Environment and has more than 20 years of international project controls experience. He is Director of Eliwa Project Controls Limited in Auckland and founder of PMMilestone.org and PMMilestone.com.
Buy me a coffee