Permutation & Combination Calculator

JJ Ben-Joseph headshot JJ Ben-Joseph

Introduction: Understanding Permutations and Combinations

Permutations and combinations are core tools in counting and probability. They answer questions like:

This calculator lets you enter the total number of items n and the number of items chosen r. It then computes both the permutations and combinations for those values, so you can quickly compare “order matters” versus “order does not matter” scenarios.

Key Definitions

Before using the formulas, it helps to clarify a few basic terms.

Total items (n)

n is the size of the full set you are choosing from. Examples:

Items chosen (r)

r is how many items you take from the set at once.

Factorials

Both permutations and combinations rely on the factorial function. For any non-negative integer n, the factorial of n, written n!, is:

Formula: n ! = ∏ k = 1 n(k)

n! = k = 1 n ( k )

In plain language, you multiply all positive whole numbers from 1 up to n. For example:

By convention, 0! = 1.

Permutation Formula (Order Matters)

A permutation counts how many different ordered arrangements you can form when selecting r items from n without repetition. Changing the order produces a different permutation.

The number of permutations is written as P(n, r) and defined by:

Formula: P(n, r) = (n !) / ((n − r) !)

P ( n , r ) = n! ( n r ) !

Plain text version: P(n, r) = n! / (n − r)!

Use permutations when:

Combination Formula (Order Does Not Matter)

A combination counts how many different groups of size r you can form from n items when order does not matter. The group {A, B, C} is the same as {C, B, A}.

The number of combinations is written as C(n, r) or nCr and defined by:

Formula: C(n, r) = (n !) / (r !(n − r) !)

C ( n , r ) = n! r! ( n r ) !

Plain text version: C(n, r) = n! / [r! × (n − r)!].

Use combinations when:

Permutations vs. Combinations at a Glance

The following table summarizes the main differences and gives quick examples so you can decide which one to use.

Aspect Permutations P(n, r) Combinations C(n, r)
Does order matter? Yes, different orders count as different outcomes. No, different orders are treated as the same group.
Typical notation P(n, r) or nPr C(n, r), nCr, or (nr)
Formula P(n, r) = n! / (n − r)! C(n, r) = n! / [r! (n − r)!]
Example scenario Arranging 3 winners as gold, silver, bronze from 10 runners. Choosing 3 people from 10 to form a committee.
Result size Always greater than or equal to C(n, r) for the same n, r (when r > 1). Always less than or equal to P(n, r) for the same n, r (when r > 1).
Relationship P(n, r) = C(n, r) × r! C(n, r) = P(n, r) / r!

Three Problems, Worked by Hand

Example 1: Committee vs. Officer Roles

Question: A club has 10 members.

Here, n = 10 and r = 3.

Committee (order does not matter): use combinations.

C(10, 3) = 10! / [3! × (10 − 3)!] = 10! / (3! × 7!)

Compute step by step:

Officer roles (order matters): use permutations.

P(10, 3) = 10! / (10 − 3)! = 10! / 7! = 10 × 9 × 8 = 720

So there are 120 possible committees but 720 ways to assign three distinct officer roles.

Example 2: Lottery Numbers

Question: A lottery asks you to choose 6 distinct numbers from 49, and the drawn numbers are not ordered. How many different tickets are possible?

Here, n = 49 and r = 6. Order does not matter, so we use combinations:

C(49, 6) = 49! / [6! × 43!]

Writing out all factorials is impractical by hand, but the calculator evaluates this quickly, giving:

C(49, 6) = 13,983,816 possible tickets.

This huge number illustrates why winning the jackpot with one ticket is very unlikely.

Example 3: Simple Passwords

Question: You create a 3-letter password using distinct uppercase letters (A–Z). How many possibilities are there if order matters?

There are n = 26 letters, and you use r = 3 distinct letters in each password. Order clearly matters (“ABC” is different from “CBA”), so use permutations:

P(26, 3) = 26! / (26 − 3)! = 26! / 23! = 26 × 25 × 24

Compute:

So there are 15,600 possible 3-letter passwords under these assumptions.

Running Your Own Numbers

Only two inputs stand between you and an answer. Put the size of the full set in Total items (n) — that is the pool you draw from, whether it is 10 students, 49 lottery balls, or the 52 cards in a deck. Put how many you pull out of that pool in Items chosen (r). Hit calculate and the page returns both counts at once: P(n, r) for the ordered arrangements and C(n, r) for the unordered groups.

Because you get both numbers on every run, the fastest way to build intuition is to fix n and r and just read the two answers side by side — the gap between them is exactly the r! reorderings of each group. Change either box and recalculate to test a different scenario; nothing you type leaves the page.

Reading the Two Answers

The calculator hands you two counts, and picking the right one comes down to a single question: does rearranging the same items give you something you would call a different outcome?

The two counts always sit in a fixed ratio: P(n, r) is exactly r! times C(n, r), because every unordered group can be shuffled into r! distinct arrangements. That is why the permutation count balloons so much faster. Once P(n, r) climbs into the millions or billions, it is telling you that listing every outcome by hand is hopeless — from that point on, any probability you need has to come from the formula, not from enumeration.

Where These Formulas Stop Working

P(n, r) and C(n, r) describe one specific setup: you draw distinct items from a fixed pool and never put anything back. Stretch the problem outside that setup and these formulas quietly give the wrong count. Keep the boundaries in mind:

There are also related counting formulas for cases with repetition (for example, allowing the same letter to appear more than once in a code). Those are not covered by the basic P(n, r) and C(n, r) formulas used here.

Privacy and Local Computation

All calculations are performed directly in your browser using client-side code. The values you enter for n and r are not sent to a server for processing. This keeps your usage private and ensures that results appear instantly, even if you are offline after loading the page.

Related Topics

To go deeper into discrete mathematics and probability, you may also find these concepts and tools helpful:

Together, permutations and combinations give you a compact language for reasoning about large, complex sets of possibilities without having to list them all individually.

Your permutation and combination counts will appear here.

Arcade Mini-Game: Permutation & Combination Calculator Calibration Run

Use this quick arcade run to practice separating useful scenario inputs from common planning mistakes before you rely on the calculator output.

Score: 0 Timer: 30s Best: 0

Start the game, then use your pointer or arrow keys to catch useful inputs and avoid bad assumptions.