Report

Help us improve this tool

Permutation and Combination Calculator

Calculate permutations (nPr) and combinations (nCr) instantly with step-by-step results. Free online combinatorics calculator.

O M T

What is a Permutation and Combination Calculator?

A Permutation and Combination Calculator is a free online tool that computes the number of ways to arrange or select items from a set. It calculates both permutations (nPr) where order matters and combinations (nCr) where order does not matter, making it essential for probability, statistics, and combinatorics problems.

How to Use the Permutation and Combination Calculator

Using this calculator is straightforward. Enter the total number of items (n) and the number of items to choose (r). The tool instantly computes both nPr (permutations) and nCr (combinations) with a step-by-step breakdown of the factorial calculations. Results update in real time as you adjust the values.

Key Formulas

The calculator uses the standard combinatorial formulas:

  • Permutations (nPr): $$P(n,r) = \frac{n!}{(n-r)!}$$
  • Combinations (nCr): $$C(n,r) = \frac{n!}{r!(n-r)!}$$

Where $$n!$$ (n factorial) is the product of all positive integers from 1 to n.

Understanding the Difference

The key difference between permutations and combinations is whether order matters:

  • Permutations count ordered arrangements. For example, choosing a president, vice president, and secretary from a group is a permutation because the positions are distinct.
  • Combinations count unordered selections. For example, choosing 3 members for a committee where all members have equal roles is a combination.

Practical Examples

Example 1: Permutations in Action

If you have 10 books and want to arrange 4 of them on a shelf, the number of ways is P(10, 4) = 10! / 6! = 5,040. Since the order of books on the shelf matters, this is a permutation.

Example 2: Combinations in Action

If you have 10 people and want to form a committee of 4, the number of possible committees is C(10, 4) = 10! / (4! × 6!) = 210. Since committee membership has no hierarchy, this is a combination.

Example 3: Lottery Probability

In a lottery where you pick 6 numbers from 49, the total number of possible combinations is C(49, 6) = 13,983,816. This is a combination because the order of drawn numbers does not matter. For more combinatorial analysis, try our Permutation with Replacement Calculator or Probability Calculator.

Applications of Permutations and Combinations

Combinatorics has wide-ranging applications across many fields:

  • Probability and Statistics: Calculating odds and event probabilities
  • Cryptography: Analyzing password strength and encryption keys
  • Game Theory: Evaluating possible moves and game outcomes
  • Genetics: Computing genetic variation and inheritance patterns
  • Computer Science: Algorithm analysis and combinatorial optimization
  • Operations Research: Resource allocation and scheduling

Also check: Permutation with Replacement Calculator, Factorial Calculator, Probability Calculator, Binomial Coefficient Calculator, Statistics Calculator, Random Number Generator.

Frequently Asked Questions

What is the difference between nPr and nCr?

nPr (permutations) counts arrangements where order matters, such as ranking or sequencing. nCr (combinations) counts selections where order does not matter, such as choosing team members. nPr is always equal to or larger than nCr for the same n and r values.

What happens when r is 0 or r equals n?

When r = 0, both nPr and nCr equal 1 (there is exactly one way to choose nothing). When r = n, nPr = n! (all possible arrangements of all items) and nCr = 1 (there is exactly one way to choose all items).

Can r be greater than n?

No. The number of items to choose (r) cannot exceed the total items (n). The calculator will display an error message if r > n.

What is the maximum value of n supported?

The calculator supports values up to n = 170, which is the largest factorial that can be accurately computed using JavaScript number precision. Beyond this, results may lose accuracy.

Where are permutations and combinations used in real life?

They are used in lottery calculations, password security analysis, sports tournament brackets, seating arrangements, genetic research, card game probabilities, and any scenario involving counting possible outcomes or selections.