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.
Before using the formulas, it helps to clarify a few basic terms.
n is the size of the full set you are choosing from. Examples:
r is how many items you take from the set at once.
Both permutations and combinations rely on the factorial function. For any non-negative integer n, the factorial of n, written n!, is:
In plain language, you multiply all positive whole numbers from 1 up to n. For example:
By convention, 0! = 1.
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:
Plain text version: P(n, r) = n! / (n − r)!
Use permutations when:
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:
Plain text version: C(n, r) = n! / [r! × (n − r)!].
Use combinations when:
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 |
| 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! |
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.
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.
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.
You can adjust n and r as often as you like to compare different scenarios.
When you run the calculator, you typically get two large integers:
Some practical interpretations:
This calculator is designed for the standard, no-repetition versions of permutations and combinations. It makes the following assumptions:
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.
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.
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.