Permutation and Combination Calculator

Calculate permutations (nPr) and combinations (nCr) for n and r.

Enter the total number of items (n) and the number of items you choose (r). The values must be integers with n ≥ r ≥ 0.

Permutations vs. Combinations

Both permutations and combinations count the number of ways to select r items from a set of n items. The key difference is whether order matters. With permutations the order of the selection matters, so ABC and CAB are counted separately. With combinations the order does not matter, so ABC and CAB are considered the same selection.

Because permutations distinguish between orderings, the number of permutations is always greater than or equal to the number of combinations for the same n and r.

The Formulas

  • Permutations: nPr = n! / (n − r)!
  • Combinations: nCr = n! / (r! · (n − r)!)

Here n! (n factorial) is the product of all positive integers up to n, and 0! is defined as 1. This calculator uses exact big-integer arithmetic, so the results remain precise even for very large values of n.

Examples

  • Lottery: Choosing 6 numbers out of 49 where order does not matter is a combination: 49C6 = 13,983,816 possible tickets.
  • Lineups: Arranging 3 runners on a podium (gold, silver, bronze) out of 8 athletes is a permutation: 8P3 = 336 ordered finishes.
  • Quick check: With n = 5 and r = 2, there are 20 permutations and 10 combinations.

Note: This calculator computes permutations and combinations using exact integer arithmetic based on the formulas described. While we strive for accuracy, please verify important calculations independently. This tool is for educational and informational purposes and should not be the sole basis for academic or professional decisions.