The Permutation and Combination Calculator computes ordered permutations and unordered combinations when selecting r items from n distinct items without repetition.
Formulas
Both n and r must be non-negative integers, r cannot exceed n, and the implementation limits n to 170 to avoid numeric overflow in factorial calculations.
Worked example
For n = 5 and r = 2:
- Permutations:
5P2 = 5 x 4 = 20ordered arrangements. - Combinations:
5C2 = 5! / (2! x 3!) = 10unordered selections.
Questions
When should I use permutations?
Use permutations when order matters, such as assigning first and second place.
When should I use combinations?
Use combinations when order does not matter, such as choosing two committee members.
Can I use repeated items?
No. This calculator assumes distinct items selected without repetition.
Limitations
Large factorials exceed JavaScript's safe numeric precision. Results near the supported upper bound should be treated as numeric estimates rather than arbitrary-precision integers.