Permutation & Combination Calculator

Calculate nPr (permutations) and nCr (combinations) with step-by-step factorial breakdowns. Everything runs in your browser — nothing is stored or sent to any server.

Ad Space

How Permutation & Combination Calculator Works

Calculate permutations and combinations instantly with step-by-step factorial breakdowns. runs in your browser. Enter your values into the form above and the calculator processes them instantly in your browser — no data is sent to any server.

Understanding Permutations and Combinations

Permutations and combinations are fundamental counting techniques in mathematics used to determine the number of possible arrangements or selections from a set of items. They appear everywhere — from probability and statistics to cryptography, genetics, and game theory.

The key distinction is straightforward: permutations care about order, while combinations do not. Choosing Alice, Bob, and Carol for president, vice-president, and treasurer is a permutation problem (ABC differs from BAC). Choosing 3 people for a committee is a combination problem (the same group regardless of order).

Formulas

Permutation: nPr = n! / (n - r)!

Combination: nCr = n! / [r! × (n - r)!]

Where:

  • n = total number of items
  • r = number of items chosen
  • n! = n factorial = n × (n-1) × (n-2) × ... × 1

Real-World Examples

Permutation vs Combination: Quick Rule

Ask yourself: "Does the order in which I pick items change the outcome?" If yes, use permutations. If no, use combinations. For instance, a PIN code 1234 is different from 4321 (permutation), but a hand of cards {A, K, Q} is the same regardless of draw order (combination).

Factorials Explained

A factorial (written as n!) is the product of all positive integers from 1 to n. For example, 5! = 5 × 4 × 3 × 2 × 1 = 120. By convention, 0! = 1. Factorials grow extremely fast — 20! is already over 2.4 quintillion. This calculator handles values up to n = 170 before JavaScript number precision limits are reached.

Applications

Combinatorics underpins probability theory, statistical sampling, algorithm design (sorting, hashing), error-correcting codes, DNA sequencing, and tournament scheduling. Understanding permutations and combinations is essential for standardised tests like the GRE, GMAT, SAT, and competitive programming contests.

Frequently Asked Questions

What is the difference between permutation and combination?

A permutation counts arrangements where order matters (e.g., ranking 3 people out of 10). A combination counts selections where order does not matter (e.g., choosing 3 people for a committee out of 10). The formula for permutations includes the extra ordering factor, making nPr always greater than or equal to nCr.

What does n and r mean?

n is the total number of items in the set, and r is the number of items being chosen or arranged. For example, if you have 10 students and want to pick 3, then n = 10 and r = 3.

When should I use permutations?

Use permutations when the order of selection matters. Examples include ranking contestants, assigning positions, creating passwords, or arranging books on a shelf where each position is distinct.

When should I use combinations?

Use combinations when the order does not matter. Examples include choosing a committee, selecting lottery numbers, picking a team of players, or choosing toppings for a pizza.

Why is nPr always greater than or equal to nCr?

Because nPr counts every distinct ordering of the r items as a separate arrangement, while nCr treats all orderings of the same r items as one group. Mathematically, nPr = nCr × r!, so nPr is always r! times larger than nCr.