Permutation & Combination Calculator

Calculate permutations (nPr) and combinations (nCr) instantly. Enter n and r values to get results with step-by-step explanations. Free, fast, and client-side.

Quick Examples

About Permutation & Combination Calculator

This calculator computes permutations (nPr) and combinations (nCr) for given values of n (total items) and r (selected items). Permutations count arrangements where order matters; combinations count selections where order does not matter. These concepts are fundamental in probability, statistics, combinatorics, and everyday decision-making. All calculations happen instantly in your browser.

Features

FAQ

What is the difference between permutation and combination?

Permutation (nPr) counts arrangements where the order matters. For example, ABC is different from BAC. Combination (nCr) counts selections where order does not matter — ABC and BAC are the same combination. Use permutations for ordered arrangements (lock codes, race rankings) and combinations for unordered selections (lottery, team choosing).

What does n and r mean?

n is the total number of items in the set. r is the number of items you are selecting from that set. For example, if you have 10 books and want to pick 3 for a trip, n=10 and r=3.

Why is there a maximum n of 170?

Factorials grow extremely fast. 170! is approximately 7.26 × 10³⁰⁶, which is near the maximum value JavaScript can represent. Beyond this, results would lose precision.

Where are permutations and combinations used?

They are used everywhere: probability theory (card games, dice), statistics (sampling), computer science (algorithm complexity), cryptography (key spaces), genetics (gene combinations), sports (tournament brackets), and everyday decisions (menu combinations, password strength).