Permutation & Combination Calculator

Calculate permutations P(n,r) and combinations C(n,r) with exact BigInt precision.

Enter n and r to calculate permutations and combinations

Permutation & Combination Calculator

Permutations (nPr) count the number of ways to arrange r items from a set of n, where order matters. Combinations (nCr) count the number of ways to choose r items from a set of n, where order does not matter.

This calculator computes both P(n,r) and C(n,r) using BigInt arithmetic for exact results, even for large values. These formulas are essential in probability, statistics, combinatorics, and many fields of mathematics and computer science.

How it works

P(n,r) = n! / (n−r)! — the number of ordered arrangements. C(n,r) = n! / (r! × (n−r)!) — the number of unordered selections. Also known as the binomial coefficient.

Use cases

  • Calculating probability of lottery outcomes
  • Determining possible arrangements in scheduling problems
  • Solving counting problems in math competitions
  • Computing binomial coefficients for polynomial expansion

Frequently asked questions

What is the difference between a permutation and a combination?

In a permutation the order of the selected items matters, while in a combination it does not. For example, choosing a president and vice-president from a group is a permutation, but choosing a two-person committee is a combination. This is why P(n,r) is always greater than or equal to C(n,r) for the same n and r.

How do you calculate nPr and nCr?

Permutations use P(n,r) = n! / (n−r)!, counting ordered arrangements of r items from n. Combinations use C(n,r) = n! / (r! × (n−r)!), which divides out the r! orderings so only unordered selections are counted. This calculator applies both formulas using BigInt arithmetic for exact results.

What is 5 choose 2?

5 choose 2, written C(5,2), equals 5! / (2! × 3!) = 10. This is the number of distinct 2-item groups you can select from 5 items when order does not matter. The related permutation P(5,2) equals 5! / 3! = 20, because each pair can be ordered in two ways.

What does the exclamation mark (factorial) mean?

The factorial n! is the product of all positive integers from 1 up to n, so 5! = 5 × 4 × 3 × 2 × 1 = 120. By definition 0! = 1. Factorials appear in both the permutation and combination formulas and grow extremely fast, which is why this tool uses BigInt to keep large results exact.

Is nCr the same as the binomial coefficient?

Yes. The combination C(n,r) is identical to the binomial coefficient, often written as n over r, and it gives the coefficient of the term in the expansion of (a + b) raised to the n. It also satisfies the symmetry C(n,r) = C(n, n−r), so choosing r items to include is the same as choosing n−r items to leave out.

Related Calculators